-
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
Conditionally render Link UI settings drawer wrapper only when multiple settings are present #53531
Conditionally render Link UI settings drawer wrapper only when multiple settings are present #53531
Conversation
@richtabor @scruffian The tests will need updating to cater for this, so I would appreciate a confidence check here before I put in the additional effort there 🙇 |
Size Change: -239 B (0%) Total Size: 1.51 MB
ℹ️ View Unchanged
|
What's the best way to test it with additional settings? |
1ce90fd
to
90a0ffe
Compare
Flaky tests detected in c7eb6d1. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5869273824
|
@richtabor I don't see much value in pursuing this PR until we add more controls in WP Core. I can't even e2e test it as things stand because one of the tests no longer makes sense. I think this should be paused for now. |
I'm not planning to progress this one. We can pick it up if it ever becomes a concern again. |
What?
Only renders the "Advanced" area when there is more than a single setting in the Link Control component.
Applies some feedback from #52799.
Why?
The toggle was added to help clean up the UI in anticipation of allowing the ability to add more settings in the future. However, currently most implementations (including Core) only have a single setting
Opens in new tab
. It seems a little redundant to have a drawer when there is only a single setting.How?
Conditionally only renders the
Advanced
settings toggle is there is more than a single setting. Otherwise just renders directly under the inputs.Testing Instructions
Opens in new tab
checkboxAdvanced
toggleOpens in new tab
behaves as expected.Testing Instructions for Keyboard
Screenshots or screencast