-
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
Cover Block: Refactor setting panel #65432
Conversation
Size Change: +115 B (+0.01%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
…nt/refactor-cover-block-control
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 splitting this refactor out into its own PR @akasunil 👍
The change to using a ToolsPanel is working as expected for me.
While testing I did notice some weird behaviour and edge cases but this also happens on trunk without the ToolsPanel. This behaviour included:
- It seems odd that a fixed background toggles off the focal point controls but a repeated and fixed background doesn't. This is the same as trunk so 🤷
- If you set >= 100% for the focal point left's value, a horizontal scrollbar in the inspector is triggered. This wasn't introduced in this PR though
- If the focal point values are greater than 100%, resetting them should make the visible default value 50% however the field still contains 100%. This is the same as trunk without the ToolsPanel but it could be argued this PR makes it more prominent given the ToolsPanel's reset menu.
All these might be best addressed as follow-ups in separate PRs to keep this one focused only on the ToolsPanel refactor.
To that end, I think this is fine to land.
✅ Panel doesn't display for overlay only cover blocks
✅ Panel functions correctly for image overlays
✅ Correct controls present when using feature image in Cover block
✅ Correct controls displayed when using video block
LGTM 🚢
Screen.Recording.2024-10-11.at.12.41.29.pm.mp4
Thank you @aaronrobertshaw, for your approval. I'll merge this PR and rebase the PR #62926 I'll investigate the edge cases you mentioned and, if necessary, establish a new issue or follow-up PR to deal with them. |
Co-authored-by: akasunil <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]>
What?
Split from #62926
Why?
IWhile working on implementation of Resolution option in cover block, Its appeared that
ResolutionTools
component is composed ofToolsPanelItem
, it must be placed inside theToolsPanel
component. The current Settings panel does not use the ToolsPanel component, so the entire settings panel is refactored.Testing Instructions
Screenshots or screencast