Warn user if he breaks a $ reference when modifying a connector function?

Hello everyone.

The other day I was modifying a connector function and changed the name of an input. Unfortunately I forgot that this input was referenced, which temporarily broke the connector function.

I think this is very easily overlooked, especially when many connector functions are used and/or when editing an old function you are not used to anymore.

I suggest that a warning is displayed to the user if he modifies an input name and breaks a $ reference in doing so. More precisely, if a foo input exists and is referenced with $foo$ somewhere:

  1. The user modifies the input name to something different, e.g. from foo to bar.
  2. When the user does this, Tulip looks for all $foo$ references it can find (path, query parameters, request body…).
  3. If no reference is found, Tulip does nothing. If a reference is found, Tulip displays a small warning triangle in the field the user modified. On hovering it, a tooltip would display something appropriate, like There are some broken references to this field. Please check places where this input is used to make sure everything works as you want.
  4. The warning would remain as long as at least one $foo$ exists somewhere. If the user changes their mind and renames again from bar to foo, the warning disappears.
  5. If the user saves the function and there are still some broken references, a modal would be displayed, asking the user to confirm the action. While probably very rare, this might be something the user desires to do.

The main idea is to take into account the name of inputs as they were written when the user accessed the connector function edit page.

I Like the idea.

I sometimes break the reference intentionally, to make the URL easy highlightable (and copyable).
With that warning I would see, if I fixed everything correctly again :slight_smile:

Hey Crew -

This is a great idea - its easy for us to just give users a heads up when this sort of change is made.

I have made a feature request for this and will discuss with the team

Pete

2 Likes