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

refactor: update brandColors to be imported from design system #9875

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

brianacnguyen
Copy link
Contributor

@brianacnguyen brianacnguyen commented Jun 5, 2024

Description

This PR updates the brand color usage to be imported from the design-tokens repo. Additionally, it updates all existing instances of brand color usage (mainly QR codes and switches) to align with the schema defined in the design-tokens. This change ensures that the application consistently uses the brand colors specified by the design system, improving maintainability and visual coherence across the application.

Related issues

Fixes: #9874

Manual testing steps

  1. Go to settings
  2. Check out the switches
  3. See white color still works

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-06-05.at.13.21.41.mp4

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • 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.

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.

@brianacnguyen brianacnguyen added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-design-system All issues relating to design system in Mobile labels Jun 5, 2024
@brianacnguyen brianacnguyen self-assigned this Jun 5, 2024
@brianacnguyen brianacnguyen requested review from a team as code owners June 5, 2024 20:28
Copy link
Contributor

github-actions bot commented Jun 5, 2024

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.

@brianacnguyen brianacnguyen requested a review from a team as a code owner June 5, 2024 20:57
Copy link

sonarcloud bot commented Jun 5, 2024

@brianacnguyen brianacnguyen changed the title refactor: update brandColors to be imported from ds refactor: update brandColors to be imported from design system Jun 5, 2024
@Cal-L Cal-L added the Run Smoke E2E Triggers smoke e2e on Bitrise label Jun 5, 2024
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.

LGTM! 🚀 Will these need to be updated again for v4? For example, brandColor.white000 to brandColor.white, etc.?

  • Checked for instances of removed white, black, and yellow colors ✅

Screenshot 2024-06-05 at 2 37 47 PM
Screenshot 2024-06-05 at 2 37 54 PM
Screenshot 2024-06-05 at 2 38 07 PM

Might be good to write a prefer-theme-color-object rule in our eslint plugin to limit the use of the brandColor object. I'll create an issue

Copy link
Contributor

github-actions bot commented Jun 5, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: e502e97
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/66f76a27-7936-49d0-a8b9-879e85df94c2

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM from platform side!

app/util/theme/index.ts Show resolved Hide resolved
@brianacnguyen
Copy link
Contributor Author

LGTM! 🚀 Will these need to be updated again for v4? For example, brandColor.white000 to brandColor.white, etc.?

  • Checked for instances of removed white, black, and yellow colors ✅

Screenshot 2024-06-05 at 2 37 47 PM Screenshot 2024-06-05 at 2 37 54 PM Screenshot 2024-06-05 at 2 38 07 PM

Might be good to write a prefer-theme-color-object rule in our eslint plugin to limit the use of the brandColor object. I'll create an issue

yes but that'll be more minor so prepping this first

@brianacnguyen brianacnguyen merged commit a26fe0b into main Jun 5, 2024
37 checks passed
@brianacnguyen brianacnguyen deleted the brandColors branch June 5, 2024 22:36
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jun 5, 2024
@metamaskbot metamaskbot added the release-7.25.0 Issue or pull request that will be included in release 7.25.0 label Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.25.0 Issue or pull request that will be included in release 7.25.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-design-system All issues relating to design system in Mobile
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[MOB] Update brandColors to be imported from design-systems
4 participants