stuart23 opened a new pull request, #67084: URL: https://github.com/apache/airflow/pull/67084
## Summary - Adds a new `promote_to_toolbar` field (`bool`, default `False`) to both `external_views` and `react_apps` plugin nav items - When `True`, the item is always rendered 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 **Examples of the new behaviour:** | Setup | Result | |---|---| | 2 plugins, neither promoted | submenu (unchanged) | | 1 plugin, not promoted | toolbar (unchanged) | | 2 plugins, 1 promoted | both on toolbar (avoids single-item submenu) | | 3 plugins, 1 promoted | promoted on toolbar + submenu for the other 2 | ## Changes - `airflow-core/src/airflow/api_fastapi/core_api/datamodels/plugins.py` — adds `promote_to_toolbar: bool = False` to `BaseUIResponse` - `airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml` — adds field to OpenAPI spec - `airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts` + `schemas.gen.ts` — regenerated from updated spec (`pnpm codegen`) - `airflow-ctl/src/airflowctl/api/datamodels/generated.py` — regenerated - `airflow-core/src/airflow/ui/src/layouts/Nav/PluginMenus.tsx` — updated rendering logic - `airflow-core/src/airflow/ui/src/layouts/Nav/PluginMenus.test.tsx` — 9 new tests covering all cases - `airflow-core/docs/administration-and-deployment/plugins.rst` — documents the new field in both `external_view_with_metadata` and `react_app_with_metadata` examples ## Test plan - [x] All 9 new `PluginMenus.test.tsx` tests pass (`pnpm test`) - [x] All pre-commit hooks pass locally (TypeScript compile, mypy, ruff, ESLint, Prettier, bandit, etc.) - [ ] `generate-openapi-spec` hook requires Breeze Docker CI image — will be verified by CI 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
