-
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
Global styles: Reselect blocks after pasting styles #47590
Conversation
…ptional tools panel items are selected
Size Change: +22 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
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 was able to copy/paste styles and have the block settings properly render. 🚀
This fix doesn't seem to work consistently when I test it, and I also noticed there are similar issues with the design tools not appearing or hiding when using undo/redo: Kapture.2023-02-02.at.10.48.40.mp4I might be good to investigate whether the tools panel can be made reactive to the addition/removal of styles. |
Hmm, it works every time for me on the PR branch still, but hardly at all in trunk, so something has been added to trunk which has made it fragile, so I will take a look at a more robust solution. |
Thanks Glen! |
I just cherry-picked this PR to the release/15.1 branch to get it included in the next release: fc85b3e |
What?
Reselect blocks on which styles were pasted.
Why?
In order to ensure that any optional tools panels controls are reloaded to show any related styles that have just been pasted.
Fixes: #47368
How?
First removes the block selection and then reselects the relevant blocks.
Testing Instructions
Copy styles
option from the block actions menuPaste styles
option from the block actions menuScreenshots or screencast
Before:
paste-styles-before.mp4
After:
paste-styles-after.mp4