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

fix: fix padding tab, should be 16px #8146

Merged
merged 3 commits into from
Jan 9, 2024
Merged

fix: fix padding tab, should be 16px #8146

merged 3 commits into from
Jan 9, 2024

Conversation

salimtb
Copy link
Contributor

@salimtb salimtb commented Dec 18, 2023

Description

Currently segmented controls on wallet view, import token view, network view have no paddings on the side. Need to match designs and have 16px paddings on each side.
On import token view and network view, copies for segments are in all caps. Should be using normal sentence case (e.g. "Custom networks" instead of "CUSTOM NETWORKS"), font "Body-MD-Medium", and color "text/default" & "primary/default".

Related issues

Fixes: #8060

Manual testing steps

  1. Wallet view: open the app and you are on the default wallet view.
  2. Import token view: click on "Import tokens" on the wallet view
  3. Network view: click on the network picker on the top of the wallet view, then click "Add Network"

Screenshots/Recordings

Before

before.mov

After

Screen.Recording.2024-01-03.at.13.03.50.mov

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@salimtb salimtb added design-review Any feature that needs feedback from the design team needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead need-ux-ds-review A label to be used for design system and UX PR review team-assets Run Smoke E2E labels Dec 18, 2023
@salimtb salimtb requested a review from a team as a code owner December 18, 2023 18:13
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.

Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/51c1e3e1-7e22-4c00-b364-2dca8a9a9ead
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link
Contributor

@brianacnguyen brianacnguyen left a comment

Choose a reason for hiding this comment

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

that looks a lot cleaner! from what I can see from the design link below, do you think you can align the vertical padding, font styles, font colors, and bottom border color of each tab item?
https://www.figma.com/file/9s1RkDrGQYNhtJrsqvfNJW/MC-(Multichain)-mobile-v0.75?type=design&node-id=9-6412&mode=design&t=bb3vLdTNM6W0VdJp-0

@wachunei
Copy link
Member

The app currently shows the scroll view edge to edge, this solution introduces a wrapper that changes this behavior, adding a padding to the main views. I just want to point this out and make sure DS team is ok with this.

@salimtb
Copy link
Contributor Author

salimtb commented Dec 19, 2023

that looks a lot cleaner! from what I can see from the design link below, do you think you can align the vertical padding, font styles, font colors, and bottom border color of each tab item? https://www.figma.com/file/9s1RkDrGQYNhtJrsqvfNJW/MC-(Multichain)-mobile-v0.75?type=design&node-id=9-6412&mode=design&t=bb3vLdTNM6W0VdJp-0

@brianacnguyen done

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (445ef2b) 39.65% compared to head (f0fe050) 39.65%.

Files Patch % Lines
app/components/Views/AddAsset/AddAsset.tsx 50.00% 1 Missing ⚠️
...Settings/NetworksSettings/NetworkSettings/index.js 0.00% 1 Missing ⚠️
app/components/Views/Wallet/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8146   +/-   ##
=======================================
  Coverage   39.65%   39.65%           
=======================================
  Files        1233     1233           
  Lines       29820    29820           
  Branches     2840     2840           
=======================================
  Hits        11824    11824           
  Misses      17307    17307           
  Partials      689      689           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brianacnguyen
Copy link
Contributor


The app currently shows the scroll view edge to edge, this solution introduces a wrapper that changes this behavior, adding a padding to the main views. I just want to point this out and make sure DS team is ok with this.

Thank you for notifying me about this. Can you double check with the designer first to make sure it's what the designer want?
If it isn't what the designer want and the padding is meant to be added to the tabs only, you can move the View with the added horizontalPadding to the renderTabBar to isolate the paddings to the tab bar only

@yanrong-chen
Copy link

Hi @salimtb - Thank you for checking with me. Ideally the goal is to add paddings to tab bar only as @brianacnguyen suggested.

@salimtb
Copy link
Contributor Author

salimtb commented Jan 3, 2024

the changes suggested after the design review are done , i also updated the recorded video
cc @brianacnguyen @yanrong-chen

Copy link
Contributor

@brianacnguyen brianacnguyen left a comment

Choose a reason for hiding this comment

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

Everything looks good! Just 1 last comment regarding text style

app/components/Views/AddAsset/AddAsset.styles.ts Outdated Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Jan 8, 2024

@salimtb salimtb requested a review from brianacnguyen January 8, 2024 22:17
@salimtb salimtb merged commit 7330e5f into main Jan 9, 2024
26 checks passed
@salimtb salimtb deleted the fix/padding-tabs branch January 9, 2024 18:57
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jan 9, 2024
@metamaskbot metamaskbot added the release-7.15.0 Issue or pull request that will be included in release 7.15.0 label Jan 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design-review Any feature that needs feedback from the design team need-ux-ds-review A label to be used for design system and UX PR review release-7.15.0 Issue or pull request that will be included in release 7.15.0 team-assets team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Add paddings to the segmented control and use sentence case instead of all caps
8 participants