Skip to content

Fixing sign button color and replacing deprecated components in SignatureRequestOriginalWarning#22741

Merged
georgewrmarshall merged 3 commits intodevelopfrom
fix/22171/button-danger
Jan 31, 2024
Merged

Fixing sign button color and replacing deprecated components in SignatureRequestOriginalWarning#22741
georgewrmarshall merged 3 commits intodevelopfrom
fix/22171/button-danger

Conversation

@georgewrmarshall
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall commented Jan 31, 2024

Description

This PR addresses a Sev2 visual regression bug that occurred due to incorrect migration of component API in a previous PR, which aimed to update stale components with component library components. Not only does this PR rectify these visual regressions, but it also extends the integration of the component library by replacing additional stale components.

Related issues

Fixes: #22171

Manual testing steps

To check component updates

  1. Go to the latest storybook build in this PR
  2. Search SignatureRequestOriginalWarning in the search bar
  3. Click on the result
  4. See updated SignatureRequestOriginalWarning modal component with correct buttons

To check component works in app

  1. Enable eth sign from settings
  2. Go to test dapp
  3. Trigger Eth Sign
  4. Accept
  5. See SignatureRequestOriginalWarning modal

Screenshots/Recordings

Before

before1080.mov

After

after1080.mov

Screencast below shows working in app

after.app.mov

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • 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.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@georgewrmarshall georgewrmarshall self-assigned this Jan 31, 2024
@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system in Extension label Jan 31, 2024
@github-actions
Copy link
Copy Markdown
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 marked this pull request as ready for review January 31, 2024 03:04
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner January 31, 2024 03:04
@import 'signature-request/index';
@import 'signature-request-siwe/index';
@import 'signature-request-original/index';
@import 'signature-request-original/signature-request-original-warning/index';
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 import to deleted SCSS file

width: 100%;
height: 132px;
}
}
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.

No longer need this CSS

import PropTypes from 'prop-types';
import { useI18nContext } from '../../../../hooks/useI18nContext';

import Popover from '../../../ui/popover';
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.

This version of the Popover is deprecated

driver,
'[data-testid="page-container-footer-next"]',
'.signature-request-warning__footer__sign-button',
'[data-testid="signature-warning-sign-button"]',
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.

Replacing removed class name with data test id

await driver.clickElement('[data-testid="page-container-footer-next"]');
await driver.clickElement(
'.signature-request-warning__footer__sign-button',
'[data-testid="signature-warning-sign-button"]',
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.

Replacing removed class name with data test id

@georgewrmarshall georgewrmarshall changed the title Fix/22171/button danger Fixing sign button color and replacing deprecated components in SignatureRequestOriginalWarning Jan 31, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [c37ec36]
Page Load Metrics (895 ± 46 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint951741302211
domContentLoaded125124126
load76110708959546
domInteractive125124126
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -472 Bytes (-0.01%)
  • common: 0 Bytes (0.00%)

@DDDDDanica
Copy link
Copy Markdown
Contributor

LGTM!

@georgewrmarshall georgewrmarshall merged commit bd34bc5 into develop Jan 31, 2024
@georgewrmarshall georgewrmarshall deleted the fix/22171/button-danger branch January 31, 2024 16:35
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2024
@metamaskbot metamaskbot added the release-11.11.0 Issue or pull request that will be included in release 11.11.0 label Jan 31, 2024
@georgewrmarshall
Copy link
Copy Markdown
Contributor Author

Fixes missing overlay #22756

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.11.0 Issue or pull request that will be included in release 11.11.0 team-design-system All issues relating to design system in Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Sign button is blue instead of danger for eth_sign requests

4 participants