-
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
Only enter the zoom-out mode when not in the focus mode #56885
Only enter the zoom-out mode when not in the focus mode #56885
Conversation
@@ -47,6 +47,7 @@ function InserterMenu( | |||
prioritizePatterns, | |||
__experimentalOnPatternCategorySelection, | |||
__experimentalShouldZoomPatterns = false, | |||
onSelectTab, |
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.
We might want to mark this private if we ever want to land this on trunk.
|
||
const previousLocationRef = useRef( location ); | ||
useEffect( | ||
function closeInserterOnNavigate() { |
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.
Ideally, we should find a better way and place to manage this when we have a better routing system.
Size Change: +99 B (0%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
Flaky tests detected in 5c7ded2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7135626627
|
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.
Working nicely 👍
What?
Part of #56806.
Do not enter the
zoom-out
mode when opening the patterns inserter when we're in the focus mode (template-part, patterns, etc).Why?
The zoom-out mode is designed to be used in the templates/pages so that it can zoom out to a wider view, which is not suitable for the focus mode where we want more granular controls.
How?
Move around some APIs and only invoke
setEditorMode
when it's not in the zoom-out mode.Testing Instructions
Screenshots or screencast
Kapture.2023-12-08.at.13.18.40.mp4