-
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
Add Zoom Out toggle to editor header when experiment enabled #65183
Conversation
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. |
Size Change: +466 B (+0.03%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
Do we want to show this toggle in all editors or just the Site Editor? If it's the later then we'll probably want to use the Slot/Fills to add the Button. |
{ zoomOutExperimentEnabled && <ZoomOutToggle /> } | ||
|
||
{ ( isWideViewport || ! showIconLabels ) && ( | ||
<PinnedItems.Slot scope="core" /> | ||
) } |
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.
This will currently appear across all editors.
If instead we only want it on the Site Editor then we can use the <PinnedItems.Slot scope="core" />
to add the Toggle.
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 think this is fine for now, it's still behind the flag.
We should also remove the zoom out control from the device preview. |
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 think we should bring this in. We can remove the control from the device preview in a different PR.
There's also a question about whether this should be on the left side.
There is a technical implementation that needs fixing first
I'd like to use the slots approach before we land this. |
All. :) |
@scruffian If @richtabor wants this in all editors then we can probably land it "as is". Feel free to reinstate your ✅ |
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.
LGTM
That's strange. It was working for me. I'll look into that. |
@t-hamano Can you share production steps please? 🙏 |
@getdave The easiest step is to enable custom fields, but that might be an issue we already had when the zoom out mode toggle was in a dropdown. 54a730c1ed6c065b2b16ee7fa02421cf.mp4 |
Ah that's why I didn't notice it. So it looks like "Zoom Out" will need to detect the iframe. Thanks for flagging. |
What?
Adds a Zoom Out toggle button to the editor header area when the relevant experiment is active.
Closes #65162
Why?
See #65162.
How?
square
icon to@wordpress/icons
- note I"m happy to pull this into a separate PR if that's preferable.Note that I have not touched the Device Preview dropdown. If we want to remove that
50%
behaviour we can do so.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast