zulip / zulip-mobile

Zulip mobile apps for Android and iOS.
https://zulip.com/apps/
Apache License 2.0
1.28k stars 643 forks source link

Replace unread messages banner #4930

Open alya opened 3 years ago

alya commented 3 years ago

The unread messages banner is not very intuitive or visually appealing in its current form. The first thing to fix is #4526, but we should also experiment with other ideas for improving it. A couple of ideas:

See also CZO discussion.

Jumeb commented 2 years ago

I would love to work on this task and also experiment with the ideas you have given to see the end results. Will be sending screenshots in the days ahead.

Jumeb commented 2 years ago

The unread messages banner is not very intuitive or visually appealing in its current form. The first thing to fix is #4526, but we should also experiment with other ideas for improving it. A couple of ideas:

  • The banner could become a pill at the bottom of the view, which is more intuitive, because unread messages are generally below the viewport. Possible pill wording: "Mark all X unread messages as read". Ideally, there would be some kind of visual indication that messages got marked as read, besides the button disappearing when you click it. There is also a question of whether the button should scroll the view in some way.
  • Another option is top put the indicator at bottom when there are unreads below, at the top when the are unreads above, and both when both are the case. For example, this is what Dropbox Paper does:

See also CZO discussion.

@alya I read the tread attached to this issue and I think I found origin of the webView jumps. I did some experiments and I found out that when we animate the scalling, there's some sort of virtual box that is left behind by the animated component, then we now abruptly change the the display from flex to none without animation (cannot animate display) then it creates this empty space which the webView then fills it up instanteneously thus causing the jump.

Solution: From my experiments I found out the best way to solve the jump was to animate the height instead of switching the display property: -

Please can you help me out.

alya commented 2 years ago

Since I'm not an engineer, @gnprice or @chrisbobbe will need to comment on the technical details. :)

alya commented 2 years ago

It's probably best to have a discussion more interactively on chat.zulip.org.

Jumeb commented 2 years ago

Thanks for the comment @alya

gnprice commented 2 years ago

I think I found origin of the webView jumps.

It looks like this is really about #4526, about making the banner no longer cause the screen to jump. This issue #4930 is about replacing the banner with something else.

In any case, for cross-reference, here's the chat thread from that comment.