-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
DimensionControl(Experimental)
: refactor to TypeScript
#47351
Conversation
Size Change: +5 B (0%) Total Size: 1.34 MB
ℹ️ View Unchanged
|
d171d23
to
6ce1240
Compare
Flaky tests detected in b74c44a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4355452047
|
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, Markus!
On top of the inline comments, here's some additional feedback:
- we should also look at updating the README:
- the current example code is very tightly coupled with the editor. We should probably find a good compromise between showing a real-world use case, but without using APIs and specific references to the block editor
- We should keep README / JSDoc in types.ts / code implementation in sync, especially regarding the props (description, optionality, default value)
- We should keep the example snippet in sync between the README and the JSDoc for the default export
- For the expected current format of the README file, you can refer to the CONTRIBUTING guidelines
f5189ee
to
c7dba4e
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.
Looking good! I just left a few more minor comments :D Also quoting past Marco about some misc feedback — let me know in case any of it isn't clear!
- the current example code is very tightly coupled with the editor. We should probably find a good compromise between showing a real-world use case, but without using APIs and specific references to the block editor
- We should keep README / JSDoc in types.ts / code implementation in sync, especially regarding the props (description, optionality, default value)
- We should keep the example snippet in sync between the README and the JSDoc for the default export
- For the expected current format of the README file, you can refer to the CONTRIBUTING guidelines
a3daf5a
to
b423a41
Compare
@ciampo I think your feedback should be addressed. Please let me know if there's anything else you'd like me to adjust. |
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.
I took this PR for a final spin and noticed a few minor tweaks that should be applied, especially to the Storybook examples.
Otherwise, code changes LGTM 🚀
Feel free to merge once all feedback has been addressed :)
b423a41
to
317cd47
Compare
Co-authored-by: Marco Ciampini <[email protected]>
Co-authored-by: Marco Ciampini <[email protected]>
42a38d6
to
b74c44a
Compare
What?
Refactor
DimensionControl
component to TypeScriptWhy?
Part of #35744
How?
.tsx
and created atypes.ts
file with relevant typesTesting Instructions
Wit this PR we introduce a story for this component. Please verify it behaves as expected.