-
Notifications
You must be signed in to change notification settings - Fork 5k
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 accounts menu styling #8707
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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.
Why
screen
andmax-width
? This is a height issue. And why575px
? The popup has a height of 600px, but it looks like the menu is cut off until it gets above ~625px or soThere 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 just followed the other media queries in the file, all of which seem to be about handling the popup UI, and all of which use
@media screen
, and thenmax-width
ormin-width
. See: https://github.com/MetaMask/metamask-extension/blob/develop/ui/app/components/app/account-menu/index.scssThere 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.
In fact, there are 177 existing media queries in our code base, and ~175 of them use
@media screen and [max-|min-]width
. Ifmax-width
, the value is (almost?) always575px
.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 not sure what that has to do with this situation; I don't know what each of those are intended for. The other examples in this file of setting
max-height
in amax-width
media query block also seem strange to me, but it's hard to say without knowing what they're intended to do.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.
imo we'd target height here in the media query. It seems like having a discussion on media query formats and pulling those queries into some variables in SCSS would be a good idea in the long term.
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.
Very well; although I think we can pretty safely say that the purpose of those media queries is to apply styles to the popup UI, since their effect is to apply styles to the popup UI, and we'd expect to see such queries all over the codebase.
Whatever the case, we can address it later like Brad suggested.
Changed to
max-height: 600px
query in b98e0a9, since 600px is the height of the popup UI. It works.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.
This is certainly an improvement, but it still leaves the
Settings
menu option obscured when the window is between600px
and625px
, as uncommon as those heights may be.If we would prefer keeping the media queries restricted to certain screen sizes to simplify testing, we could pursue alternate solutions like setting a
max-height
based upon the viewport height.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.
Ah, now I see what you mean. Sorry about that. I'll create an issue attempting to document these concerns. Ref: #8711