Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patterns: Rename edit label to Edit Block Pattern to resolve edge case in Chrome #52496

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

andrewserong
Copy link
Contributor

What?

Backport from core: WordPress/wordpress-develop#4826 — rename the Pattern post type's edit_item label to be Edit Block Pattern.

Why?

This resolves an issue in Chrome where the browser thinks that the page is in German and displays a translation popup. As mentioned in the linked PR, the reason Chrome does this isn't quite clear, but it's possibly related to there not being very much English text in the server-rendered view of the page (Chrome ignores the document's lang attribute and does what it wants). In manual testing, adding another English word to the edit item label resolves it for now.

How?

Update Edit Pattern to Edit Block Pattern for the Pattern post type.

Testing Instructions

  1. Go to /wp-admin/edit.php?post_type=wp_block to view the list of patterns.
  2. If you don't already have any patterns, add one, and then go back to that list.
  3. Click to edit one of the patterns. Before this PR, Chrome will display a popup to translate from German to English.
  4. With this PR applied, there should be no popup displayed.

When testing, go from the wp-admin page and click the edit link on the pattern to test whether or not the translation popup is displayed.

Screenshots or screencast

Before After
image image

@andrewserong andrewserong added [Type] Bug An existing feature does not function as intended [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Jul 11, 2023
@andrewserong andrewserong self-assigned this Jul 11, 2023
@andrewserong andrewserong added the Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core label Jul 11, 2023
@github-actions
Copy link

Flaky tests detected in 5467e3a.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5516674812
📝 Reported issues:

Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for following up with this!

@ramonjd ramonjd merged commit e6c4f7e into trunk Jul 11, 2023
@ramonjd ramonjd deleted the update/pattern-post-type-edit-item-label branch July 11, 2023 09:20
@github-actions github-actions bot added this to the Gutenberg 16.3 milestone Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants