Updating Text component to use TS Box#19949
Merged
georgewrmarshall merged 1 commit intodevelopfrom Jul 14, 2023
Merged
Conversation
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. |
9ef3eb6 to
2e5a170
Compare
Comment on lines
29
to
32
Contributor
Author
There was a problem hiding this comment.
Adding deprecation notice to old version of Text component
Collaborator
Builds ready [2e5a170]
Page Load Metrics (1608 ± 55 ms)
Bundle size diffs
|
This was referenced Jul 12, 2023
garrettbear
previously approved these changes
Jul 12, 2023
DDDDDanica
previously approved these changes
Jul 13, 2023
b5ce5e1
2e5a170 to
b5ce5e1
Compare
b5ce5e1 to
75cf2f6
Compare
Collaborator
Builds ready [75cf2f6]
Page Load Metrics (1755 ± 109 ms)
Bundle size diffs
|
75cf2f6 to
858b0cb
Compare
858b0cb to
5213d0a
Compare
Collaborator
Builds ready [5213d0a]
Page Load Metrics (1527 ± 32 ms)
Bundle size diffs
|
Codecov Report
@@ Coverage Diff @@
## develop #19949 +/- ##
===========================================
- Coverage 69.47% 69.47% -0.01%
===========================================
Files 988 988
Lines 37313 37306 -7
Branches 9989 9986 -3
===========================================
- Hits 25923 25916 -7
Misses 11390 11390
|
garrettbear
approved these changes
Jul 14, 2023
DDDDDanica
approved these changes
Jul 14, 2023
brad-decker
approved these changes
Jul 14, 2023
FrederikBolding
approved these changes
Jul 14, 2023
Member
FrederikBolding
left a comment
There was a problem hiding this comment.
LGTM
Note: I only reviewed the files under snaps ownership since this PR already had multiple approvals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Currently, the
Textcomponent is using the deprecated JavaScript version of theBoxcomponent. This blocks the TypeScript migration of the extension AND causes issues with the polymorphicasprop. This PR updates theTextcomponent to use the TypeScript version of theBoxand moves the old version ofTexttotext/deprecatedfolder and updates all imports across the extension.Why not just update the
Textcomponent withBoxif the API is the same?I have another PR open doing just that but because of undiagnosable e2e test failures, I have resorted to this route. I will then subsequently update all import paths folder by folder to point to the updated component. This has proven to be a successful method in the past(thanks @brad-decker and @DDDDDanica 😁). It reduces the impact on engineers and merge conflicts and will help get to the bottom of the e2e test failures if they exist or if it's just an annoying timeout.
This PR also unblocks 9 contributor PRs migrating components to TypeScript
Screenshots/Screencaps
Before
Textcomponent indevelopbranch in storybookbefore.mov
Deprecation message for deprecated
TextcomponentAfter
Showing updated
Textcomponent in storybook using the TS version of theBoxcomponent. Showing no visual regressions and all stories and controls are working as expected. I have made some small updates to more easily find the replaceTypographywithTextsection and linked the issueafter.mov
Manual Testing Steps
To check storybook
Textin the search panelTo check all import paths have been updated correctly.
Textcomponents are slightly different one uses the TypeScriptBoxand has the classNamemm-boxvs the JavaScript versionbox-. SO this means that any snapshot tests will pick this up. There should be NO snapshot test updates with this update in this PRI also did a search for
<Textand part of the new import pathtext/deprecatedto compare the number of files165files vs164files for.jsfiles with the 1 difference being a comment in a deprecation message11files vs11files for.tsxfilesPre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Boardlabel.In this case, a QA Engineer approval will be be required.