-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(AppMenu): Prevent menu entries from jumping on hover #47203
Conversation
susnux
commented
Aug 13, 2024
- Resolves [Bug]: Content shift when mouse is over top menu elements #47148
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.
Same as @Pytal noted – we could make the hovered/active app wider (like now) just without shifting the labels left and right if it, if possible? So that they keep centered below their icon.
@jancborchardt if we make the hovered wider, without shifting, then everything will move. If you hover the middle entry of 3 app, then the right one will move to the right because the hovered grows. So the problem here is, that the current version (not this PR) is shrinking & expanding items, but to prevent visual jumping the app icon is always kept on the same place (so it is not centered anymore but at least you do not see that jumping). Due to the animation the sizes are animated and when you move your mouse two items are animated in different states -> causing the problem that this PR should solve. This PR is not growing the item anymore, but instead just expand the label -> no weird hover states anymore so no jumping. But if the app text is small this causes this issue, so I could adjust it to only shrink / grow if needed (so the hovered text is ellipsed), but this is then not CSS only anymore and needs some JS. |
@susnux so by making it wider I also only mean the text label, not the whole entry (so there is no jumping). (Ideal would be some overlap or fade into transparency of the neighbor items, but these don't work with non-plain backgrounds.) |
@jancborchardt maybe like this:
The problem with 2 is, that now the label needs to be quite small (we "waste" the space on one side). Bildschirmaufnahme_20240814_120108.webm(commit pushed) |
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.
Only grow and shrink app menu entry if needed Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
373695b
to
44705ab
Compare