Making WordPress.org

Opened 19 months ago

Closed 16 months ago

Last modified 11 months ago

#6545 closed enhancement (fixed)

Add ability to filter for themes with style variations

Reported by: dufresnesteven's profile dufresnesteven Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: Theme Directory Keywords: has-patch
Cc:

Description

Building on #6059, which adds a style variations preview to the single theme page, we should also add the ability to see which themes include style variations and which do not from the archive/directory view.

I think the easiest way to accomplish this is to create a new theme tag:
style-variations.

Doing so will allow the active filtering of these themes without needing to make many if any code changes.

A longer-term solution should look at exposing these features visibly somehow without needing to find the obscured filters that we currently have. This feature should be judged equally with others and therefore, this type of implementation should be better debated and falls out of the scope of this ticket and the immediate need to see themes with style variations.

Change History (18)

#1 @dufresnesteven
19 months ago

  • Type changed from defect (bug) to enhancement

#2 follow-up: @poena
19 months ago

A new tag needs to be added both in core and meta, so a core ticket is also needed.

I think the tag name is clear. It needs to be combined with a short description.

This ticket was mentioned in PR #101 on WordPress/wordpress.org by @dufresnesteven.


19 months ago
#3

  • Keywords has-patch added

Addresses: https://meta.trac.wordpress.org/ticket/6545

This PR adds style-variations to the relevant wordpress.org files.

## Other Places that need updating:
Docs: https://make.wordpress.org/themes/handbook/review/required/theme-tags/
Core: https://github.com/WordPress/wordpress-develop/blob/04e8bb4bb5ed37dade1b1ddda634e45f7503820d/src/wp-admin/includes/theme.php#L337
Theme-Check: https://github.com/WordPress/theme-check/blob/83fde0f6dd53ca104a5588fcfa1c1da72163941b/checks/class-style-tags-check.php#L141

Any other ones?

## Testing Notes:

  • This API would need to return it: https://api.wordpress.org/themes/info/1.1/?action=feature_list
  • When viewing the theme directory, it should show up as feature to filter on
  • Theme checks should not error on the inclusion of that tag.
  • Not sure how core uses it, seems like an API fallback, but where is it used I wonder....need to look into this.

#4 in reply to: ↑ 2 ; follow-up: @dufresnesteven
19 months ago

Replying to poena:

A new tag needs to be added both in core and meta, so a core ticket is also needed.

I think the tag name is clear. It needs to be combined with a short description.

Is the short description for the documentation page?

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


19 months ago

#6 follow-ups: @joyously
19 months ago

Does the theme have to be a block theme to use this tag? My theme has style variations that are selectable in the Customizer.

#7 in reply to: ↑ 6 @dufresnesteven
19 months ago

Replying to joyously:

Does the theme have to be a block theme to use this tag? My theme has style variations that are selectable in the Customizer.

Interesting, the implementation is specific to block themes but I wonder if they could work side by side. I'll take a look.

#8 @dufresnesteven
19 months ago

This trend of exposing new theme features is likely to continue. Is converting some parts of your theme to a block theme a possibility?

https://developer.wordpress.org/themes/block-themes/converting-a-classic-theme-to-a-block-theme/

#9 @joyously
19 months ago

Is converting some parts of your theme to a block theme a possibility?

No, I'm supporting older versions and don't do any block stuff.

#10 in reply to: ↑ 4 @poena
19 months ago

Replying to dufresnesteven:

Is the short description for the documentation page?

I thought they were used in the theme filter, but you may be right, I don't see the description, neither visible or as tool tip, aria-label or similar.

Last edited 19 months ago by poena (previous) (diff)

#12 in reply to: ↑ 6 @dufresnesteven
19 months ago

Replying to joyously:

Does the theme have to be a block theme to use this tag? My theme has style variations that are selectable in the Customizer.

I checked out twenty8teen, assuming that's what you are referring to. By style variations, do you mean the ability to choose different colors and apply them to the theme? I don't see anywhere I can apply a predefined set of styles that update the site. If it's the ability to modify the color palette manually, this feature won't be able to support that.

#13 @joyously
19 months ago

By style variations, do you mean the ability to choose different colors and apply them to the theme?

No, while my theme does have that, it also has presets that are any combination of the theme's options. The theme provides some presets, but the user can save their own and apply them on any page. It's available in the Customizer under Advanced section.
A narrow definition of "style-variations" doesn't help the user find themes that do what the tag implies.

#14 @tellyworth
19 months ago

Global style variations is a core feature. It's reasonable and useful to have a tag exclusively for filtering themes that support that specific core feature. Allowing other themes to use that same tag when they don't actually support the core feature would be detrimental to users.

This ticket was mentioned in Slack in #core by sergey. View the logs.


16 months ago

#16 @SergeyBiryukov
16 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 12372:

Theme Directory: API: Add style-variations tag for WordPress 6.0+.

Props dufresnesteven, poena, joyously, tellyworth.
Fixes #6545. See #WP56869.

@SergeyBiryukov commented on PR #101:


16 months ago
#17

Thanks for the PR! Merged in r12372.

This ticket was mentioned in Slack in #meta by mikachan. View the logs.


11 months ago

Note: See TracTickets for help on using tickets.