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: replace deprecated chip component with tag #24594

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

nickpismenkov
Copy link

@nickpismenkov nickpismenkov commented May 18, 2024

Description

Replaced deprecated chip component with tag in recovery-phrase-chips component

Open in GitHub Codespaces

Related issues

Fixes: #20487

Manual testing steps

  1. Install extension
  2. Click "Create a new wallet"
  3. Enter password
  4. Click "Secure my wallet"
  5. Click "Reveal seed phrase"

Screenshots/Recordings

Before

Screenshot 2024-05-21 at 19 29 07

After

Screenshot 2024-05-21 at 19 22 23
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 (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.

@nickpismenkov nickpismenkov requested review from a team as code owners May 18, 2024 04:19
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
Copy link
Contributor

Hey @nickpismenkov, could you please make sure the PR description is complete and includes the manual testing steps for the reviewers? Thanks!

@nickpismenkov
Copy link
Author

nickpismenkov commented May 22, 2024

@georgewrmarshall Hi. I've completed the description. Could you please help with e2e failed tests?

Comment on lines -4 to -6
import Chip from '../../../components/ui/chip';
import Box from '../../../components/ui/box';
import Typography from '../../../components/ui/typography';
Copy link
Contributor

Choose a reason for hiding this comment

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

Replacing more deprecated components

Comment on lines -10 to +17
TypographyVariant,
TextVariant,
BorderStyle,
Size,
DISPLAY,
BorderRadius,
Display,
Copy link
Contributor

Choose a reason for hiding this comment

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

Replacing deprecated helpers

phraseRevealed: false,
};

export const PhraseRevealed = Template.bind({});
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding a Storybook story for easier isolated development

sb720.mov

@georgewrmarshall georgewrmarshall changed the title feat: replace deprecated chip component with tag in recovery-phrase-c… feat: replace deprecated chip component with tag May 24, 2024
Comment on lines -24 to -75
&__chips {
display: grid;
justify-items: center;
align-items: center;
row-gap: 16px;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));

@include design-system.screen-sm-min {
grid-template-columns: 1fr 1fr 1fr;
}

&--hidden {
filter: blur(5px);
}
}

&__secret {
position: relative;
width: 100%;
}

&__secret-blocker {
position: absolute;
top: 0;
bottom: 0;
height: 100%;
width: 100%;
background-color: var(--color-overlay-alternative);
display: flex;
flex-flow: column nowrap;
align-items: center;
justify-content: center;
padding: 8px 0 18px;
border-radius: 4px;
color: var(--color-overlay-inverse);

&--text {
margin-top: 32px;
}
}

&__chip-item {
display: flex;
flex-direction: row;
align-items: center;
text-align: center;

&__number {
font-size: design-system.$font-size-h5;
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -19,7 +19,7 @@ describe('Recovery Phrase Chips Component', () => {

const recoveryPhraseChips = queryByTestId('recovery-phrase-chips');
expect(recoveryPhraseChips).not.toHaveClass(
'recovery-phrase__chips--hidden',
'recovery-phrase-chips__chips--hidden',
Copy link
Contributor

Choose a reason for hiding this comment

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

Updating classnames to reflect whats in javascript

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.

Hey @nickpismenkov,

I did some more digging, and I think this task is a bit more complex than I initially thought. I've refactored it to align with our design system standards.

I've created a couple of other PRs that will need to be merged before this one:

Once the above PRs are merged, we can rebase and re-test. Thanks for your contribution and patience.

Blocking until above PRs have been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace deprecated Chip component with Tag from the component-library
3 participants