Add nav_top_level option for plugin nav items#67084
Open
stuart23 wants to merge 7 commits into
Open
Conversation
bbovenzi
reviewed
May 19, 2026
Contributor
bbovenzi
left a comment
There was a problem hiding this comment.
We use the word "nav" already so let's rename the variable to something like nav_top_level
Allows plugin authors to set nav_top_level=True on external_views or react_apps so the item always appears directly on the navigation toolbar rather than being grouped into the Plugins submenu. Remaining non-promoted items follow the existing rule: 2+ items go into a submenu, a single item is also shown on the toolbar (no one-item submenu). Backwards compatible — omitting the flag preserves the current behaviour exactly.
The existing test did an exact equality check on external_view response objects; now that nav_top_level (default False) is included in the serialized output, each expected dict needs the field.
276b401 to
9517f82
Compare
bbovenzi
approved these changes
May 21, 2026
Contributor
bbovenzi
left a comment
There was a problem hiding this comment.
Code looks good. Let's rebase to make the CI happy.
d2a22d6 to
49f01a2
Compare
pierrejeambrun
approved these changes
May 28, 2026
Allows plugin authors to set nav_top_level=True on external_views or react_apps so the item always appears directly on the navigation toolbar rather than being grouped into the Plugins submenu. Remaining non-promoted items follow the existing rule: 2+ items go into a submenu, a single item is also shown on the toolbar (no one-item submenu). Backwards compatible — omitting the flag preserves the current behaviour exactly.
The existing test did an exact equality check on external_view response objects; now that nav_top_level (default False) is included in the serialized output, each expected dict needs the field.
49f01a2 to
67fddbb
Compare
Member
|
Rebased the branch, lets see if CI is happy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows plugin authors to set
nav_top_level =Trueonexternal_viewsorreact_appsnav items so the item always appears directly on the navigation toolbar instead of being grouped into the Plugins submenu.Remaining non-promoted items follow the existing rule: 2+ items → submenu, 1 item → toolbar (no single-item submenu). Fully backwards compatible — omitting the field preserves the current behaviour exactly.
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.