Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Javascript expressions as conditions for edges #1498

Closed
4 tasks
NickOpenFn opened this issue Nov 30, 2023 · 3 comments · Fixed by #1573
Closed
4 tasks

Allow Javascript expressions as conditions for edges #1498

NickOpenFn opened this issue Nov 30, 2023 · 3 comments · Fixed by #1573
Assignees

Comments

@NickOpenFn
Copy link

NickOpenFn commented Nov 30, 2023

Figma: https://www.figma.com/file/2Uvr2jOaQh6rQNR1cHlLKM/App?type=design&node-id=1086-3945&mode=design&t=9AetCDKXOYdq9T4m-11

We will now include a conditional match where the user can compare the output of the previous job against a Javascript expressions.

Edge panel:

  • Include new dropdown item "Matches a Javascript Expression" in the drop down list for conditions
  • When selected, new input for "Condition label" (more on that below)
  • Include lightweight code input (not sure which existing code input we should use here or just style a normal input) for the JS expression
  • Add a link to a Javascript Expression checker under the input (open to whatever online tool seems best!)

Canvas:

  • When the "Matches a Javascript Expression" is selected, we will display a label on the path which takes the text from the "Condition label" instead of an icon.
  • There needs to be a max width, followed by ellipsis (I feel 16 char is probably the right length)
  • If ellipsis are displayed, a tooltip should be shown on hover of the element.

Acceptance criteria:

  • Option displayed in drop down list for conditions is correct
  • The edges following job always runs when matching the regular expression
  • The label is displayed
  • New features included in documentation

Noting:

  • Will use same input as the input dataclip
  • Will do basic validation that the query is valid, and no typeahead.
  • In future will move to Monaco
@taylordowns2000 taylordowns2000 changed the title Allow "Javascript Regular Expressions" as conditions for edges Allow Javascript expressions as conditions for edges Nov 30, 2023
@NickOpenFn NickOpenFn added the unplanned Items included in a existing sprint that weren't part of the initial Sprint backlog label Dec 1, 2023
@NickOpenFn
Copy link
Author

@NickOpenFn
Copy link
Author

@stuartc pairing up with @jyeshe here to do the frontend UI

@jyeshe
Copy link
Contributor

jyeshe commented Dec 8, 2023

@stuartc pairing up with @jyeshe here to do the frontend UI

Magically I could manage the form yesterday. Missing the label on the workflow...

@NickOpenFn NickOpenFn removed the unplanned Items included in a existing sprint that weren't part of the initial Sprint backlog label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants