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: design system ui updates #177

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

georgewrmarshall
Copy link
Contributor

Description

This pull request introduces updates to the HTML and CSS of the phishing detection page to improve consistency with the MetaMask design system and brand guidelines. The changes include:

  • Static font sizes: Implemented using design tokens to ensure uniform typography across the phishing page.
  • Static colors: Applied using design tokens, aligned with the MetaMask brand colors.

These updates contribute to brand integrity and trust by enhancing the visual consistency between the phishing detection page and the MetaMask extension. The page remains fully theme-enabled, with the exception of the X logo and the MetaMask phishing protection image.

Manual testing steps

  1. Navigate to the phishing detection page
  2. Verify that the font sizes and colors match the MetaMask design system.

Screenshots/Recordings

Before

before720.mov

After

after720.mov

source: require.resolve(
'@metamask/design-tokens/src/css/design-tokens.css',
),
source: require.resolve('@metamask/design-tokens/styles.css'),
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 for design tokens v4

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected] None 0 227 kB metamaskbot

🚮 Removed packages: npm/@metamask/[email protected]

View full report↗︎

@@ -23,7 +23,7 @@
"test": "yarn playwright test"
},
"dependencies": {
"@metamask/design-tokens": "^1.12.0",
"@metamask/design-tokens": "^4.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upgrading design tokens to latest. No breaking changes with CSS variables used in phishing detect https://github.com/MetaMask/design-tokens/blob/main/MIGRATION.md#from-version-300-to-400

Comment on lines -183 to -228
.custom-button {
display: inline-block;
padding: 12px 24px;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
text-align: center;
cursor: pointer;
margin: 10px;
}

.custom-proceed-button {
display: inline-block;
padding: 12px 12px;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
text-align: center;
cursor: pointer;
margin: 10px;
}

.dashboard-button {
background-color: #00ff00;
color: black;
border: none;
font-weight: 600;
}

.proceed-button {
background-color: transparent;
color: #ffffff;
border: none;
font-weight: normal;
}

.custom-button:hover {
opacity: 0.8;
}

.spacer {
height: 16px;
}

.spacer-larger {
height: 48px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing unused CSS classnames

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" data-theme="dark">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Locks phishing page to dark mode

<button class="custom-button dashboard-button" id="portfolio-link">Back to safety</button>
<button class="custom-proceed-button proceed-button" id="unsafe-continue">Proceed anyway</button>
</div>
<button class="button-primary" id="portfolio-link" data-theme="light">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Locks button to light mode to adhere to design system standards

@AugmentedMode AugmentedMode marked this pull request as ready for review October 16, 2024 19:28
@AugmentedMode AugmentedMode merged commit 4096d36 into feat/redesign-ui Oct 16, 2024
13 of 17 checks passed
@AugmentedMode AugmentedMode deleted the feat/redesign-ui-suggestions branch October 16, 2024 19:28
AugmentedMode added a commit that referenced this pull request Oct 17, 2024
* feat: new ui v1 - messy code for mvp

* feat: correct twitter logo

* chore: cleanup code

* chore: cleanup code

* chore: fixing tests

* chore: cleanup

* chore: tests now pass

* chore: cleanup comments

* chore: fixed tests for Proceed anyway

* rename portfolio button to back top safety

* fix tests

* feat: design system ui updates (#177)

* fix: redirect to portfolio so that the client handles the url

* fix: update ubuntu version

* fix: set all ubuntu ci versions to 24.04 to fix dependancy issues

* fix: bring back ubuntu-latest

* fix: try ubuntu-22 packages

* fix: bring back depends

* fix: npx playwright install-deps

* chore: remove build folder

* chore: add build folder

* test: tests now pass

---------

Co-authored-by: George Marshall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants