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

Update Text import paths: /institutional #20064

Merged

Conversation

georgewrmarshall
Copy link
Contributor

Explanation

Currently, there are deprecated instances of the Text component that use the JavaScript version of the Box component. This PR updates those deprecated import paths to the new component in the ui/components/institutional folder as well as snapshots

Screenshots/Screencaps

I have added Before/After screencasts to ensure no visual regressions have occurred to components with some significant updates other than snapshot updates in the code comments

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.

@georgewrmarshall georgewrmarshall self-assigned this Jul 18, 2023
@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 Jul 18, 2023
@georgewrmarshall georgewrmarshall force-pushed the part/19986/update-text-import-paths-institutional branch 2 times, most recently from 849754e to bdcb697 Compare July 18, 2023 00:30
import { Box } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Box, Text } from '../../component-library';

import {
TextColor,
TextVariant,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No visual regressions

Screenshot 2023-07-17 at 5 32 38 PM Screenshot 2023-07-17 at 5 33 03 PM

justifyContent={JustifyContent.spaceBetween}
>
<Box
display={DISPLAY.FLEX}
display={Display.Flex}
justifyContent={JustifyContent.flexStart}
alignItems={AlignItems.center}
>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No visual regressions. Missing image is a build type issue that's not in production

Screenshot 2023-07-17 at 5 38 13 PM Screenshot 2023-07-17 at 5 39 07 PM

@metamaskbot
Copy link
Collaborator

Builds ready [bdcb697]
Page Load Metrics (1675 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint107148134115
domContentLoaded14351889167512058
load14351889167512058
domInteractive14351889167512058
Bundle size diffs
  • background: 0 bytes
  • ui: 0 bytes
  • common: 0 bytes

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #20064 (0ceb6a6) into develop (3f3ee63) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop   #20064   +/-   ##
========================================
  Coverage    69.42%   69.42%           
========================================
  Files          990      990           
  Lines        37418    37418           
  Branches     10039    10039           
========================================
  Hits         25976    25976           
  Misses       11442    11442           
Impacted Files Coverage Δ
...itutional/compliance-details/compliance-details.js 90.48% <ø> (ø)
...institutional/compliance-modal/compliance-modal.js 100.00% <ø> (ø)
...utional/compliance-settings/compliance-settings.js 100.00% <ø> (ø)
...nts/institutional/custody-labels/custody-labels.js 90.00% <ø> (ø)
...tion/interactive-replacement-token-notification.js 91.89% <ø> (ø)
...ponents/institutional/jwt-dropdown/jwt-dropdown.js 92.31% <ø> (ø)
...ponents/institutional/jwt-url-form/jwt-url-form.js 72.73% <ø> (ø)
...nts/institutional/note-to-trader/note-to-trader.js 80.00% <ø> (ø)
...network-notification/wrong-network-notification.js 100.00% <ø> (ø)

display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.ROW}
display={Display.Flex}
flexDirection={FlexDirection.Row}
justifyContent={JustifyContent.center}
>
<Box
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No visual regression

Screenshot 2023-07-17 at 9 37 54 PM Screenshot 2023-07-17 at 9 37 40 PM

import { Label } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Label, Text } from '../../component-library';

import {
TextTransform,
BackgroundColor,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No visual regressions

Screenshot 2023-07-17 at 9 38 59 PM Screenshot 2023-07-17 at 9 39 13 PM

} from '../../component-library';
import { Text } from '../../component-library/text/deprecated';

const InteractiveReplacementTokenNotification = ({ isVisible }) => {
const t = useI18nContext();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No visual regressions

Screenshot 2023-07-17 at 9 40 07 PM Screenshot 2023-07-17 at 9 40 32 PM

@@ -2,8 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import Dropdown from '../../ui/dropdown';
import { Color } from '../../../helpers/constants/design-system';
import { Box } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Box, Text } from '../../component-library';
import { useI18nContext } from '../../../hooks/useI18nContext';

const JwtDropdown = (props) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No visual regressions

Screenshot 2023-07-17 at 9 41 51 PM Screenshot 2023-07-17 at 9 42 07 PM

@@ -8,8 +8,7 @@ import {
FlexDirection,
TextVariant,
} from '../../../helpers/constants/design-system';
import { Box, Button } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Box, Button, Text } from '../../component-library';
import JwtDropdown from '../jwt-dropdown';

const JwtUrlForm = (props) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Small update to secondary button to use correct component API

Screenshot 2023-07-17 at 9 43 03 PM Screenshot 2023-07-17 at 9 44 21 PM

import { Label } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import Box from '../../ui/box';
import { Label, Box, Text } from '../../component-library';

const NoteToTrader = (props) => {
const { placeholder, maxLength, onChange, noteText, labelText } = props;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No visual regressions

Screenshot 2023-07-17 at 9 45 47 PM Screenshot 2023-07-17 at 9 46 08 PM

justifyContent={JustifyContent.center}
alignItems={AlignItems.center}
padding={[1, 6]}
backgroundColor={BackgroundColor.errorMuted}
width={BLOCK_SIZES.FULL}
width={BlockSize.Full}
>
<Icon
name={IconName.Danger}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No visual regressions

Screenshot 2023-07-17 at 9 46 57 PM Screenshot 2023-07-17 at 9 47 17 PM

@georgewrmarshall georgewrmarshall marked this pull request as ready for review July 18, 2023 04:48
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner July 18, 2023 04:48
@georgewrmarshall georgewrmarshall force-pushed the part/19986/update-text-import-paths-institutional branch from bdcb697 to 0ceb6a6 Compare July 18, 2023 04:48
@metamaskbot
Copy link
Collaborator

Builds ready [0ceb6a6]
Page Load Metrics (1598 ± 83 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint96167127209
domContentLoaded14042018159717383
load14042018159817283
domInteractive14032018159717383
Bundle size diffs
  • background: 0 bytes
  • ui: 0 bytes
  • common: 0 bytes

Copy link
Contributor

@albertolive albertolive left a comment

Choose a reason for hiding this comment

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

Thank you very much @georgewrmarshall, this is something we wanted to do in the near term. ✅ ✅ 🚢

@georgewrmarshall georgewrmarshall merged commit e75535d into develop Jul 18, 2023
@georgewrmarshall georgewrmarshall deleted the part/19986/update-text-import-paths-institutional branch July 18, 2023 15:15
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2023
@metamaskbot metamaskbot added the release-10.36.0 Issue or pull request that will be included in release 10.36.0 label Jul 18, 2023
@Gudahtt Gudahtt added release-11.1.0 Issue or pull request that will be included in release 11.1.0 and removed release-10.36.0 Issue or pull request that will be included in release 10.36.0 labels Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.1.0 Issue or pull request that will be included in release 11.1.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.

6 participants