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: checkbox background color #24262

Merged
merged 5 commits into from Apr 30, 2024
Merged

Conversation

georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Apr 26, 2024

Description

This PR updates the background color of the checkbox component from transparent to white across the MetaMask extension. The motivation behind this change is to enhance the visibility and contrast of the checkbox against various backgrounds, and align it with the Figma component

Component in Figma showing background default

Screenshot 2024-04-26 at 8 12 45 AM

Related issues

Fixes: N/A

Manual testing steps

To ensure the checkbox component's background color update is correctly implemented:

  1. Navigate to Checkbox in storybook
  2. Change the background color in dev tools
  3. See background color has been updated

Screenshots/Recordings

Before

before720.mov

After

after720.mov

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.
  • I’ve properly set the pull request status to "ready for review".

Pre-merge reviewer checklist

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

This PR represents a significant improvement in the usability and accessibility of the MetaMask extension, ensuring that all users can easily interact with and visually distinguish the checkbox component, regardless of the background.

@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system in Extension label Apr 26, 2024
@georgewrmarshall georgewrmarshall self-assigned this Apr 26, 2024
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.

@georgewrmarshall georgewrmarshall marked this pull request as ready for review April 26, 2024 15:29
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner April 26, 2024 15:29
@@ -66,7 +66,7 @@ exports[`Eth Sign Modal should match snapshot 1`] = `
class="mm-checkbox__input-wrapper"
>
<input
class="mm-box mm-checkbox__input mm-box--margin-0 mm-box--margin-right-2 mm-box--display-flex mm-box--background-color-transparent mm-box--rounded-sm mm-box--border-color-border-default mm-box--border-width-2 box--border-style-solid"
class="mm-box mm-checkbox__input mm-box--margin-0 mm-box--margin-right-2 mm-box--display-flex mm-box--background-color-background-default mm-box--rounded-sm mm-box--border-color-border-default mm-box--border-width-2 box--border-style-solid"
id="eth-sign-checkbox"
title="I understand that I can lose all of my funds and NFTs if I enable eth_sign requests. "
type="checkbox"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

updating snapshots

@@ -9,7 +9,7 @@ exports[`Checkbox should render the Checkbox without crashing 1`] = `
class="mm-checkbox__input-wrapper"
>
<input
class="mm-box mm-checkbox__input mm-box--margin-0 mm-box--margin-right-0 mm-box--display-flex mm-box--background-color-transparent mm-box--rounded-sm mm-box--border-color-border-default mm-box--border-width-2 box--border-style-solid"
class="mm-box mm-checkbox__input mm-box--margin-0 mm-box--margin-right-0 mm-box--display-flex mm-box--background-color-background-default mm-box--rounded-sm mm-box--border-color-border-default mm-box--border-width-2 box--border-style-solid"
type="checkbox"
/>
</span>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

updating snapshots

@metamaskbot
Copy link
Collaborator

Builds ready [c0acf58]
Page Load Metrics (297 ± 336 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6312079188
domContentLoaded86413136
load522457297699336
domInteractive86413136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 6 Bytes (0.00%)

@georgewrmarshall georgewrmarshall merged commit d15626b into develop Apr 30, 2024
71 checks passed
@georgewrmarshall georgewrmarshall deleted the fix/checkbox-background branch April 30, 2024 21:03
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2024
@metamaskbot metamaskbot added the release-11.17.0 Issue or pull request that will be included in release 11.17.0 label Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.17.0 Issue or pull request that will be included in release 11.17.0 team-design-system All issues relating to design system in Extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants