-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix ts spread props issue #20107
fix ts spread props issue #20107
Conversation
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. |
Codecov Report
@@ Coverage Diff @@
## develop #20107 +/- ##
===========================================
+ Coverage 69.34% 69.46% +0.12%
===========================================
Files 986 992 +6
Lines 37299 37453 +154
Branches 10011 10042 +31
===========================================
+ Hits 25864 26014 +150
- Misses 11435 11439 +4
|
Builds ready [d277f3d]
Page Load Metrics (1815 ± 99 ms)
Bundle size diffs
|
d277f3d
to
3e407b9
Compare
e6d7a42
to
e4971dd
Compare
Builds ready [e4971dd]
Page Load Metrics (1541 ± 43 ms)
Bundle size diffs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work 💯
Explanation
TS has not been liking us spreading props and at first it seemed like it was strictly a Box component issue but it appears that we just need to Typecast on the spread props for a component. So if it's built using the
Text
component, you'll need to use theTextProps
for typecasting.Screenshots/Screencaps
Before
After
Manual Testing Steps
Go to a TS component in the component library and toggle between the before and after:
Before:
{...props}
After:
{...(props as BoxProps<C>)}
make sure BoxProps is importedPre-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 Board
label.In this case, a QA Engineer approval will be be required.