Page MenuHomePhabricator

Error state for KaiOS trending articles feed
Closed, DeclinedPublic

Description

Objective

How should the app react when the api returns falsy/empty data. A potential solution is an error state to render in the feed UI, instead of just an empty feed (which is the current behavior).

We also need to log it in our client-side errors stream (sendErrorLog)


Dev notes

A sub branch to showcase potential solution: https://github.com/wikimedia/wikipedia-kaios/commit/a3b1e10679c127865b46c00018727633c84a3ffa

Event Timeline

SBisson added a subscriber: SBisson.

Putting on the kanban board so it gets attention.

@eamedina you can take care of the technical aspects. The UX (error state vs. hiding the feed) can be revisited later.

Open PR: https://github.com/wikimedia/wikipedia-kaios/pull/359

Currently in this PR we show a basic error state when there's an API error:

We can revisit this later if needed

Jpita added a subscriber: Jpita.

if I put
const page = data.query.pages[-1]
on getTrendingArticles.js L14, then page is undefined and we get this error and the trending list is empty.


is this possible to happen and should be protected or can be ignored?

I think it's unlikely to happen but it's not bad idea to guard for that just in case, could you try again with https://github.com/wikimedia/wikipedia-kaios/pull/365?

I remember @Jpita saying, when the trending articles is still loading, press enter will see the error but no harm to the user.
is it related?