Skip to content

Add section_collapsed param to control default accordion state#61968

Open
fenix7 wants to merge 2 commits intoapache:mainfrom
fenix7:feature/section-collapsed-param
Open

Add section_collapsed param to control default accordion state#61968
fenix7 wants to merge 2 commits intoapache:mainfrom
fenix7:feature/section-collapsed-param

Conversation

@fenix7
Copy link

@fenix7 fenix7 commented Feb 15, 2026

Summary

  • Add section_collapsed boolean property to the Param schema, allowing DAG authors to control which sections in the trigger form start collapsed
  • Sections with section_collapsed=True on their first param start collapsed; others start expanded
  • When no section uses the flag, existing default behavior is preserved (only "Run Parameters" expanded)
  • Add multiple to Accordion.Root so multiple sections can be open simultaneously
  • Demonstrate the feature in example_params_ui_tutorial.py on the "Special advanced stuff with form fields" section

Test plan

  • Run frontend unit tests (pnpm test) — 92/93 passing (1 pre-existing failure unrelated to this change)
  • Open the trigger form for the example_params_ui_tutorial DAG and verify "Special advanced stuff with form fields" starts collapsed
  • Verify all other sections start expanded by default
  • Verify sections can be manually expanded/collapsed by clicking
  • Verify that DAGs without section_collapsed retain the original behavior

…DAG trigger form

Allow DAG authors to define which param sections start collapsed in the
trigger form by setting section_collapsed=True on a Param. Sections
without this flag (or with section_collapsed=False) start expanded.
When no section uses the flag, the existing default behavior is preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 15, 2026

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Feb 15, 2026
Four sections with different collapsed states:
- "Basic settings" and "Notification settings" start expanded
- "Advanced options" and "Debug" start collapsed (section_collapsed=True)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant