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

Use Simple as default selection for ExpressionField #867

Closed
lordrip opened this issue Feb 24, 2024 · 5 comments · Fixed by #1068
Closed

Use Simple as default selection for ExpressionField #867

lordrip opened this issue Feb 24, 2024 · 5 comments · Fixed by #1068
Assignees
Labels
canvas/config-form Configuration form related issues enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed ui/ux This issue is about improving the UI / UX
Milestone

Comments

@lordrip
Copy link
Member

lordrip commented Feb 24, 2024

Please describe the feature that you want to propose

Currently, when an ExpressionField is not configured, we don't select anything by default, leaving the user to select the desired language, which is usually Simple.

The goal for this ticket is to set Simple by default

@lordrip lordrip added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed canvas/config-form Configuration form related issues ui/ux This issue is about improving the UI / UX labels Feb 24, 2024
@lordrip lordrip changed the title Use simple as default selection for ExpressionField Use Simple as default selection for ExpressionField Feb 24, 2024
@lhein
Copy link
Contributor

lhein commented Feb 27, 2024

Is there a defined defaultValue for the expression language?

@lordrip
Copy link
Member Author

lordrip commented Feb 27, 2024

No, I don't think so, In the schema says "an expression"

@lordrip
Copy link
Member Author

lordrip commented Feb 27, 2024

The expected behavior would be:

  1. We show the modal with Simple selected
  2. If the user doesn't change anything, we shouldn't serialize Simple
  3. If the user changes something, we serialize it
  4. If the user changes the language, we remove the previous one and keep the latest.

@lordrip
Copy link
Member Author

lordrip commented Feb 27, 2024

This needs to be compared against using the Typeahead component instead.

@lordrip
Copy link
Member Author

lordrip commented Feb 29, 2024

After discussion, a better and simpler approach would be to create the expression with a prepopulated value instead, so we have the same behavior across the form.

@lhein lhein added this to the 2.0.0 milestone Apr 30, 2024
@igarashitm igarashitm self-assigned this May 3, 2024
igarashitm added a commit to igarashitm/kaoto that referenced this issue May 7, 2024
Fixes: KaotoIO#867
Start with setHeader, setProperty, setVariable, setBody and filter
igarashitm added a commit that referenced this issue May 7, 2024
Fixes: #867
Start with setHeader, setProperty, setVariable, setBody and filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
canvas/config-form Configuration form related issues enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed ui/ux This issue is about improving the UI / UX
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants