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 message list when data is stale #3387

Closed
gnprice opened this issue Mar 7, 2019 · 6 comments · Fixed by #3901
Closed

Loading indicator on message list when data is stale #3387

gnprice opened this issue Mar 7, 2019 · 6 comments · Fixed by #3901
Assignees
Labels
a-data-sync Zulip's event system, event queues, staleness/liveness a-message list P1 high-priority

Comments

@gnprice
Copy link
Member

gnprice commented Mar 7, 2019

Similar to #3025, but for the message list. This is an especially important UI surface for this situation because users often start the app by opening a notification, which navigates straight to the message list past the unreads screen.

One simple, good design for an indicator would be a banner a lot like our OfflineNotice, but instead of "No Internet connection", saying something like "Connecting to server...". That's a common design among other messaging apps.

@gnprice gnprice added a-message list a-data-sync Zulip's event system, event queues, staleness/liveness P1 high-priority labels Mar 7, 2019
@thedeveloperr
Copy link

New contributor to zulip mobile. Have only worked on zulip backend. Is this a first good issue for new contributor?

@anh2111htd
Copy link
Collaborator

@gnprice Fixed this in #3430, please review.

@chrisbobbe
Copy link
Contributor

Hmm, once #3802 is fixed (which will probably be soon), will this still be a shortcoming in handling the loading state, or will it maybe be time to close this rather old issue and its PR?

@rk-for-zulip
Copy link
Contributor

I don't believe a fix for #3802 would help with this; the user would still be looking at old state for some time after clicking the notification.

@chrisbobbe
Copy link
Contributor

chrisbobbe commented Jan 21, 2020

the user would still be looking at old state for some time after clicking the notification.

Mmm, right! The proposed fix for #3802 eliminates the "No messages" message during the period when we are re-registering, by showing the stale data, but it still doesn't indicate that the messages are stale. I like the idea of a banner for this, as mentioned here, since it's still helpful to see even stale messages when re-registering.

I see there's a PR open for the present issue, but I believe it's erroneously using caughtUp for the loading state in question, when it should instead use session.loading. It also shows the loading indicator in the context of a narrow. If I've understood the scope of this issue, this particular loading period (during, and only during, the /register request) is global and should be shown no matter what screen you're looking at (similar to the "No Internet connection" banner mentioned above). Actually, if this is correct, I believe #3025 may be identical to this issue.

I'm happy to make a new PR or help in some other way, just let me know.

@gnprice
Copy link
Member Author

gnprice commented Jan 22, 2020

If I've understood the scope of this issue, this particular loading period (during, and only during, the /register request) is global and should be shown no matter what screen you're looking at (similar to the "No Internet connection" banner mentioned above). Actually, if this is correct, I believe #3025 may be identical to this issue.

Hmm, yeah, this may be the best way to do it. Certainly there's a long tail of screens that show data from the server, and that should have a loading indicator when our data from the server is stale; and it'd be best not to try to handle them one by one.

There are a few screens that shouldn't have this banner, because they aren't about any one server.

  • The various onboarding and login screens might be taken care of for free, because it might be the case that session.loading is never true when we're on them. Needs investigation, though, as part of a PR.
  • AccountPickScreen might be the most interesting: I believe if you hit "Switch account", you'll get to that screen but there's still an active, logged-in account and session.loading might still be true.
  • The settings screens don't really need the banner, but it wouldn't seem out of place there either.

@chrisbobbe chrisbobbe self-assigned this Feb 12, 2020
chrisbobbe pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Feb 13, 2020
…ng state.

For zulip#3387, provide the component to be used to show a loading
banner during the /register request.

This will be much improved with an animation, but progress is
blocked by zulip#3899. One idea is to give the exit animation a shorter
duration than the entrance animation, to give the impression that
we've been awaiting updates just as attentively as the user, and
that we're eager to show the updates and get out of the way
immediately.
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
…ng state.

For zulip#3387, provide the component to be used to show a loading
banner during the /register request.

This will be much improved with an animation, but progress is
blocked by zulip#3899. One idea is to give the exit animation a shorter
duration than the entrance animation, to give the impression that
we've been awaiting updates just as attentively as the user, and
that we're eager to show the updates and get out of the way
immediately.
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 19, 2020
…ng state.

For zulip#3387, provide the component to be used to show a loading
banner during the /register request.

This will be much improved with an animation, but progress is
blocked by zulip#3899. One idea is to give the exit animation a shorter
duration than the entrance animation, to give the impression that
we've been awaiting updates just as attentively as the user, and
that we're eager to show the updates and get out of the way
immediately.
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
…ng state.

For zulip#3387, provide the component to be used to show a loading
banner during the /register request.

This will be much improved with an animation, but progress is
blocked by zulip#3899. One idea is to give the exit animation a shorter
duration than the entrance animation, to give the impression that
we've been awaiting updates just as attentively as the user, and
that we're eager to show the updates and get out of the way
immediately.
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
For zulip#3387, provide the component to be used to show a loading
banner during the /register request.

This will be much improved with an animation, but progress is
blocked by zulip#3899. One idea is to give the exit animation a shorter
duration than the entrance animation, to give the impression that
we've been awaiting updates just as attentively as the user, and
that we're eager to show the updates and get out of the way
immediately.
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
For zulip#3387, provide the component to be used to show a loading
banner during the /register request.

This will be much improved with an animation, but progress is
blocked by zulip#3899. One idea is to give the exit animation a shorter
duration than the entrance animation, to give the impression that
we've been awaiting updates just as attentively as the user, and
that we're eager to show the updates and get out of the way
immediately.
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
gnprice pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Mar 9, 2020
For zulip#3387, provide the component to be used to show a loading
banner during the /register request.

This will be much improved with an animation, but progress is
blocked by zulip#3899. One idea is to give the exit animation a shorter
duration than the entrance animation, to give the impression that
we've been awaiting updates just as attentively as the user, and
that we're eager to show the updates and get out of the way
immediately.
@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 a-message list P1 high-priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants