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

Add multi-select, proposals and labels for trigger form #31441

Conversation

jscheffl
Copy link
Contributor

@jscheffl jscheffl commented May 20, 2023

closes: #31440
related: #31301 #31399

This PR adds three new (small) features into the Trigger DAG UI form for increased usability and new (missing) features:

  • In select lists (rendered via enum) display labels can be added to separate picked value and display text in dropdown via values_display property.
  • If user should have proposals for entering values but should not be forced to the limited number of enums now the attribute examplescan be used which are used to present proposals while typing
  • Multi-value selects are now possible (So that not only enums with single values need to be used). These are a combination of array type and examples.

Tutorial is adjusted with examples for the new features, UI looks like this for the three new options:
image

This PR overlaps a bit with https://github.com/apache/airflow/31400 so the other should be merged first and then this needs to be adjusted.

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:documentation labels May 20, 2023
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looking good. :)

I just have an issue with multiselect field:

  • Select multiple value in the Multi Select *:
  • Submit the run
  • Try to trigger again this dag using previous configuration we made for the 1st run
  • The field is not properly populated. It uses the default value for the param, while we are using the previous configuration. The Generated Configuration JSON though is correct (with values from the former run)

@jscheffl
Copy link
Contributor Author

Overall looking good. :)

I just have an issue with multiselect field:

* Select multiple value in the `Multi Select *:`

* Submit the run

* Try to trigger again this dag using previous configuration we made for the 1st run

* The field is not properly populated. It uses the default value for the param, while we are using the previous configuration. The `Generated Configuration JSON` though is correct (with values from the former run)

You found a generic bug before this PR actually - never have seen this before. Thanks for finding. Select boxes anyway were not correctly re-populated with data when recent config was selected. Fixed now. (Detail: Just setting the value property is not sufficient, the select2 boxes need a specific call to set the data :-(

@pierrejeambrun pierrejeambrun added the AIP-50 Trigger DAG UI user Form label May 21, 2023
@bbovenzi bbovenzi added this to the Airflow 2.7.0 milestone May 22, 2023
@bbovenzi bbovenzi merged commit c25251c into apache:main May 22, 2023
@jscheffl
Copy link
Contributor Author

closes: #31869

@ephraimbuddy ephraimbuddy added the type:new-feature Changelog: New Features label Jul 6, 2023
@jscheffl jscheffl deleted the feature/31440-multi-select-and-labels-for-trigger-forms branch October 28, 2023 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AIP-50 Trigger DAG UI user Form area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:documentation type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-Select, Text Proposals and Value Labels forTrigger Forms
4 participants