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

css, cap dropdown menu size dynamically #28736

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

michaelmicheal
Copy link
Contributor

In this PR: #28561, I capped the dropdown menu size to 300px and made it scrollable past there. Instead, we should cap it at 85%.
Screen Shot 2023-01-04 at 1 56 38 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 area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Jan 4, 2023
@uranusjr
Copy link
Member

uranusjr commented Jan 5, 2023

Would it be a good idea to use min here? 85vh can be quite long in some situations.

@j-martin
Copy link
Contributor

j-martin commented Jan 5, 2023

In this case, the 85vh is only ever reached if the menu items count is significant enough. Prior to #28561, the menu could be much longer than the browser viewport (so > 100vh). With this in mind the change here is better than the current behavior.

If I interpret your suggestion properly we'd have something like min(85vh, 500px). As a users, I would rather have 85vh so I can see all the menu items if they fit in my viewport.

For context, we programmatically generate menu items to different projects (dag bags) and there can be a lot of them:

image

@potiuk potiuk merged commit 455d05d into apache:main Jan 5, 2023
@pierrejeambrun pierrejeambrun added the type:improvement Changelog: Improvements label Jan 9, 2023
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. area:webserver Webserver related Issues type:improvement Changelog: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants