Skip to content

feat: design system ui updates#177

Merged
AugmentedMode merged 1 commit intofeat/redesign-uifrom
feat/redesign-ui-suggestions
Oct 16, 2024
Merged

feat: design system ui updates#177
AugmentedMode merged 1 commit intofeat/redesign-uifrom
feat/redesign-ui-suggestions

Conversation

@georgewrmarshall
Copy link
Copy Markdown
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

Comment thread build/index.js
source: require.resolve(
'@metamask/design-tokens/src/css/design-tokens.css',
),
source: require.resolve('@metamask/design-tokens/styles.css'),
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.

Updating for design tokens v4

@socket-security
Copy link
Copy Markdown

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

Package New capabilities Transitives Size Publisher
npm/@metamask/design-tokens@4.0.0 None 0 227 kB metamaskbot

🚮 Removed packages: npm/@metamask/design-tokens@1.13.0

View full report↗︎

Comment thread package.json
},
"dependencies": {
"@metamask/design-tokens": "^1.12.0",
"@metamask/design-tokens": "^4.0.0",
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.

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 thread static/index.css
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
Copy Markdown
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

Comment thread static/index.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" data-theme="dark">
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.

Locks phishing page to dark mode

Comment thread static/index.html
<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
Copy Markdown
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
@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 <georgewrmarshall@gmail.com>
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