-
Notifications
You must be signed in to change notification settings - Fork 75
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
Fix data menu cutoff in smaller viewers #2630
Merged
haticekaratay
merged 8 commits into
spacetelescope:main
from
haticekaratay:data-menu-resize
Feb 6, 2024
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ff92e2c
Scroll when data menu list gets longer
haticekaratay 1eaeaf0
Add dynamic menu position update - in progress
haticekaratay d6af23d
Menu scrolls with the viewer but location needs update
haticekaratay fa00ac7
Sync with the main
haticekaratay 625800a
Dynamically position the menu with the button
haticekaratay 01e7580
Add a change log
haticekaratay bab8f5f
Remove redundant ref
haticekaratay a3817ca
Add unique viewer IDs to buttons for improved specificity
haticekaratay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised that this doesn't need viewer id as well.... is that just because we currently hardcode the heights of the menus (and therefore they're all the same)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely right, the use of a single ID across all viewers stems from their menus having a uniform hardcoded height of 42 px. Initially, I considered directly using the value, but opted for a slightly less coupled approach :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, technically there are still multiple elements with this same ID, and it probably just grabs the first one (right?), but I think that's fine for now since we keep the same height. Might just be worth a comment in-line (either here or where the id is set) in case we ever have different heights per-menu. Or if it's just as easy to append the viewer id in both places, then that is a little more future-proofed.