Skip to content

Add the pattern preview#169

Closed
amieiro wants to merge 6 commits into
WordPress:trunkfrom
amieiro:add-pattern-preview
Closed

Add the pattern preview#169
amieiro wants to merge 6 commits into
WordPress:trunkfrom
amieiro:add-pattern-preview

Conversation

@amieiro

@amieiro amieiro commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

Problem

When you see the strings to translate in a pattern, you don't have a live preview to be able to see the strings in context.

Solution

This PR adds the live preview for the patterns, using the filter and action added in GlotPress.

image

image

Responsive preview (under 1280 px)

image

Testing Instructions

You need to use this GlotPress branch (or the develop branch if this branch has been merged).

You need to add the &pattern_preview=true text in the URL to enable this preview.

To test this PR:

  1. Go to the patterns page in any language.
  2. Click on the link of a pattern to see the live preview.
  3. Click in another projects like WordPress.org, a theme or a plugin to be sure that the preview is only showed in the patterns.

amieiro and others added 2 commits July 31, 2023 17:25
…projects/wporg-gp-virtual-projects.php

Co-authored-by: Alex Kirk <akirk@users.noreply.github.com>
@amieiro amieiro requested a review from akirk July 31, 2023 15:29
@akirk

akirk commented Sep 6, 2023

Copy link
Copy Markdown
Member

After some hiccups with getting the patch applied and realizing I need to append &pattern_preview=true, it works!

@amieiro

amieiro commented Sep 6, 2023

Copy link
Copy Markdown
Contributor Author

@akirk can you review this related GlotPress PR, so we can include it in the next GlotPress release?

@akirk akirk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

GlotPress/GlotPress#1665 is already approved, we can move ahead with this one!

bazza pushed a commit that referenced this pull request Sep 20, 2023
@amieiro

amieiro commented Sep 20, 2023

Copy link
Copy Markdown
Contributor Author

I have released this PR to production and I have informed to the community about this improvement. I close this PR.

@amieiro amieiro closed this Sep 20, 2023
outdoor2kode pushed a commit to outdoor2kode/wordpress.org that referenced this pull request Jan 28, 2024
@amieiro amieiro deleted the add-pattern-preview branch May 28, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants