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

Loading indicator on unreads screen #3025

Closed
gnprice opened this issue Oct 4, 2018 · 5 comments · Fixed by #3901
Closed

Loading indicator on unreads screen #3025

gnprice opened this issue Oct 4, 2018 · 5 comments · Fixed by #3901
Assignees
Labels
a-data-sync Zulip's event system, event queues, staleness/liveness P1 high-priority

Comments

@gnprice
Copy link
Member

gnprice commented Oct 4, 2018

After the app launches, it takes us too long to get to showing up-to-date information on the unreads screen (the home screen of the nav). After the spinner completes and the unreads screen shows up, it at first shows stale data from when we last ran, while asking the server for newer data; the update to newer data takes ~2s for me on a good connection, often 3-5s, and for some users longer.

The fact that it takes that long is a problem in itself, and we should do better. That's a matter for another issue; it won't be simple to fix.

A thing that exacerbates the effect of this slowness is that for those seconds while we're showing stale data, we don't show any indication of this at all -- the screen looks exactly like it would have when that information was fresh, hours or days ago. That undermines users' trust in what they see in the app.

So, in this situation we should show an indication that we're still connecting. One reasonable form for this would be a banner a lot like our OfflineNotice, but instead of "No Internet connection", saying something like "Connecting to server...".

@gnprice
Copy link
Member Author

gnprice commented Oct 4, 2018

The title just says "unreads screen" for brevity, but I'm pretty sure we want it on at least the PMs and streams screens too for similar reasons.

@armaanahluwalia
Copy link
Collaborator

@gnprice I’d like to work on this. @zulipbot claim.

@sstangl
Copy link

sstangl commented Oct 6, 2018

Instinctively, if I know that the screen is out of date, I usually attempt swiping up, to scroll down "past the end" of the screen, which in many native applications induces refresh behavior.

The app does not support scrolling past the end -- normally, apps will let you do that, and then give a little flick up back to the locked scroll position. Secondly, that action doesn't do anything.

Even if the server took a while to load messages, that would be more OK if I felt that I could instruct the app to try to fetch more messages by swiping down / scrolling up. At least then I would know that the messages are coming. Currently I don't know what the internal app state is at all.

@gnprice
Copy link
Member Author

gnprice commented Oct 9, 2018

@sstangl Yeah, I agree. I forgot to cross-reference when I filed this issue: #2712 and #2713 call for pull-to-refresh behavior like you describe.

I think even if we already had pull-to-refresh, this loading indicator would still be important. In particular for the path from "load the app for the first time in a while" -> "see up-to-date conversations, and be confident they're up to date", which is a common interaction that it's important to make quick and easy wherever conditions make it possible. Once we have a loading indicator and a user learns to expect it, they'll get that confidence in a few hundred ms when it doesn't appear.

jainkuniya added a commit to jainkuniya/zulip-mobile that referenced this issue Dec 14, 2018
Add a refreshing prop to `SectionList`, but it is useless until
`onRefresh` prop is provided. So this commit does'nt add any visual
change.

> If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the refreshing prop correctly.
https://facebook.github.io/react-native/docs/sectionlist#onrefresh

`refreshing` prop will provide a nice indicator in the list, showing
that this is a stale data and app is fetching new data.

Fix zulip#3025
jainkuniya added a commit to jainkuniya/zulip-mobile that referenced this issue Dec 14, 2018
Add a refreshing prop to `SectionList`, but it is useless until
`onRefresh` prop is provided. So this commit does'nt add any visual
change.

> If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the refreshing prop correctly.
https://facebook.github.io/react-native/docs/sectionlist#onrefresh

`refreshing` prop will provide a nice indicator in the list, showing
that this is a stale data and app is fetching new data.

Fix zulip#3025
@gnprice
Copy link
Member Author

gnprice commented Mar 7, 2019

We keep hearing from users who regularly see stale data and take several seconds, or more, to update. Typically the symptom is reported as simply "Zulip doesn't update with new messages".

Bumping the priority accordingly -- it's long past time we added this basic piece of UI for any networked application.

(Often the reports focus on the message list, not the unreads screen -- particularly after following a notification, so the message list is the first screen the user sees. I'll file a separate, related, issue for that.)

@gnprice gnprice added the a-data-sync Zulip's event system, event queues, staleness/liveness label Mar 7, 2019
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Feb 13, 2020
Fixes: zulip#3387.
Fixes: zulip#3025.

Following the previous commit that introduced the LoadingBanner, the
loading indicator on an empty unread messages list during
`session.loading` is now redundant. Now, we can display the "No
unread messages" text as our best guess at the current state, even
though we know it's stale, since we're also displaying a loading
indicator above.
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Feb 13, 2020
Fixes: zulip#3387.
Fixes: zulip#3025.

The loading indicator on an empty unread messages list during
`session.loading` is redundant, following the introduction of
LoadingBanner in this series of commits. Now, we can display the "No
unread messages" text as our best guess at the current state, even
though we know it's stale, since we're also displaying a loading
indicator above.
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Feb 13, 2020
Fixes: zulip#3387.
Fixes: zulip#3025.

The loading indicator on an empty unread messages list during
`session.loading` is redundant, following the introduction of
LoadingBanner in this series of commits. Now, we can display the "No
unread messages" text as our best guess at the current state, even
though we know it's stale, since we're also displaying a loading
indicator above.
@chrisbobbe chrisbobbe self-assigned this Feb 13, 2020
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Feb 19, 2020
Fixes: zulip#3387.
Fixes: zulip#3025.

The loading indicator on an empty unread messages list during
`session.loading` is redundant, following the introduction of
LoadingBanner in this series of commits. Now, we can display the "No
unread messages" text as our best guess at the current state, even
though we know it's stale, since we're also displaying a loading
indicator above.
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Feb 26, 2020
The loading indicator on an empty unread messages list during
`session.loading` is redundant, following the introduction of
LoadingBanner in this series of commits. Now, we can display the "No
unread messages" text as our best guess at the current state, even
though we know it's stale, since we're also displaying a loading
indicator above.

Fixes: zulip#3387
Fixes: zulip#3025
Fixes: zulip#2725
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Mar 9, 2020
These screens use data from events but do not use the Screen wrapper
that, in a recent commit in this series, enabled the loading banner
by default.

Fixes: zulip#3387
Fixes: zulip#3025
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Mar 9, 2020
The loading indicator on an empty unread messages list during
`session.loading` is redundant, following the introduction of
LoadingBanner in this series of commits. Now, we can display the "No
unread messages" text as our best guess at the current state, even
though we know it's stale, since we're also displaying a loading
indicator above.

Fixes: zulip#3025
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Mar 9, 2020
These screens use data from events but do not use the Screen wrapper
that, in a recent commit in this series, enabled the loading banner
by default.

Fixes: zulip#3387
Fixes: zulip#3025
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Mar 9, 2020
The loading indicator on an empty unread messages list during
`session.loading` is redundant, following the introduction of
LoadingBanner in this series of commits. Now, we can display the "No
unread messages" text as our best guess at the current state, even
though we know it's stale, since we're also displaying a loading
indicator above.

Fixes: zulip#3025
@gnprice gnprice closed this as completed in dea684e Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-data-sync Zulip's event system, event queues, staleness/liveness P1 high-priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants