#53344 closed defect (bug) (fixed)
Add editor styles to the widgets block editor
Reported by: | isabel_brison | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description
Initially reported here: https://github.com/WordPress/gutenberg/issues/32449
(style changes are visible in the front end, but not previewable in the editor)
The settings passed to the widgets editor initialization function don't include theme styles. In the post editor, theme styles are being added to the settings here: https://github.com/WordPress/wordpress-develop/blob/master/src/wp-admin/edit-form-blocks.php#L131-L132 so perhaps we should do the same for Widgets.
Change History (20)
#2
@
3 years ago
- Milestone 5.8 deleted
- Resolution set to reported-upstream
- Status changed from new to closed
#3
@
3 years ago
Closing this in favour of https://github.com/WordPress/gutenberg/issues/26163.
If we do go ahead with allowing theme styles in the Widgets editor, the change will have to be done in core, so we should probably close the Gutenberg ticket in favour of this one instead.
#4
@
3 years ago
- Resolution reported-upstream deleted
- Status changed from closed to reopened
Reopening this to try adding theme styles in the Widgets editor.
This ticket was mentioned in PR #1369 on WordPress/wordpress-develop by tellthemachines.
3 years ago
#5
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/53344
Loads theme styles in the Widgets editor in the same way as they are loaded in the post editor. Will also require some CSS changes on the Gutenberg side, but basic functionality can already be tested in this PR by enabling Twenty Twenty One and checking that its styles are loaded in the Widgets editor.
noisysocks commented on PR #1369:
3 years ago
#6
Oh, could you add a unit test for get_block_editor_theme_styles
? You can use the the one we have for get_legacy_widget_block_editor_settings
as inspiration.
#8
@
3 years ago
- Summary changed from Changing block styles in the Widgets editor doesn't show changes in the editor to Add editor styles to the widgets block editor
tellthemachines commented on PR #1369:
3 years ago
#9
Test added!
#12
@
3 years ago
I tested the patch in TT1 and it fixes the default font-family issue I reported in #53454, which was a duplicate of this ticket :)
noisysocks commented on PR #1369:
3 years ago
#13
Awesome. LGTM 👍
This ticket was mentioned in Slack in #core by isabelbrison. View the logs.
3 years ago
#16
@
3 years ago
I added some questions in a review on the PR. But overall it looks really good and tests well! There are some small styling adjustments that will need to be made in the default themes, but the widgets at least stylistically match the theme now.
tellthemachines commented on PR #1369:
3 years ago
#17
Also, it looks like WordPress/gutenberg#32683 was merged. Does this have to land after the pacakge updates are committed to Core? Or can this be committed at any time now?
This can be committed any time! If the package updates aren't in yet we'll see some styling bugs, but no major breakage.
#18
@
3 years ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from reopened to closed
In 51200:
3 years ago
#19
Thanks everyone! Merged into Core in https://core.trac.wordpress.org/changeset/51200.
Closing this in favour of https://github.com/WordPress/gutenberg/issues/26163.