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

Fix bug relating to tags not having predefined labels #452

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Conversation

whunter
Copy link
Member

@whunter whunter commented Mar 19, 2024

Fix bug relating to tags not having predefined labels.


JIRA Ticket: (None, sorry) (:star:)

  • Other Relevant Links (Meeting note, project page, related pull requests, etc.)

What does this Pull Request do? (:star:)

Fixes bug relating to tags not having predefined labels. Tags are not included in "search facets" because they are defined IN the metadata and can't be predefined with an associated label. So the label for ANY tag should be "Tag". Actual facets should continue to render their labels as defined.
This PR also includes an update to package.json to address a bug caused by competing versions of react-refresh

What's the changes? (:star:)

A in-depth description of the changes made by this PR. Technical details and possible side effects.

  • Adds a function to SearchResults.js to handle separate case for tag label in addition to facet case
  • package.json will force react-refresh node package to 0.14.0 in to eliminate competing versions that are breaking my local installation and really getting on my nerves.

How should this be tested?

  • In the generated preview site (I'll add when it's built) go to the search page '/search'
  • Click on any item in the search results marked "Item" not "Collection"
  • Click on any tag under the "Tags" metadata field.Not every item has a tag/tags. Might have to try a few different items?
  • Check that the page renders correctly now.
  • Check that the search results also contain the tag that was clicked

Additional Notes:

  • branch: tag_label_fix

Interested parties

@otokama
@goynejennifer

(:star:) Required fields

@goynejennifer
Copy link
Collaborator

This fix works as expected. I tested this link https://tag-label-fix.d234tdmg9icdwk.amplifyapp.com/ provided by Lee and all the tags work and it renders correctly.

@whunter whunter merged commit 8ad78a6 into dev Mar 19, 2024
1 check passed
@whunter whunter deleted the tag_label_fix branch April 2, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants