Skip to content

chore: removing warning alternative color from codebase#25010

Merged
georgewrmarshall merged 2 commits intodevelopfrom
remove-warning-alternative
Jun 7, 2024
Merged

chore: removing warning alternative color from codebase#25010
georgewrmarshall merged 2 commits intodevelopfrom
remove-warning-alternative

Conversation

@georgewrmarshall
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall commented Jun 3, 2024

Description

This pull request removes the deprecated warning colors(warning-alternative and warning-disabled) in preparation for upgrading to design token v4.

Open in GitHub Codespaces

Related issues

Fixes: #24966

Manual testing steps

  1. Go to the storybook build of this PR
  2. Go to all stories that did use the warning alternative:
  3. See color updates are working as expected
  4. Ensure not instances of warning-alternative, warning-disabled exists

Screenshots/Recordings

All before/after screenshots and screencasts have been moved to comments for easier review. This screenshot shows no instances of warning-alternative CSS variables or enums left in the codebase

Screenshot 2024-06-03 at 2 26 34 PM
Screenshot 2024-06-03 at 2 26 17 PM

Screenshot 2024-06-03 at 2 32 41 PM
Screenshot 2024-06-03 at 2 32 53 PM

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.

@georgewrmarshall georgewrmarshall self-assigned this Jun 3, 2024
@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system in Extension label Jun 3, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 3, 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.

[ConfirmInfoRowVariant.Critical]: Color.errorAlternative,
[ConfirmInfoRowVariant.Warning]: Color.warningAlternative,
[ConfirmInfoRowVariant.Warning]: Color.warningDefault,
};
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

Before

Screenshot 2024-06-03 at 3 06 04 PM

After

Screenshot 2024-06-03 at 2 37 39 PM

[ConfirmInfoRowVariant.Critical]: Color.errorAlternative,
[ConfirmInfoRowVariant.Warning]: Color.warningAlternative,
[ConfirmInfoRowVariant.Warning]: Color.warningDefault,
};
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

Before

Screenshot 2024-06-03 at 3 05 02 PM

After

Screenshot 2024-06-03 at 2 36 37 PM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you show an example with an icon?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-06-05 at 3 09 04 PM Screenshot 2024-06-05 at 3 09 12 PM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks!

Comment on lines -102 to -105
var(--color-warning-alternative) [DEPRECATED]
var(--color-warning-muted)
var(--color-warning-inverse)
var(--color-warning-disabled) [DEPRECATED]
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

Before

before.colordocs720.mov

After

colordocs720.mov

<Box backgroundColor={BackgroundColor.warningDefault}>
<HeaderBase
marginBottom={4}
startAccessory={
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

Before

Screenshot 2024-06-03 at 3 07 04 PM

After

Screenshot 2024-06-03 at 2 38 49 PM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unblocking: i feel like these should use brand colors instead

<Footer backgroundColor={BackgroundColor.warningDefault}>
<ButtonPrimary block disabled>
Cancel
</ButtonPrimary>
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

Before

Screenshot 2024-06-03 at 3 07 58 PM Screenshot 2024-06-03 at 3 08 19 PM

After

Screenshot 2024-06-03 at 2 39 58 PM Screenshot 2024-06-03 at 2 40 15 PM

'error-inverse': --color-error-inverse,
'error-disabled': --color-error-disabled,
'warning-default': --color-warning-default,
'warning-alternative': --color-warning-alternative,
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

No instances of warning-alternative remain in codebase

Screenshot 2024-06-03 at 2 26 34 PM

'warning-alternative': --color-warning-alternative,
'warning-muted': --color-warning-muted,
'warning-inverse': --color-warning-inverse,
'warning-disabled': --color-warning-disabled,
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

No instances of warning-disabled remain in codebase

Screenshot 2024-06-03 at 2 32 41 PM

errorInverse = 'error-inverse',
errorDisabled = 'error-disabled',
warningDefault = 'warning-default',
warningAlternative = 'warning-alternative',
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

No instances of warningAlternative remain in codebase

Screenshot 2024-06-03 at 2 26 17 PM

warningAlternative = 'warning-alternative',
warningMuted = 'warning-muted',
warningInverse = 'warning-inverse',
warningDisabled = 'warning-disabled',
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

No instances of warningDisabled remain in codebase

Screenshot 2024-06-03 at 2 32 53 PM

&:active {
border-color: var(--color-warning-alternative);
border-color: var(--color-warning-default);
}
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

Before

before.button.mov

After

after.buttonwarning720.mov

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't the text be colored as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good question. This is from a deprecated button that I believe isn't used anywhere, so I'm just keeping it consistent with what is currently there. See Before screencast

Screenshot shows no usage of type warning for a button component

Screenshot 2024-06-05 at 3 10 48 PM


&__average {
color: var(--color-warning-alternative);
color: var(--color-warning-default);
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

Before

Screenshot 2024-06-03 at 2 57 56 PM Screenshot 2024-06-03 at 2 58 38 PM

After

Small improvement to accessibility color contrasts here

Screenshot 2024-06-03 at 2 53 44 PM Screenshot 2024-06-03 at 2 54 12 PM

errorAlternative = 'error-alternative',
errorMuted = 'error-muted',
warningDefault = 'warning-default',
warningAlternative = 'warning-alternative',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same as above

errorAlternative = 'error-alternative',
errorMuted = 'error-muted',
warningDefault = 'warning-default',
warningAlternative = 'warning-alternative',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same as above

@georgewrmarshall georgewrmarshall marked this pull request as ready for review June 3, 2024 22:11
@georgewrmarshall georgewrmarshall requested review from a team as code owners June 3, 2024 22:11
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [25bb804]
Page Load Metrics (54 ± 5 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6910185115
domContentLoaded9271252
load427654105
domInteractive9271252

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.71%. Comparing base (63851c9) to head (25bb804).
Report is 54 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #25010      +/-   ##
===========================================
- Coverage    65.71%   65.71%   -0.00%     
===========================================
  Files         1368     1368              
  Lines        54388    54384       -4     
  Branches     14150    14150              
===========================================
- Hits         35739    35735       -4     
  Misses       18649    18649              

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

Copy link
Copy Markdown
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.

a few small comments

@georgewrmarshall georgewrmarshall added the needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. label Jun 6, 2024
@georgewrmarshall georgewrmarshall merged commit 29db397 into develop Jun 7, 2024
@georgewrmarshall georgewrmarshall deleted the remove-warning-alternative branch June 7, 2024 19:53
@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 7, 2024
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. release-12.1.0 Issue or pull request that will be included in release 12.1.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.

chore: remove all instances of deprecated warning colors

4 participants