-
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
Distraction Free: Fix conflict with showListViewByDefault preference #52914
Distraction Free: Fix conflict with showListViewByDefault preference #52914
Conversation
@andrewserong Thanks for this PR! Should we do it in the site editor as well? |
Thanks for taking a look @ramonjd! This PR does it in the site editor, too, I was just lazy when it came to doing the screengrabs... I can add in some before/after pics 😄 Edit: Added to the PR description 👍 |
Size Change: +16 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
It wasn't you! I did "test" before asking, but I think my local dev hadn't built properly. Rebuilt. Works. 😆 |
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.
Yes!
Excellent, thanks for the speedy review! 🙇 |
I just cherry-picked this PR to the update/further-bugfixes-rc2 branch to get it included in the next release: c4c8306 |
* Fix image block v6 deprecation (#52822) * Remove incorrect comment * Add missing attribtes and supports * Add integration tests for the deprecation * Fix incorrect import * Fix fixtures * Image: Use the correct method for caption class in recent deprecation (#52853) * Distraction Free: Fix notices in site editor (#52867) * Distraction Free: Add missing command in site editor (#52868) * Site Editor: Fix the template parts link on the list page (#52891) * Return focus more from focus return hook (#52710) * Disambiguate "Import" button string. (#52907) * Disambiguate "Import" button string. * Add _x to import --------- Co-authored-by: Andrew Serong <[email protected]> * My patterns page: Increase color contrast for the toggle group (#52678) * Update style.scss * Update style.scss * Check if object exists before accessing its properties. (#52870) * Check if object exists before accessing its properties. * Name anonymous functions * Update names * Sidebar: Restore Back buton 'go to parent' functionality (#52910) * Global styles revisions: display text if no revisions are found (#52865) * If somehow a user lands on the revisions panel when there are no revisions, show some helpful text rather than a loading spinner. Also, add an E2E test! * Updated unit tests to reflect resolver logic changes * Use existing string * Only open edit view when testing the revisions panel itself * ResizableFrame: Account for window resizing (#52697) * ResizableFrame: Account for window resizing * Don't memoize --------- Co-authored-by: Robert Anderson <[email protected]> * Distraction Free: Fix conflict with showListViewByDefault preference (#52914) * Backporting changes from WordPress/wordpress-develop#4891 * Site Editor: Open template parts in view canvas view mode (#52916) --------- Co-authored-by: Alex Lende <[email protected]> Co-authored-by: George Mamadashvili <[email protected]> Co-authored-by: Andrew Serong <[email protected]> Co-authored-by: Mitchell Austin <[email protected]> Co-authored-by: Jb Audras <[email protected]> Co-authored-by: Carolina Nymark <[email protected]> Co-authored-by: Robert Anderson <[email protected]> Co-authored-by: Ramon <[email protected]> Co-authored-by: Lena Morita <[email protected]> Co-authored-by: ramon <[email protected]>
What?
Check if distraction free mode is set before opening the list view by default.
Note: I'm not sure if this bug fix can make it in time for RCs, happy to punt it if there isn't enough time. I mostly noticed it because I usually have my editor set to show the list view by default.
Why?
While working on #52867 and #52868, I noticed that there is a conflict between the
showListViewByDefault
preference and thedistractionFree
mode. With Distraction Free mode, we expect that the list view will not be open, however theshowListViewByDefault
preference doesn't currently take this into account.If you have
showListViewByDefault
set totrue
and then switch to Distraction Free mode while in the post or site editors, everything appears to work as expected. However, if you reload the page, the list view will be open. This PR fixes it so that whendistractionFree
is set, we skip opening the list view by default.The approach in this PR preserves the
showListViewByDefault
preference so that a user that toggles Distraction Free mode will be restored back to showing the list view by default once they switch off Distraction Free mode.How?
showListViewByDefault
preference.Testing Instructions
SHIFT+CMD+\
keyboard shortcut) to switch to distraction free mode.Screenshots or screencast
In the following screengrabs the
showListViewByDefault
setting is set totrue
and then the user enables distraction free mode, and then reloads the editor. In theBefore
screengrab, the list view is unexpectedly open.Site editor after reloading with
showListViewByDefault
set totrue
as well asdistractionFree
: