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

Updated Synonyms UI #3814

Merged
merged 23 commits into from
Apr 12, 2024
Merged

Updated Synonyms UI #3814

merged 23 commits into from
Apr 12, 2024

Conversation

JakePT
Copy link
Contributor

@JakePT JakePT commented Jan 17, 2024

Description of the Change

elasticpress test_wp-admin_admin php_page=elasticpress-synonyms (4)

Introduces a new component-powered settings screen for Synonyms matching the style and functionality of the Features, Sync, Status Report and Weighting screens. The new screen also adds support for Hyponyms, for term with a hierarchical relationship, and support for many-to-many replacements.

This PR also updates the default example synonyms to reflect the new categories:

# Defined synonyms.

runner, running shoe, sneaker, tennis shoe, trainer

# Defined hyponyms.

blue => blue, aqua, azure, cerulean, cyan, ultramarine

# Defined replacements.

supposably => supposedly
flustrated => flustered, frustrated
intensive purposes => intents and purposes

How to test the Change

  1. Visit ElasticPress > Synonyms.
  2. Add a synonym rule. A search for any synonym should return results including itself and any of the other synonyms.
  3. Add a hyponym rule. A search for the hypernym should return results including itself and any of its hyponyms, but a search for any of the hyponyms should only return results for itself.
  4. Add a replacement rule. A search for any term should return results including any of its replacements, but not itself.
  5. Clicking the trash icon should delete a rule.
  6. Clicking the pencil icon should open the rule for editing. Changes should be reflected in the list after saving.
  7. Clicking multiple checkboxes and then the trash icon at the top of the table should delete all checked rules.
  8. After clicking multiple checkboxes, and then trashing a single rule, the same items should be checked.

Changelog Entry

Added - A new settings screen for synonyms, with the the ability to bulk delete synonyms, support for many-to-many replacements, and a new type of synonym for terms with a hierarchical relationship, called hyponyms.

Credits

Props @JakePT, @apurvrdx1

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@JakePT JakePT changed the title WIP: Updated Synonyms UI Updated Synonyms UI Jan 19, 2024
@JakePT JakePT marked this pull request as ready for review January 19, 2024 04:03
@JakePT JakePT added this to the 5.1.0 milestone Jan 19, 2024
@felipeelia felipeelia self-assigned this Feb 6, 2024
includes/classes/Feature/Search/Synonyms.php Outdated Show resolved Hide resolved
includes/classes/REST/Synonyms.php Outdated Show resolved Hide resolved
@felipeelia felipeelia assigned JakePT and unassigned felipeelia Mar 18, 2024
@JakePT JakePT assigned felipeelia and unassigned JakePT Apr 10, 2024
@felipeelia felipeelia merged commit 2dadd92 into develop Apr 12, 2024
22 checks passed
@felipeelia felipeelia deleted the feature/synonyms branch April 12, 2024 12:08
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.

None yet

2 participants