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 #17670: Replace Typography with Text component #17959

Merged
merged 7 commits into from
Mar 16, 2023

Conversation

ayushj1910
Copy link
Contributor

@ayushj1910 ayushj1910 commented Mar 2, 2023

Explanation

This pull request has the changes which are required in issue #17670. It changes all the Typography components with Text components.

Files updated through this PR :

  1. metamask-extension\ui\components\app\confirm-page-container\confirm-page-container-content\confirm-page-container-summary\confirm-page-container-summary.component.js
  2. metamask-extension\ui\components\app\confirm-page-container\flask\snap-insight.js
  3. metamask-extension\ui\components\app\confirmation-warning-modal\confirmation-warning-modal.js
  4. metamask-extension\ui\components\app\create-new-vault\create-new-vault.js
  5. metamask-extension\ui\components\app\custom-spending-cap\custom-spending-cap-tooltip.js

Screenshots/Screencaps

Before

``
confirm-summary-comp-before

confirmation-warning-modol.js
confirmation-warning-modal-before

create-new-vault.js
create-new-vault before

cusotm-spending-tooltip-cap.js
custom-spending-tooltip-cap-before

After

confirm-summary-comp-after

confirmation-warning-modol.js
confirmation-warning-modal-after

create-new-vault.js
create-new-vault-after

cusotm-spending-tooltip-cap.js
custom-spending-tooltip-cap-after

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.

@ayushj1910 ayushj1910 requested a review from a team as a code owner March 2, 2023 10:40
@ayushj1910 ayushj1910 requested a review from digiwand March 2, 2023 10:40
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 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.

@ayushj1910
Copy link
Contributor Author

Hey @georgewrmarshall and @digiwand ,
Can you please confirm if these changes are correct ?
Also, please check the screenshots if this is what needs to be added in the explanation part.
Thanks!

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 @ayushj1910, Code looks good and screenshots are great! Just need to fix linting and other failing tests

@ayushj1910
Copy link
Contributor Author

Hey @georgewrmarshall,
Can you please tell me a way to fix the linting issues and other failing tests. I tried running 'yarn lint' but it failed giving an error "Spawn ERROR - ENAMETOOLONG"

@digiwand
Copy link
Contributor

digiwand commented Mar 3, 2023

Hi @ayushj1910, have you tried yarn lint:fix?

@ayushj1910
Copy link
Contributor Author

Hi @ayushj1910, have you tried yarn lint:fix?

Hey @digiwand ,
Yes I tried this as well. It gives the same error.

@digiwand
Copy link
Contributor

digiwand commented Mar 3, 2023

Hey @ayushj1910,

I think there is something wrong with the setup on your local machine. I have not encountered that error before. Maybe try

> rm -rf node_modules
> yarn setup

The command appears to work on my end. The other tests may be failing because some of the file paths are not resolving.

I have the lint fixes on my local. I can add them to this PR if you'd like

@ayushj1910
Copy link
Contributor Author

Hey @ayushj1910,

I think there is something wrong with the setup on your local machine. I have not encountered that error before. Maybe try

> rm -rf node_modules
> yarn setup

The command appears to work on my end. The other tests may be failing because some of the file paths are not resolving.

I have the lint fixes on my local. I can add them to this PR if you'd like

Hey @digiwand ,
I tried but it doesn't work. It would be very helpful if you add the lint fix to this PR. Thanks!
Once these 4 files are approved, I will start working on rest of the files as well.

{t('addEthereumChainWarningModalListPointThree')}
</Typography>
</Text>
</li>
</ul>
</Box>
Copy link
Contributor

Choose a reason for hiding this comment

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

After

Screenshot 2023-03-06 at 2 49 38 PM

@@ -135,7 +135,7 @@ export default function CreateNewVault({
className="create-new-vault__terms-label"
htmlFor="create-new-vault__terms-checkbox"
>
<Typography as="span">{termsOfUse}</Typography>
<Text as="span">{termsOfUse}</Text>
</label>
</div>
) : null}
Copy link
Contributor

Choose a reason for hiding this comment

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

After

Screenshot 2023-03-06 at 2 50 36 PM

title={title}
>
{titleComponent || title}
</Typography>
</Text>
) : null}
</div>
{hideSubtitle ? null : (
Copy link
Contributor

Choose a reason for hiding this comment

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

After

Screenshot 2023-03-06 at 2 56 24 PM

@georgewrmarshall
Copy link
Contributor

Hey @ayushj1910, I've fixed the import and linting errors as well as added a storybook file for ConfirmPageContainerSummary hopefully that fixes the build

@ayushj1910
Copy link
Contributor Author

Hey @ayushj1910, I've fixed the import and linting errors as well as added a storybook file for ConfirmPageContainerSummary hopefully that fixes the build

Hey @georgewrmarshall ,
Thank you for fixing the issues. I will start working on the rest of the files now.
Also, please add these 4 files to the Issue description so that there is no clash.

@georgewrmarshall
Copy link
Contributor

georgewrmarshall commented Mar 8, 2023

Hey @ayushj1910, I would suggest creating another PR for more changes so we can make improvements iteratively and prevent stale PRs. I'm going force push back to where there are no merge conflicts. Once that passes we can merge this PR. I would suggested branching off of develop and cherry picking your custom-spending-cap-tooltip.js changes

@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Merging #17959 (d2ecd04) into develop (423e085) will increase coverage by 0.06%.
The diff coverage is 56.56%.

@@             Coverage Diff             @@
##           develop   #17959      +/-   ##
===========================================
+ Coverage    63.86%   63.91%   +0.06%     
===========================================
  Files          908      908              
  Lines        35390    35398       +8     
  Branches      8966     8975       +9     
===========================================
+ Hits         22599    22624      +25     
+ Misses       12791    12774      -17     
Impacted Files Coverage Δ
app/scripts/controllers/preferences.js 77.16% <ø> (-2.73%) ⬇️
app/scripts/migrations/index.js 100.00% <ø> (ø)
shared/constants/metametrics.js 100.00% <ø> (ø)
shared/constants/network.ts 100.00% <ø> (ø)
...mation-warning-modal/confirmation-warning-modal.js 50.00% <ø> (ø)
...omponents/app/create-new-vault/create-new-vault.js 41.18% <ø> (ø)
...delete-network/confirm-delete-network.container.js 66.67% <0.00%> (ø)
ui/ducks/app/app.ts 62.28% <0.00%> (+1.60%) ⬆️
ui/ducks/metamask/metamask.js 76.19% <ø> (ø)
...rm-transaction/confirm-token-transaction-switch.js 5.26% <0.00%> (-3.07%) ⬇️
... and 27 more

... and 5 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ayushj1910
Copy link
Contributor Author

Hey @georgewrmarshall ,
Is there any work pending for this PR?

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.

LGTM! I can't see any reason for the code coverage to be failing on this PR? Would recommend merging after 2 approvals

@georgewrmarshall georgewrmarshall merged commit 1c613a4 into MetaMask:develop Mar 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants