-
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
Refactor Link Control Settings Drawer to avoid unnecessary prop drilling #50963
Conversation
Size Change: -38 B (0%) Total Size: 1.41 MB
ℹ️ View Unchanged
|
Flaky tests detected in 38a1a9e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5080449189
|
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.
So much better!
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.
So much better!
I know right!? I can't believe I wrote the original code 🤦 😄 |
What?
Refactor of the settings drawer component to avoid prop drilling.
Relates to work in #50890.
Why?
Simplifies the code and makes it easier to reason about without having to "follow" props through nested components.
How?
Utilises
children
prop to avoid the prop drilling.Testing Instructions
Check the control behaves as per
trunk
.Testing Instructions for Keyboard
Screenshots or screencast