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

DOP-4065 frontend #937

Merged
merged 6 commits into from
Nov 1, 2023
Merged

DOP-4065 frontend #937

merged 6 commits into from
Nov 1, 2023

Conversation

seungpark
Copy link
Collaborator

@seungpark seungpark commented Oct 13, 2023

Stories/Links:

DOP-4065

Description:

This PR utilizes new attributes returned from /search API endpoint, specifically documents[].facets[] Example here: https://docs-search-transport.mongodb.com/search?q=$and

Goal is the show the tagged facets on each document in the search results

Current Behavior:

Current behavior on prod:

Current behavior on master with feature flag on, shows no facet tags on search results

Staging Links:

Staged changes with feature flag = off

Staged changes with feature flag on

@seungpark seungpark marked this pull request as ready for review October 24, 2023 18:08
@seungpark seungpark requested review from mmeigs and rayangler October 24, 2023 18:08
Copy link
Collaborator

@rayangler rayangler left a comment

Choose a reason for hiding this comment

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

Mostly lgtm. Just a few questions for clarification

src/components/SearchResults/SearchResult.js Outdated Show resolved Hide resolved
src/components/SearchResults/SearchResult.js Outdated Show resolved Hide resolved
Comment on lines 171 to 172
{facets.filter(getFacetName).map((facet) => (
<StyledTag variant={getFacetTagVariant(facet)}>{getFacetName(facet)}</StyledTag>
Copy link
Collaborator

Choose a reason for hiding this comment

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

(No change needed; more for discussion) I noticed that in the designs, the parent target product is typically the leftmost facet tag in the search result, but this might not be true with the current implementation. Is this something that we should have docs-search-transport handle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i agree with the suggestion. the front end should not be responsible for sorting (re discussion of taxonomy order in https://jira.mongodb.org/browse/DOP-4109)

src/components/SearchResults/Facets/utils.js Outdated Show resolved Hide resolved
src/components/SearchResults/Facets/FacetTags.js Outdated Show resolved Hide resolved
@seungpark seungpark requested a review from rayangler October 31, 2023 15:43
@seungpark seungpark merged commit 7a94c1f into master Nov 1, 2023
2 checks passed
@seungpark seungpark deleted the DOP-4065-frontend branch November 1, 2023 13:16
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