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

feat(lxlweb): Decorated suggestions (LWS-321) #1210

Merged
merged 14 commits into from
Feb 5, 2025

Conversation

jesperengstrom
Copy link
Contributor

@jesperengstrom jesperengstrom commented Jan 30, 2025

Description

Tickets involved

LWS-321

Solves

Adds decorated data to supersearch suggestions in the form of a SuggestCard component, basically a slimmed version of SearchCard. Now also fetching results for Work, Agent, Concept & Language types.

As a result of new types showing up, the web-card lenses needed adjustment. I chose a minimal approach, see examples below.

We also need to tweak relevance between types; a search for 'Mikael Yvesand' returns the Person as the last result.

Upgraded Svelte to be able to use the new more flexible class array syntax.

Skärmavbild 2025-01-30 kl  23 36 02 Skärmavbild 2025-01-30 kl  23 36 13

Skärmavbild 2025-01-30 kl  23 45 36 Skärmavbild 2025-01-31 kl  09 39 22

Skärmavbild 2025-01-30 kl  23 47 35 Skärmavbild 2025-01-31 kl  09 39 53

Summary of changes

  • Add component SuggestionCard
  • Include more types to search, format data in /supersearch api route
  • Tweak cards for Agent Concept, Language in display-web + additional formatters
  • Subsequent minor tweaks to SearchCard
  • Breakout getInstanceData function into utils file and add tests
  • Add more type icons
  • Implement esScore debug for suggestions
  • Some more tweaks to dialog/combobox layout
  • Upgrade Svelte to 5.18.0

@jesperengstrom jesperengstrom marked this pull request as ready for review January 31, 2025 08:56
@jesperengstrom jesperengstrom requested review from johanbissemattsson and olovy and removed request for johanbissemattsson January 31, 2025 08:56
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.

Looking good! 🖼️

We should improve handling of instances but that is a separate issue.

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.

LGTM! 🙌

I think the focus when doing a more final version should be to make the result items as small as possible (while still being usable/accessible) due to the limited space available. This is even more cruical on mobile devices as there will also often be a keyboard occupying space underneath.

See attached screenshot where I tried removing the borders and changing the max-height to 56px instead of 72px (we could probably make it even smaller if we adjust the font sizes):
Skärmavbild 2025-02-05 kl  11 01 55

Compared to:
Skärmavbild 2025-02-05 kl  11 02 06

It can also affect the choice of number of results to show (I think fewer is better to avoid information overload).

@jesperengstrom
Copy link
Contributor Author

I'm all for that, considering the menu will have more stuff (search history etc) we have to be able to fit everything. If you still have the code changes you're welcome to push :)

@johanbissemattsson
Copy link
Contributor

I'm all for that, considering the menu will have more stuff (search history etc) we have to be able to fit everything. If you still have the code changes you're welcome to push :)

👍 I made some minor styling adjustments in 535554e

@jesperengstrom jesperengstrom merged commit d12eca9 into develop Feb 5, 2025
2 checks passed
@jesperengstrom jesperengstrom deleted the feature/lxlweb-decorated-suggestions branch February 5, 2025 12:50
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