Make WordPress Core

Opened 7 months ago

Closed 5 months ago

Last modified 4 months ago

#61708 closed enhancement (fixed)

Remove the social links pattern

Reported by: mikachan's profile mikachan Owned by: peterwilsoncc's profile peterwilsoncc
Milestone: 6.7 Priority: normal
Severity: normal Version: 6.7
Component: Editor Keywords: has-patch needs-testing needs-dev-note
Focuses: Cc:

Description

Core includes a pattern called "Social links with a shared background color". It was added around 3 years ago as part of the Core block patterns. However, it is not a quality example of a pattern, and it is the only non-Query Loop pattern leftover from when we migrated patterns to load from the Pattern Directory. It has been discussed in this Gutenberg issue that it would be best to remove this pattern from Core.

Related Gutenberg issue: https://github.com/WordPress/gutenberg/issues/55572
Original ticket to add the pattern: https://core.trac.wordpress.org/ticket/53248

Change History (11)

This ticket was mentioned in PR #7063 on WordPress/wordpress-develop by @mikachan.


7 months ago
#1

  • Keywords has-patch added

This PR removes the "Social links with a shared background color" pattern from Core, which addresses the discussion in this Gutenberg issue: https://github.com/WordPress/gutenberg/issues/55572.

Trac ticket: https://core.trac.wordpress.org/ticket/61708#ticket

#2 @mikachan
7 months ago

  • Keywords needs-testing added

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


6 months ago

#4 @mikachan
6 months ago

Highlighting some discussions from a recent Dev Chat:

From @joemcgill: What happens to sites that are currently using that pattern in a template? Does the pattern stop being rendered, or is there a way to ensure that the change doesn't adversely effect sites that are depending on it?

From @peterwilsoncc: My suggestion would be soft deprecation and hide it from the inserter if it's too poor quality for Core.

From @kirasong: I imagine this will not be the last time there’s a need to deprecate a pattern, and creating a standard way to do so / process to follow can help with future changes too.


Thanks all 🙇 I like the suggestion of a soft deprecation and hiding it from the inserter. I'll work on that as soon as I can and will monitor this ticket for any further feedback in the meantime.

#5 @mikachan
6 months ago

  • Milestone changed from Awaiting Review to 6.7

Thanks for the suggestions. I've updated the PR to add a deprecation notice to the pattern and left the pattern file in place. Any sites currently using the pattern will still be able to access it, but the pattern will not show in the inserter any longer.

This is ready for another review, thank you!

I've added this to the 6.7 milestone, as it would be great to include this in the next release. cc @chaion07 @stoyangeorgiev

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


5 months ago

#7 @peterwilsoncc
5 months ago

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

In 59019:

Editor: Deprecate "Social links with a shared background color" pattern.

Removes the pattern from the inserter while retaining the related code to ensure the content renders for sites making use of the pattern.

Props annezazu, talldanwp, richtabor, mikachan.
Fixes #61708.

@mikachan commented on PR #7063:


5 months ago
#9

Thanks so much, @peterwilsoncc!

#10 @poena
4 months ago

Hi
A PHP notice is showing for any theme that still use this pattern.
I assume that PHP notices won't show in the .org theme directory, but it may on other servers.

Notice: Function WP_Block_Patterns_Registry::unregister was called incorrectly.
Pattern "core/social-links-shared-background-color" not found.
Please see Debugging in WordPress for more information.
(This message was added in version 5.5.0.) in D:\LocalSites\67\app\public\wp-includes\functions.php on line 6087

To test, install and activate this theme: https://wordpress.org/themes/mendo/

I did not go searching; I was testing something else in the Site Editor and happened to randomly install the only theme in the entire theme directory that use this pattern.

Pinging @solicowp for awareness.

#11 @peterwilsoncc
4 months ago

  • Keywords needs-dev-note added

@poena Reviewing the code of the theme, it's because it's been unregistered. I think including a paragraph in field guide or developer focused changes dev note will suffice. Searching for themes mentioning this pattern, there are 400 installs in total. https://wpdirectory.net/search/01JAP49K55M9WCEZ51ASKCDJA6

The pattern "core/social-links-shared-background-color" is no longer registered by default. Existing sites that are using the pattern will be unaffected. Themes that de-register the pattern will no longer need to do so for sites running WordPress 6.7; themes supporting multiple versions of WordPress should check the pattern is registered before attempting to de-register it.

Note: See TracTickets for help on using tickets.