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

Enable content link for no results and add pill in switcher popover item #2083

Closed
fcoveram opened this issue May 12, 2023 · 4 comments · Fixed by #2102
Closed

Enable content link for no results and add pill in switcher popover item #2083

fcoveram opened this issue May 12, 2023 · 4 comments · Fixed by #2102
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend
Projects

Comments

@fcoveram
Copy link
Contributor

fcoveram commented May 12, 2023

Problem

Currently, Openverse doesn't allow users to land on the meta search page from "All content" results when a search query doesn't bring results. The media link button shows a disabled state and we're missing the opportunity to show external sources.

Description

We can improve this flow by applying three changes

Enable the content type link

In "All content" results, content type link needs to show a "No results" label in the result area, and look and behave as described in #2078. The page should look like the following mockup.

All content results page with the content type link enabled

Add a variant to the status pill (Figma component)

'
The pill component has a new variant and the following new styles:

  • Height: 24px
  • Text style: Time style with uppercase text transformation
  • Paddings: 8px for left and right
  • "No results" variant with "dark charcoal 10" as background

Switcher item (Figma component)

The component doesn't change any space or visual style for the resting, hover, and focus status, but check icon replaces the status pill when the content type is selected. See the prototype gif below.

Cursor pointer showing the status of popover items of switcher

Additional context

@fcoveram fcoveram added 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work 🌟 goal: addition Addition of new feature ✨ goal: improvement Improvement to an existing user-facing feature 🕹 aspect: interface Concerns end-users' experience with the software 🧱 stack: frontend Related to the Nuxt frontend labels May 12, 2023
@openverse-bot openverse-bot added this to Backlog in Openverse May 12, 2023
@obulat obulat added 🟨 priority: medium Not blocking but should be addressed soon and removed 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels May 13, 2023
@obulat
Copy link
Contributor

obulat commented May 15, 2023

I am a bit concerned about the "No results" pill in the switcher popover and its effect on the perceived performance for our users.

It would not change anything for the "All content" views, but will require us to send additional requests for Image and Audio views.

Currently, if you search for cat images, Nuxt only sends one request to the /image endpoint. However, if we need to display the "No results" pill in the content switcher, we would have to send requests for all media types on single media search view on to decide if we should or shouldn't display it. We would probably do it on the first search for the search term. So, if the user is searching for "cat" images, we would still send 2 requests for both media types (or 3-4 in the future, when we add media types). Sending requests for other media types when the user opens the content switcher would make the switcher much slower.

We currently only display "No results" in the content links on the All content views (where we already loaded both media types and know that there are no results. The content switcher popover does not display anything about the number of results. The users can land on a page without results for a different media type if they use the content switcher popover. Do we really want to introduce the new pill, @WordPress/openverse-frontend ?

My vote would be for making the content links at the top of the "All content" view clickable even if there are no results (now, they are disabled in such case), but not add "No results" pill to the content switcher.

@fcoveram
Copy link
Contributor Author

I follow your concern @obulat. Thanks for bringing this up. Waiting for other folks to chime in and share their thoughts on the performance impact and what efforts this proposal requires.

My vote would be for making the content links at the top of the "All content" view clickable even if there are no results (now, they are disabled in such case), but not add "No results" pill to the content switcher.

I'm happy with this solution if folks consider it better.

@obulat obulat mentioned this issue May 15, 2023
8 tasks
@zackkrida
Copy link
Member

@obulat's suggestion is right, especially concerning performance. I didn't think of that but it's very important.

@fcoveram
Copy link
Contributor Author

So let's continue with enabling the content type link for "no results" and dismiss the "pill in switcher" idea.

Openverse automation moved this from Backlog to Done! May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Openverse
  
Done!
Development

Successfully merging a pull request may close this issue.

3 participants