zulip / zulip-flutter

Future Zulip client using Flutter
Apache License 2.0
174 stars 163 forks source link

ui: Add list of recent DM conversations #119

Closed chrisbobbe closed 1 year ago

chrisbobbe commented 1 year ago

Like PmConversationsScreen in zulip-mobile.

gnprice commented 1 year ago

This feature has two parts: the data, and the UI.

The data comes from recent_private_conversations in the initial data from the server: search for recent_private_conversations at https://zulip.com/api/register-queue . We'll want to add that data to our InitialSnapshot class in order to deserialize it from the server's response, and then propagate it to PerAccountStore. See the streams and subscriptions fields on both those classes for examples.

For a full implementation, we'll need to keep the data up to date using server events, in particular MessageEvent which represents a new message. We'll want to do this with an appropriate data structure that lets those updates happen efficiently. That's a bit complex, so for the scope of this issue we can just not update the data, and use a data structure that's in basically the same shape as what the server gives us; we have #135 to track the need to update this and other data.

For the UI, let's give this list its own screen, and navigate to the screen with a new button added to HomePage. (We'll be fitting it into a better overall nav scheme later; but that nav scheme will be easier to develop once we have a couple of top-level screens like this one to fit into it.) The list items should show the names and avatars of the other users in each conversation. Once we have screens for the DM conversations (#142), the list items will navigate to the conversations; but if we do this issue before #142, we can just leave that navigation out, and it'll be easy to add as part of #142.

gnprice commented 1 year ago

For the UI, let's give this list its own screen […] The list items should show the names and avatars of the other users in each conversation.

Chat thread asking @terpimost for input on the design: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594568

As a baseline, for 1:1 conversations we can make the list items look like the design in https://github.com/zulip/zulip-mobile/issues/5512 . For group conversations, a usable baseline would be:

Those baseline designs are for getting something usable at alpha level without much work; if there's a design aspect in them that's complicated to implement, we should leave that as a TODO and save the polish effort for after further discussion, when we have a design we're more confident we'll want to stick with.

If we do this issue before tracking users' presence (#196) or status (#197), we can leave those out of the scope of this issue. In that case, we'll add them to this UI as part of the issue for adding the data, #196 or #197 respectively.

chrisbobbe commented 1 year ago

Chat thread asking @terpimost for input on the design: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594568

Copying @terpimost's reply there:

Greg Price I thought conceptually is this screen