#57460 closed enhancement (fixed)
Allow non-block themes to add theme support for `appearance-tools`
Reported by: | ironprogrammer | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-screenshots gutenberg-merge |
Focuses: | Cc: |
Description (last modified by )
Allow themes without theme.json
to opt-in to appearance tools via:
add_theme_support( 'appearance-tools' );
Originally planned for 6.1, this backport missed the original cutoff. Backports changes from https://github.com/WordPress/gutenberg/pull/43337.
Related: #56467
Attachments (6)
Change History (27)
This ticket was mentioned in PR #3846 on WordPress/wordpress-develop by @ironprogrammer.
2 years ago
#1
- Keywords has-patch has-unit-tests added
#2
@
2 years ago
- Keywords has-testing-info needs-testing added
Testing Instructions
Setup
- Disable the Gutenberg plugin, if active.
- Install and activate a theme that does not use
theme.json
(e.g. a "classic" theme").
Steps to Test
- In the theme's
functions.php
file, add the following theme support (often located in anafter_setup_theme
hook):add_theme_support( 'appearance-tools' );
- Create a new post with a Group block. Inside the group, add a Paragraph with a link, and add a Buttons block with a few buttons.
- Make sure the Settings sidebar is visible (gear icon, upper right of editor).
- Select the Group, Buttons, and Paragraph blocks to verify the new appearance tools style options available in the sidebar.
Expected Results
- ✅ Color > Link allows the selection of hyperlink color in the Group and Paragraph blocks (not in Buttons).
- ✅ Dimensions > Block Spacing allows spacing between elements to be changed. The Buttons block is an easy way to verify this.
- ✅ The Border section is displayed for the Group block, and allows changing the border color, style, width, and radius.
Test Report Icons:
✅ <= Behavior is expected.
❌ <= Behavior is NOT expected.
#3
@
2 years ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/3846
Environment
- Hardware: MacBook Pro Apple M1 Pro
- OS: macOS 12.6.2
- Browser: Safari 16.2
- Server: nginx/1.23.3
- PHP: 7.4.33
- WordPress: 6.2-alpha-54642-src
- Theme: blank-canvas v1.2.9
- Gutenberg DISABLED 🔴
Actual Results
- ✅ New styles options are available in the editor's Settings sidebar.
- ✅ When applied, the styles are visible in the editor and frontend post.
Supplemental Artifacts
Example "After" post has border, button spacing, and link color adjustments applied.
Post in Blank Canvas Theme | Post After Adding appearance-tools Support
|
---|---|
#6
@
2 years ago
- Keywords has-screenshots added; needs-testing removed
- Owner set to audrasjb
- Status changed from new to accepted
Patch works fine!
Self assigning for commit
.
@audrasjb commented on PR #3846:
2 years ago
#8
Committed in https://core.trac.wordpress.org/changeset/55067
#9
@
2 years ago
Oops, missed some props.
Adding bernhard-reiter, hellofromtonya, davidbaumwald, and poena manually.
#10
follow-up:
↓ 16
@
23 months ago
I've found a bug with the block gap (in the Dimensions panel this is called block spacing),
and opened issue 47386 in the Gutenberg GitHub repository.
I think we can give it a few days to try to find a CSS solution, if not, we can perhaps revert this and add support for all appearance tools except block gap?
#11
@
23 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
Thanks @poena, yes sounds like a good plan 👌
#13
@
23 months ago
- Keywords gutenberg-merge added
Adding experimental keyword for tracking backports/syncs from Gutenberg into Core.
#14
@
23 months ago
I think we can give it a few days to try to find a CSS solution, if not, we can perhaps revert this and add support for all appearance tools except block gap?
Thanks for following up here @poena — for Classic themes, I think it'd be safer for the appearance tools opt-in to not include block gap, as it was written with block themes in mind, and it sounds like it could add a fair bit of complexity to attempt to get the layout block gap rules playing nicely with Classic themes.
#15
@
23 months ago
I suggest the following:
Re add the link color theme support, which was the feature that was removed without replacement in 5.9.
Add a new border theme support.
So these two would be separate.
#16
in reply to:
↑ 10
@
23 months ago
- Keywords close added
Replying to poena:
I've found a bug with...
As this is an enhancement that was already added to core trunk, and "feature freeze" is tomorrow, could you open a new trac ticket for this bug, and mention the Gutenberg PR in it. Then the bugfix (when ready) can be committed from that ticket.
This should be closed as fixed imho.
#18
@
23 months ago
New ticket: https://core.trac.wordpress.org/ticket/57649
#19
@
23 months ago
- Keywords close removed
- Resolution set to fixed
- Status changed from reopened to closed
As the ticket has been created for the bug, I'll close this ticket as fixed
per comment:16
Adds unit test to #3337. See original PR for additional details.
Props ockham, hellofromtonya, dream-encode, carolinan.
Trac ticket: https://core.trac.wordpress.org/ticket/57460