-
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
Top Toolbar: Move the preferences selection into the main useSelect #52332
Conversation
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.
One selector remains in the edit site package.
gutenberg/packages/edit-site/src/components/header-edit-mode/index.js
Lines 111 to 112 in 60a6c2d
const { get: getPreference } = useSelect( preferencesStore ); | |
const hasFixedToolbar = getPreference( editSiteStore.name, 'fixedToolbar' ); |
One last nitpick: Do you mind replacing other two instances of |
Size Change: +20 B (0%) Total Size: 1.42 MB
ℹ️ View Unchanged
|
Flaky tests detected in cb7fb40. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5465497014
|
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, @scruffian!
A rebasing should resolve failing CI checks. |
24715ce
to
e925510
Compare
What?
This moves the hasFixedToolbar select inside the main useSelect, as raised in #52123 (comment).
Why?
So that when the fixedToolbar preference value changes, the component will rerender.
How?
Refactoring.
Testing Instructions
Check that changing the top toolbar setting still changes the display of the block toolbars.