Style Book: Fix missing styles for classic themes in stylebook route#76843
Style Book: Fix missing styles for classic themes in stylebook route#76843
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
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: +24 B (0%) Total Size: 7.69 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in eabd397. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23603667509
|
| <StyleBookPreview isStatic /> | ||
| <StyleBookPreview | ||
| isStatic | ||
| settings={ siteData.editorSettings } |
There was a problem hiding this comment.
I'm wondering if it would be better to update editor settings (dispatch( editorStore ).updateEditorSettings( settings );) below the edit site settings update. 🤔
There was a problem hiding this comment.
That approach might also be possible, but it could have a significant impact and be risky to implement during the RC phase 🤔
| const editorSettings = useSelect( | ||
| ( select ) => select( editorStore ).getEditorSettings(), | ||
| [] | ||
| ( select ) => settingsProp ?? select( editorStore ).getEditorSettings(), |
There was a problem hiding this comment.
Do we gain anything by doing the check inside the useSelect and not outside? 🤔
There was a problem hiding this comment.
This is to avoid unnecessary subscriptions to the editorStore when settingsProp exists.
ntsekouras
left a comment
There was a problem hiding this comment.
I think this approach is fine too and we already have siteData available to pass. Thanks!
…76843) * Style Book: Fix missing styles for classic themes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Avoid unnecessary subscription --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: 57ca43e |
…76843) * Style Book: Fix missing styles for classic themes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Avoid unnecessary subscription --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
…76843) * Style Book: Fix missing styles for classic themes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Avoid unnecessary subscription --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Gutenberg changelog: - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994)
This updates the pinned hash from the `gutenberg` from `0d133bf7e7437d65d68a06551f3d613a7d8e4361` to `e2970ba736edb99e08fb369d4fb0c378189468ee`. The following changes are included: - WordPress/gutenberg#76478 Boot: Fix black area below content when sidebar is taller than page c… (WordPress/gutenberg#76764) - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/0d133bf7e7437d65d68a06551f3d613a7d8e4361…e2970ba736edb99e08fb369d4fb0c378189468ee. Log created with: git log --reverse --format="- %s" 0d133bf7e7437d65d68a06551f3d613a7d8e4361..e2970ba736edb99e08fb369d4fb0c378189468ee | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. git-svn-id: https://develop.svn.wordpress.org/trunk@62209 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `0d133bf7e7437d65d68a06551f3d613a7d8e4361` to `e2970ba736edb99e08fb369d4fb0c378189468ee`. The following changes are included: - WordPress/gutenberg#76478 Boot: Fix black area below content when sidebar is taller than page c… (WordPress/gutenberg#76764) - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/0d133bf7e7437d65d68a06551f3d613a7d8e4361…e2970ba736edb99e08fb369d4fb0c378189468ee. Log created with: git log --reverse --format="- %s" 0d133bf7e7437d65d68a06551f3d613a7d8e4361..e2970ba736edb99e08fb369d4fb0c378189468ee | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. Built from https://develop.svn.wordpress.org/trunk@62209 git-svn-id: http://core.svn.wordpress.org/trunk@61489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates the pinned hash from the `gutenberg` from `0d133bf7e7437d65d68a06551f3d613a7d8e4361` to `e2970ba736edb99e08fb369d4fb0c378189468ee`. The following changes are included: - WordPress/gutenberg#76478 Boot: Fix black area below content when sidebar is taller than page c… (WordPress/gutenberg#76764) - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/0d133bf7e7437d65d68a06551f3d613a7d8e4361…e2970ba736edb99e08fb369d4fb0c378189468ee. Log created with: git log --reverse --format="- %s" 0d133bf7e7437d65d68a06551f3d613a7d8e4361..e2970ba736edb99e08fb369d4fb0c378189468ee | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. git-svn-id: https://develop.svn.wordpress.org/branches/7.0@62212 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `0d133bf7e7437d65d68a06551f3d613a7d8e4361` to `e2970ba736edb99e08fb369d4fb0c378189468ee`. The following changes are included: - WordPress/gutenberg#76478 Boot: Fix black area below content when sidebar is taller than page c… (WordPress/gutenberg#76764) - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/0d133bf7e7437d65d68a06551f3d613a7d8e4361…e2970ba736edb99e08fb369d4fb0c378189468ee. Log created with: git log --reverse --format="- %s" 0d133bf7e7437d65d68a06551f3d613a7d8e4361..e2970ba736edb99e08fb369d4fb0c378189468ee | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. Built from https://develop.svn.wordpress.org/branches/7.0@62212 git-svn-id: http://core.svn.wordpress.org/branches/7.0@61492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…76843) * Style Book: Fix missing styles for classic themes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Avoid unnecessary subscription --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Fixes #76826
What?
Fix the Style Book not applying any styles when opened via the stylebook route with a classic theme
Why?
When
StyleBookPreviewwas moved fromedit-sitetoeditorpackage in #72681, the settings source changed fromsiteEditorStore.getSettings()toeditorStore.getEditorSettings(). For the classic theme stylebook route, no post is being edited, soEditorProvideris not rendered andeditorStore.editorSettingsis never initialized with the theme's styles — resulting in a completely unstyled Style Book.How?
settingsprop toStyleBookPreviewthat takes precedence overeditorStore.getEditorSettings()when provided.siteData.editorSettings(fromeditSiteStore.getSettings(), which contains the theme styles) toStyleBookPreview.Testing Instructions
Screenshots
Before
After
Use of AI Tools
Claude Code was used to investigate the regression and implement the fix.