WordPress / WordPress/pattern-directory

Remove duplicates from pattern results

Open
#314 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Component] Pattern Directory i18n
Dominant language
PHP
Stars
134
Forks
46
Avg merge
9h 4m
Merged PRs (30d)
19

Description

When merged, #307 will change the results to include both the site/user locale, and en_US as a fallback. That has a side effect for en_* locales, where e.g., the en_AU and en_US versions of About me cards will both appear.

https://en-au.wordpress.org/patterns/search/about/

We can probably de-dupe via post_parent.

This might intersect w/ #28 because of integrating ElasticSearch.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the locale fallback behavior introduced by #307 and inspect the pattern search results for the linked en-AU example. Check how post_parent can identify duplicate patterns and consider the interaction with Elasticsearch mentioned in #28. Done means locale results retain the fallback while showing each pattern only once.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.