Skip to content
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

feat: aggregated balance UI #27161

Merged

Conversation

sahar-fehri
Copy link
Contributor

@sahar-fehri sahar-fehri commented Sep 16, 2024

Description

Aggregated balance UI feature;

This PR fixed UI designs related to the aggregated balance feature;
It also fixes the popover behavior;
Users should be able to see the popover by default and should see it only once.

Open in GitHub Codespaces

Related issues

Fixes:
Related:
https://www.figma.com/design/aMYisczaJyEsYl1TYdcPUL/Portfolio-View?node-id=4098-126757&node-type=instance&focus-id=4186-130770&m=dev
https://www.figma.com/design/aMYisczaJyEsYl1TYdcPUL/Portfolio-View?node-id=4496-20506&node-type=FRAME&m=dev

Manual testing steps

  1. After a new user is onboarded or upgraded, they should be able to see the aggregated balance popover.
  2. Close the popover. Make sure you are not able to see the popover again even after turning on and off the new setting "show native token as main balance"

Screenshots/Recordings

Before

After

Screen.Recording.2024-09-17.at.14.02.40.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@sahar-fehri sahar-fehri changed the base branch from develop to feat/aggregated-balance-feature September 16, 2024 09:36
@sahar-fehri sahar-fehri changed the title Feat/aggregated balance UI feat: aggregated balance UI Sep 16, 2024
Copy link

sonarcloud bot commented Sep 16, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [7bb8de9]
Page Load Metrics (1813 ± 83 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint25823681741378181
domContentLoaded15952241177115474
load16132382181317383
domInteractive158446178
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.1 KiB (0.03%)
  • ui: 3.63 KiB (0.05%)
  • common: 247 Bytes (0.00%)

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Sahar, this is looking great, I'm just blocking this because I think there is an unnecessary update to a design system component that we may not want to include until we get confirmation. Also there are some other comments that should help maintain consistency and clean code. Happy to pair also!

@metamaskbot
Copy link
Collaborator

Builds ready [34b2a84]
Page Load Metrics (1641 ± 63 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22121431377574276
domContentLoaded14581966162111655
load14612059164113163
domInteractive11240434723
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.1 KiB (0.03%)
  • ui: 3.56 KiB (0.05%)
  • common: 247 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [52a8669]
Page Load Metrics (1556 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint21719191496316152
domContentLoaded13531911154111957
load13621921155612158
domInteractive13161473818
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.1 KiB (0.03%)
  • ui: 3.35 KiB (0.05%)
  • common: 247 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [fa835b1]
Page Load Metrics (1733 ± 78 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint26321471661364175
domContentLoaded13992060170816177
load14072094173316278
domInteractive25158603215
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.1 KiB (0.03%)
  • ui: 3.35 KiB (0.05%)
  • common: 247 Bytes (0.00%)

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Sahar, feel free to merge to unblock, but just a heads up—using static CSS for font-size and font-weight is a code smell for the design system. We shouldn’t need to use those at all. We might even want to create a stylelint rule to prevent their usage. It's more likely the design isn't using the correct Figma library for Typography. If you remove all static declarations for font-size and font-weight, it will be design system approved! cc @amandaye0h

@metamaskbot
Copy link
Collaborator

Builds ready [a771b75]
Page Load Metrics (1745 ± 96 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14052123174119594
domContentLoaded13982112171619091
load14062130174519996
domInteractive1395472010
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.1 KiB (0.03%)
  • ui: 3.31 KiB (0.05%)
  • common: 201 Bytes (0.00%)

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great! Thank you for your diligence and openness to design system suggestions. I noticed a few small consistency updates were included, such as the settings headings. Breaking these changes into a separate PR would help with the review process, allow design system engineers to focus on details, and reduce the size of this PR. Just a suggestion for the future!

@@ -3,7 +3,7 @@
.dropdown {
position: relative;
display: inline-block;
height: 36px;
height: 48px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worth doing a check of all the instances that this might effect to ensure there are no visual regressions

@@ -1558,6 +1558,11 @@ export const getConnectedSitesList = createDeepEqualSelector(
},
);

export function getShouldShowAggregatedBalancePopover(state) {
console.log('state.metamask', state.metamask);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this log?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fine with you handling this on your feature branch so we don't block here.

@@ -74,6 +74,7 @@ export default class AppStateController extends EventEmitter {
// States used for displaying the changed network toast
switchedNetworkDetails: null,
switchedNetworkNeverShowMessage: false,
shouldShowAggregatedBalancePopover: true, // by default user should see popover;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be cool one day if we could scope all of these "onboarding" related state variables within a single object, like onboardingState: {} to make it easier to understand which vars are related to onboarding vs what's related to the root level metamask state (unrelated to onboarding)

Copy link
Contributor

@gambinish gambinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna approve this as is. As we discussed, there's an issue where the popover doesn't show on Testnet (works as expected on Mainnet). May want to verify behavior with Product here.

Feel free to address this, along with my other console.log nit on your feature branch. If you end up making changes here just ping me on slack so I can re-approve.

@bergeron
Copy link
Contributor

I think fullscreen looks a little worse than before, being left aligned with all that space. That said, I don't have a perfect suggestion for what it should do instead.

Screenshot 2024-09-19 at 3 27 34 PM

@gambinish
Copy link
Contributor

gambinish commented Sep 19, 2024

I think fullscreen looks a little worse than before, being left aligned with all that space. That said, I don't have a perfect suggestion for what it should do instead.

Screenshot 2024-09-19 at 3 27 34 PM

I also noticed this. This is per the designs spec though. I also felt like it was a bit jarring (maybe I'll get used to it)

Maybe the monetization buttons can get flexed to the right of the window, rather than be vertical aligned...

@sahar-fehri sahar-fehri merged commit b3e3fa2 into feat/aggregated-balance-feature Sep 20, 2024
70 checks passed
@sahar-fehri sahar-fehri deleted the feat/aggregated-balance-ui branch September 20, 2024 12:28
@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2024
@sahar-fehri
Copy link
Contributor Author

I think fullscreen looks a little worse than before, being left aligned with all that space. That said, I don't have a perfect suggestion for what it should do instead.
Screenshot 2024-09-19 at 3 27 34 PM

I also noticed this. This is per the designs spec though. I also felt like it was a bit jarring (maybe I'll get used to it)

Maybe the monetization buttons can get flexed to the right of the window, rather than be vertical aligned...

I think Amanda and Hester are aligned on this; this is not the final state but its an okay state for couple of weeks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants