-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
PanelBody: Convert to TypeScript #47702
Conversation
PS — now that #47259 is merged, you should be able to rebase on top of |
15158a1
to
eea90d1
Compare
Size Change: -9 B (0%) Total Size: 1.34 MB
ℹ️ View Unchanged
|
Flaky tests detected in ecbb8fa. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4317279213
|
13cca82
to
948ee4a
Compare
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.
Thanks for working on this @brookewp!
I've left a comment about a missing prop that will cause the tests to fail.
The other reason for the failure is the renamed test file - the old snapshot for test/body.js
can be removed and to regenerate a new snapshot for the body.tsx
file, you could npm run test:unit:watch packages/components/src/panel
and once tests finish, type u
to recreate the snapshots.
Let me know if that helps!
948ee4a
to
db1449e
Compare
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.
Great job so far, @brookewp ! This is definitely a tricky task, and I appreciate you working on it 👏
I left some detailed comments to highlight a few changes while explaining the thought process that I'd normally go through when working on such a task.
For now, I've mostly payed attention to the code changes. Once the code looks good, we can take a look also at the JSDocs for each prop (and their equivalent in the README).
Finally, could you also add a CHANGELOG entry ?
Thank you!
db1449e
to
ddffacb
Compare
2a3b658
to
96b518a
Compare
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.
96b518a
to
df23167
Compare
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.
Thank you for working on this PR, @brookewp !
The code changes LGTM 🚀
Feel free to merge this PR once all remaining feedback Including Chad's) has been addressed (it should all be quite minor).
Congratulations on completing your first TypeScript refactor 🎉
🚀 |
Thank you for the fantastic work here, @brookewp 🙌 |
What?
Refactor the
PanelBody
component to TypeScript following Panel: #47259Why?
Part of the refactor to Typescript: #35744
How?
Followed the steps in the TypeScript migration guide
Testing Instructions
run npm storybook:dev
and check the docs forPanelBody