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

creating story for cancel button #19566

Merged
merged 1 commit into from
Jun 20, 2023
Merged

Conversation

rohiiittttt
Copy link
Contributor

Explanation

Screenshots/Screencaps

image
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.

@rohiiittttt rohiiittttt requested a review from a team as a code owner June 12, 2023 08:20
@rohiiittttt rohiiittttt requested a review from jpuri June 12, 2023 08:20
@github-actions
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 georgewrmarshall added the team-design-system All issues relating to design system in Extension label Jun 12, 2023
@georgewrmarshall georgewrmarshall requested review from georgewrmarshall and garrettbear and removed request for jpuri June 12, 2023 19:25
Copy link
Contributor

@garrettbear garrettbear left a comment

Choose a reason for hiding this comment

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

Thanks for helping out @rohiiittttt

Our old Button is not a 1 to 1 transition to the new Button. I've made a few comments on changes to closely align.

But upon looking at this and with the recommended changes, there still might be some concerns about the font size of our new button when next to an old button.

Before
Screenshot 2023-06-15 at 1 11 48 PM

After
Screenshot 2023-06-15 at 1 22 16 PM

This will begin to make this PR a bit larger since now the Primary buttons paired next to the CancelButton also need to be updated to the latest version.

With that being all said, you are still welcome to add the cancel-button.stories.js file and undo any changes to cancel-button.js

},
},
args: {
detailsModal: 'true',
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be a boolean, not a string

Suggested change
detailsModal: 'true',
detailsModal: true,

@@ -3,7 +3,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { useSelector } from 'react-redux';
import classnames from 'classnames';
import Button from '../../ui/button';
import { Button } from '../../component-library';
Copy link
Contributor

Choose a reason for hiding this comment

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

The new Button component is not a 1 to 1 transition from the old one. Instead of using type, it now uses variant. Need to use BUTTON_VARIANT to change the variant of this Button.

Suggested change
import { Button } from '../../component-library';
import { Button, BUTTON_VARIANT } from '../../component-library';

Then for the actual Button you will need to change
type="secondary" to variant={BUTTON_VARIANT.SECONDARY}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@garrettbear i have made the changes please check..

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 @rohiiittttt, thanks for your contribution but in this case updating the component here effects other UI so I'm reverting those changes and keeping the story. I think updating this components deprecated components should update the transaction details as well.

Screenshot 2023-06-19 at 1 09 21 PM

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #19566 (8a8b8e6) into develop (f77b1f6) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop   #19566      +/-   ##
===========================================
- Coverage    70.29%   70.28%   -0.01%     
===========================================
  Files          973      973              
  Lines        37250    37250              
  Branches      9603     9603              
===========================================
- Hits         26183    26181       -2     
- Misses       11067    11069       +2     

see 2 files with indirect coverage changes

@garrettbear garrettbear merged commit 639de74 into MetaMask:develop Jun 20, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2023
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