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

Sorting plugins custom menu links by category before name #27152

Merged

Conversation

michaelmicheal
Copy link
Contributor


In developing custom menu links through plugins, we found that our dropdown menus weren't sorted alphabetically. Digging into it a bit, I found that the menu_links are sorted by name, so the category order is currently somewhat random. Sorting by category and then name keeps the order within a category sorted alphabetically, and sorts the categories alphabetically. Made this change as a patch to our deployments of 2.2.5 and it works great.
Without change:
Screen Shot 2022-10-19 at 5 37 52 PM
With change:
Screen Shot 2022-10-19 at 4 07 41 PM

^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Oct 19, 2022
@michaelmicheal michaelmicheal changed the title Sorting plugins customer menu links by category before name Sorting plugins custom menu links by category before name Oct 19, 2022
@michaelmicheal
Copy link
Contributor Author

@ashb Any thoughts on this?

@o-nikolas
Copy link
Contributor

There was a change merged recently to standardize quoting in Airflow, you may need to rebase this PR and run static checks locally to patch those up.
You can enable pre-commit to easily run static checks on your code (readme).

@potiuk potiuk merged commit b9c30b2 into apache:main Oct 26, 2022
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:webserver Webserver related Issues type:improvement Changelog: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants