-
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
Update account options menu design #8654
Conversation
This was done now because a separate change I was working on locally relating to the asset page resulted in the position of the account options menu being totally broken. Instead of fixing that issue, I figured we'd might as well replace the whole thing. |
61e5601
to
c89ffaa
Compare
Here are the new designs I was following: https://www.figma.com/file/b8U583mpXW1FsPWfGFNT8C/Wallet-home-(popup-%2B-fullscreen)?node-id=217%3A104 |
c89ffaa
to
f0a3f52
Compare
Builds ready [f0a3f52]
Page Load Metrics (599 ± 50 ms)
|
f0a3f52
to
6557f5e
Compare
The `AccountDetailsDropdown` component has been rewritten to use the new `Menu` component, and to follow the latest designs. This should be functionally equivalent. A couple of the icons have changed, but that's about it. Support for a subtitle was added to `MenuItem` to support the `origin` subtitle used for the explorer link for custom RPC endpoints. A few adjustments were required to `test/helper.js` to accommodate the use of `Menu` from a JSDOM context (this is the first time it's been used in a unit test). A `popover-content` element was added to the fake DOM, and another global was added that `react-popper` used internally. An additional driver method (`clickPoint`) was added to the e2e driver to allow clicking the background behind the menu to dismiss it. This wasn't possible using the `clickElement` method, because that method would refuse to click an obscured element. The only non-obscured element to click was the menu backdrop, and that didn't work either because the center was obscured by the menu (Selenium clicks the center of whichever element is targeted).
6557f5e
to
77d6f9e
Compare
Builds ready [77d6f9e]
Page Load Metrics (657 ± 51 ms)
|
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.
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.
LGTM!
The
AccountDetailsDropdown
component has been rewritten to use the newMenu
component, and to follow the latest designs.This should be functionally equivalent. A couple of the icons have changed, but that's about it.
Support for a subtitle was added to
MenuItem
to support theorigin
subtitle used for the explorer link for custom RPC endpoints.A few adjustments were required to
test/helper.js
to accommodate the use ofMenu
from a JSDOM context (this is the first time it's been used in a unit test). Apopover-content
element was added to the fake DOM, and another global was added thatreact-popper
used internally.An additional driver method (
clickPoint
) was added to the e2e driver to allow clicking the background behind the menu to dismiss it. This wasn't possible using theclickElement
method, because that method would refuse to click an obscured element. The only non-obscuredelement to click was the menu backdrop, and that didn't work either because the center was obscured by the menu (Selenium clicks the center of whichever element is targeted).