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

LWS-143: Related hits search #1059

Merged
merged 10 commits into from
Jun 14, 2024
Merged

Conversation

jesperengstrom
Copy link
Contributor

Description

Tickets involved

LWS-143

Solves

Adds a search input in the toolbar section for the related search result

Summary of changes

  • Added component SearchRelated that searches in the context of the current _o and _p.
  • Zero results for the related search is no longer hidden, as it can now happen as a result of an active search.
  • Some modifications to 'main search' to stay independent of related search.

Limits/todos:

  • Searching completely clears any existing filters, due to frontends inability to modify _q param in a safe way. If we need to keep the filters, maybe template links (such as in year range) could be a solution.
  • Layout/placement of the search bar for different widths is debatable (lack of design in Figma).

@jesperengstrom jesperengstrom marked this pull request as ready for review May 31, 2024 10:09
@jesperengstrom jesperengstrom force-pushed the feature/LWS-143-related-hits-search branch from bed3398 to a636f26 Compare June 10, 2024 15:12
@jesperengstrom jesperengstrom force-pushed the feature/LWS-143-related-hits-search branch from a636f26 to 42e394a Compare June 12, 2024 10:08
Copy link
Contributor

@johanbissemattsson johanbissemattsson left a comment

Choose a reason for hiding this comment

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

I think the front-end implementation looks good but I'm a little unsure about the user experience as the search doesn't always give relevant hits.

An example:

  1. Go to http://localhost:5173/75kmmbnr2xl0fn5
  2. Try searching for kam in the related search input
  3. No results are found (I would atleast expect Kamrater på en irrande planet to appear)

@olovy
Copy link
Contributor

olovy commented Jun 13, 2024

I think the front-end implementation looks good but I'm a little unsure about the user experience as the search doesn't always give relevant hits.

An example:

1. Go to http://localhost:5173/75kmmbnr2xl0fn5

2. Try searching for `kam` in the related search input

3. No results are found (I would atleast expect _Kamrater på en irrande planet_ to appear)

I'm not sure everyone would expect that.
As it is now we don't do automatically truncate terms anywhere. We can discuss that.
Try searching for "kam*"

@johanbissemattsson
Copy link
Contributor

johanbissemattsson commented Jun 13, 2024

I'm not sure everyone would expect that. As it is now we don't do automatically truncate terms anywhere. We can discuss that. Try searching for "kam*"

Aha! That explains it. Then it's out of scope of this PR but I think it's good to discuss it further in another context.

Copy link
Contributor

@olovy olovy left a comment

Choose a reason for hiding this comment

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

We'll merge this as is and postpone fixing the cleared filters a bit.

@olovy olovy merged commit eb5819b into develop Jun 14, 2024
1 check passed
@olovy olovy deleted the feature/LWS-143-related-hits-search branch June 14, 2024 08:36
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.

3 participants