Page MenuHomePhabricator

Empty state for Search and Article Change language page
Closed, ResolvedPublic

Description

Both search and article change page use ListView component, and currently show the empty state when there is no item.

Article change language page : T234628#5789845

We need a design for when there are no search or language results.

Proposed designs

No search results foundNo internet connection on searchNo language search results
08 - Search results - no results.png (640×480 px, 22 KB)
13 - No connection search results.png (640×480 px, 29 KB)
08a - change search language - no search results found.png (640×480 px, 22 KB)
https://zpl.io/a7xnpgEhttps://zpl.io/Vxv4kQwhttps://zpl.io/bzRGxOG

Event Timeline

hueitan updated the task description. (Show Details)

Note that the article API output contains languagecount to indicate in how many other languages the article is available. When this is 0, we could hide or disable the article language menu option so we don't have to deal with an empty state on that screen.

Note that the article API output contains languagecount to indicate in how many other languages the article is available. When this is 0, we could hide or disable the article language menu option so we don't have to deal with an empty state on that screen.

agree with hiding the article language menu when languagecount=0 👍

Hiding the language menu sounds good to me.

I think we still need the No result found page in article language page

Here's one exception I found

go to the article en/Fessale, go to the second page and choose Hodh Ech Chargui, the languagecount is given 27, but when you go to the article language page, it returns 0 langlinks.

but if you go to the page Hodh Ech Chargui Region, and it's article language page, then we will have those 27 langlinks.

I have tried on mobile web page, when we load https://en.m.wikipedia.org/wiki/Hodh_Ech_Chargui, it will redirect to https://en.m.wikipedia.org/wiki/Hodh_Ech_Chargui_Region, so the above problem won't be existed, maybe we can do the same here. will try and see

hueitan moved this task from Backlog to Dev on the Inuka-Team (Kanban) board.

To summarize this task, we need to show the empty state (No results found message) when searching the item in the following pages

  1. App Language Setting
  2. Search Article
  3. Article Language Setting

Noted that the proposed design for the No Internet Connection is being handled in other task

I have tried on mobile web page, when we load https://en.m.wikipedia.org/wiki/Hodh_Ech_Chargui, it will redirect to https://en.m.wikipedia.org/wiki/Hodh_Ech_Chargui_Region, so the above problem won't be existed, maybe we can do the same here. will try and see

@SBisson
Since we have this problem only after the article preview, we use the new summary API, the api returns titles.canonical, in this case Hodh_Ech_Chargui_Region, we can use this to load the article page without worrying about the redirection.

Edit: Fix pr can be seen here https://github.com/wikimedia/wikipedia-kaios/pull/97

Closing as both this and T242553 are resolved.