-
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
Implement asset page #8696
Implement asset page #8696
Conversation
2d3f2ea
to
091e782
Compare
c814567
to
aede31f
Compare
64cb6fc
to
aa4b0c5
Compare
05bfe32
to
cc2720c
Compare
Builds ready [cc2720c]
Page Load Metrics (602 ± 29 ms)
|
Fantastic! This will take some time to review of course, but one initial piece of feedback: Were there any designs for the asset rows being highlighted on hover, with a link/pointer cursor? I imagine we want at least the pointer cursor, but a subtle highlight would be best, IMO. |
Yes, good point! The hover state was in the design and is missing. Cursor pointer seems appropriate as well. I'll add those |
I've updated the asset list items to have a grey background on hover, These things are still TODO:
None of these seem trivial, nor do they seem like blockers, so I'd prefer to deal with them in a future PR if possible to avoid blocking the RC, and to keep this monstrously sized PR from getting any larger |
Builds ready [7861a2a]
Page Load Metrics (521 ± 58 ms)
|
Q: Should clicking on ETH show only ETH transactions? I know in the previous version of the UI clicking ETH was just like 'unselecting' a token, but with the new UI and the header "Account 1 / ETH" I'm not sure I'd expect token transactions to show up. -- Not at all a blocker for merge just curious. |
Yes, that was the intention for now, since all transactions use Eth for gas. It seemed strange to allow the eth balance to change without showing why it changed in the transaction history. Maybe we should filter out signature requests in that view though? 🤔 🤷♂️ I hadn't thought of that, since they're only shown when pending. |
Perhaps. Maybe, in a later iteration, we can highlight token transfers on the eth screen in some way that makes it evident that they are token transfers, but that indicates the gas prices paid in eth. |
Yeah, perhaps by showing the gas cost instead of the token balance that was transferred. I was just thinking that too. Not sure how to make clear that it's the gas price we're showing though, and not the transfer amount converted to Eth. |
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
A new page has been created for viewing assets. This replaces the old `selectedToken` state, which previously would augment the home page to show token-specific information. The new asset page shows the standard token overview as seen previously on the home page, plus a history filtered to show just transactions relevant to that token. The actions that were available in the old token list menu have been moved to a "Token Options" menu that mirrors the "Account Options" menu. The `selectedTokenAddress` state has been removed, as it is no longer being used for anything. `getMetaMetricState` has been renamed to `getBackgroundMetaMetricState` because its sole purpose is extracting data from the background state to send metrics from the background. It's not really a selector, but it was convenient for it to use the same selectors the UI uses to extract background data, so I left it there for now.
The `history` store tracks state related to browser history. The most recent "overview" page (i.e. the home page or the asset page) is currently being tracked, so that actions taken from the asset page can return the user back to the asset page when the action has finished.
This action also handles clearing other `send` state relating to tokens when switching back to the native currency.
The asset list items now have borders, a grey background on hover, and a pointer cursor.
The `.asset__container` element doesn't need to set `overflow-y` or any scrollbar-related rules because that element doesn't have a defined `height` or `max-height`; it can grow as long as it wants. There can be no overflow, and no scrollbar.
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
Why do we use the history state/ducks (i.e. |
|
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.
Great work!
Builds ready [d07d54b]
Page Load Metrics (834 ± 81 ms)
|
* origin/develop: (689 commits) Implement asset page (#8696) fix crash on signature request (#8709) Fix accounts menu styling (#8707) Delete docs/porting_to_new_environment.md (#8704) Remove unused `getToErrorObject` parameters (#8705) hide connected-status on metamask ext (#8703) Stop adding permissions middleware to trusted connections (#8701) Use `send` state for send flow token (#8695) do not display extension id in connection modal (#8699) Fix tab content disappearing during scrolling on macOS Firefox (#8702) close details when button is pressed (#8694) Refactor token selectors (#8671) Update eth_accounts permission description (#8693) Extract selected token from token input (#8692) Fix propType for Home defaultHomeActiveTabName (#8683) Fix create account form styling (#8689) Remove unused `getSelectedTokenAssetImage` selector (#8691) Remove `getTxParams` (#8676) do not show account mismatch alert on details (#8678) Fix connect hardware styling (#8680) ...
A new page has been created for viewing assets. This replaces the old
selectedToken
state, which previously would augment the home page to show token-specific information.The new asset page shows the standard token overview as seen previously on the home page, plus a history filtered to show just transactions relevant to that token.
The actions that were available in the old token list menu have been moved to a "Token Options" menu that mirrors the "Account Options" menu.
The
selectedTokenAddress
state has been removed, as it is no longer being used for anything.A new Redux store has been added to track state related to browser history. The most recent "overview" page (i.e. the home page or the asset page) is currently being tracked, so that actions taken from the asset page can return the user back to the asset page when the action has finished.