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

Part of #18714 and #17670: Changes to nfts-detection-notice.js #19051

Merged
merged 2 commits into from
May 15, 2023

Conversation

dhruvv173
Copy link
Contributor

@dhruvv173 dhruvv173 commented May 8, 2023

Explanation

This PR is a part of #18714 and #17670
Replaced Typography with Text component and deprecated Typography consts with enums for the file: nfts-detection-notice.js

  • ui/components/app/nfts-detection-notice/nfts-detection-notice.js

Screenshots/Screencaps

Before

image

After

image

Manual Testing Steps

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@dhruvv173 dhruvv173 requested a review from a team as a code owner May 8, 2023 11:22
@dhruvv173 dhruvv173 requested a review from adonesky1 May 8, 2023 11:22
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

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.

@dhruvv173
Copy link
Contributor Author

dhruvv173 commented May 8, 2023

Hey @georgewrmarshall
Please review this PR. The nfts-detection-notice.js does not exist on Storybook so I couldnt attach the before/after screenshots.
Thanks!

Edit: 2 of my PRs today are failing are failing Label PR test due to (Resource not accessible by integration) error, otherwise everything works fine.

@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system in Extension label May 9, 2023
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 @dhruvv173, code is looking good but could you please add some before/ after screenshots to ensure that there are no visual regressions as outlined in the acceptance criteria for the issue. Thanks!

@georgewrmarshall
Copy link
Contributor

georgewrmarshall commented May 9, 2023

Hey @georgewrmarshall Please review this PR. The nfts-detection-notice.js does not exist on Storybook so I couldnt attach the before/after screenshots. Thanks!

Edit: 2 of my PRs today are failing are failing Label PR test due to (Resource not accessible by integration) error, otherwise everything works fine.

You can create a story if you like. Documentation here: https://metamask.github.io/metamask-storybook/?path=/story/getting-started-documentation-guidelines--page#creating-a-story

No need for arg types or MDX docs

import React from 'react';
import NftsDetectionNotice from '.';

export default {
  title: 'Components/App/NftsDetectionNotice',
};

export const DefaultStory = () => <NftsDetectionNotice />;

DefaultStory.storyName = 'Default';

Will render

Screenshot 2023-05-09 at 5 03 44 PM

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 @dhruvv173, I've added a story so we can do a visual check. It LGTM! Thanks for your contribution

Screenshot 2023-05-09 at 5 03 44 PM

@dhruvv173
Copy link
Contributor Author

Hey @dhruvv173, I've added a story so we can do a visual check. It LGTM! Thanks for your contribution

Screenshot 2023-05-09 at 5 03 44 PM

Hey @georgewrmarshall, I have added the before/after screenshots. The before screenshot is taken from the story which was built by you and the after one is from my local build. As you have added a new file is there a need to re-run the PR from my side?
Thanks!

@georgewrmarshall
Copy link
Contributor

georgewrmarshall commented May 9, 2023

I think what you've done here is add 2 screenshots of the "After" changes. What you would need to do is create the story on the develop branch and take a screenshot there. No need to update this PR the code is good to go.

@dhruvv173
Copy link
Contributor Author

I think what you've done here is add 2 screenshots of the "After" changes. What you would need to do is create the story on the develop branch and take a screenshot there. No need to update this PR the code is good to go.

Should I create a new fork, add the code for story there, run yarn storybook and then add the screenshots?
Sorry for the inconvenience caused :/

@georgewrmarshall
Copy link
Contributor

@dhruvv173 yes that sounds right. It should be off of the develop branch

@dhruvv173
Copy link
Contributor Author

@dhruvv173 yes that sounds right. It should be off of the develop branch

Updated it, could you please check it once?

@dhruvv173
Copy link
Contributor Author

Hey @georgewrmarshall
I was working on file named gas-timing.component, replaced Typography with Text, added the new enums and created a story as it does not exist already but it does not load anything (refer the image below)
image
image

added the story file below
image

or is it because the snapshot of gas-timing.component.test.js.snap has just one <div /> tag ?
image

I also tried updating the screenshot with yarn jest ui/components/app/gas-timing --updateSnapshot command but that didnt work either.
Could you please check this once?
Thank you!

@georgewrmarshall
Copy link
Contributor

Hey @dhruvv173, you have to pass the component the write data either through props or mock redux state using the decorator and provider.

@dhruvv173
Copy link
Contributor Author

Hey @dhruvv173, you have to pass the component the write data either through props or mock redux state using the decorator and provider.

Okay I'll do that and submit a PR.
Could you please check this #19115 once when possible?
Thanks!

@garrettbear garrettbear merged commit 5135b80 into MetaMask:develop May 15, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2023
@dhruvv173 dhruvv173 deleted the Part-of-#18714-and-#17670 branch July 25, 2023 10:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
external-contributor team-design-system All issues relating to design system in Extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants