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

ui: Add list of recent DM conversations #119

Closed
chrisbobbe opened this issue May 26, 2023 · 3 comments · Fixed by #249
Closed

ui: Add list of recent DM conversations #119

chrisbobbe opened this issue May 26, 2023 · 3 comments · Fixed by #249
Assignees
Labels
a-home The home screens of the app; finding and starting conversations a-model Implementing our data model (PerAccountStore, etc.)
Milestone

Comments

@chrisbobbe
Copy link
Collaborator

Like PmConversationsScreen in zulip-mobile.

@gnprice
Copy link
Member

gnprice commented Jun 2, 2023

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 gnprice added the a-model Implementing our data model (PerAccountStore, etc.) label Jun 2, 2023
@gnprice gnprice added the a-home The home screens of the app; finding and starting conversations label Jun 14, 2023
@gnprice
Copy link
Member

gnprice commented Jun 16, 2023

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 zulip/zulip-mobile#5512 . For group conversations, a usable baseline would be:

  • List the names comma-separated.
  • In place of the avatar, use a "people" icon. Could use the same "group" icon that Zulip web uses for group DM conversations in the left sidebar.
  • Don't show presence or user status.

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 added a commit to chrisbobbe/zulip-flutter that referenced this issue Jul 3, 2023
Toward zulip#119, the list of recent DM conversations.

Inspired by how we do this in zulip-mobile, including in the tests.
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Jul 4, 2023
Toward zulip#119, the list of recent DM conversations.

Much of this code was transcribed from zulip-mobile; in particular,
from:
  src/pm-conversations/pmConversationsModel.js
  src/pm-conversations/__tests__/pmConversationsModel-test.js
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Jul 4, 2023
Toward zulip#119, the list of recent DM conversations.

Much of this code was transcribed from zulip-mobile; in particular,
from:
  src/pm-conversations/pmConversationsModel.js
  src/pm-conversations/__tests__/pmConversationsModel-test.js
gnprice pushed a commit to chrisbobbe/zulip-flutter that referenced this issue Jul 5, 2023
Toward zulip#119, the list of recent DM conversations.

Much of this code was transcribed from zulip-mobile; in particular,
from:
  src/pm-conversations/pmConversationsModel.js
  src/pm-conversations/__tests__/pmConversationsModel-test.js
@chrisbobbe
Copy link
Collaborator Author

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

chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 2, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 2, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 2, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 2, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 2, 2023
The screen's content area (so, the list of conversations, but not
the app bar at the top) is built against Vlad's design:
  https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594654
except that some features that appear in that design are left
unimplemented for now, since we don't have data structures for them
yet:
- unread counts
- user presence

Fixes: zulip#119
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 3, 2023
The screen's content area (so, the list of conversations, but not
the app bar at the top) is built against Vlad's design:
  https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594654
except that some features that appear in that design are left
unimplemented for now, since we don't have data structures for them
yet:
- unread counts
- user presence

Fixes: zulip#119
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 3, 2023
The screen's content area (so, the list of conversations, but not
the app bar at the top) is built against Vlad's design:
  https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594654
except that some features that appear in that design are left
unimplemented for now, since we don't have data structures for them
yet:
- unread counts
- user presence

Fixes: zulip#119
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 3, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 3, 2023
The screen's content area (so, the list of conversations, but not
the app bar at the top) is built against Vlad's design:
  https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594654
except that some features that appear in that design are left
unimplemented for now, since we don't have data structures for them
yet:
- unread counts
- user presence

Fixes: zulip#119
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 4, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 4, 2023
The screen's content area (so, the list of conversations, but not
the app bar at the top) is built against Vlad's design:
  https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594654
except that some features that appear in that design are left
unimplemented for now, since we don't have data structures for them
yet:
- unread counts
- user presence

Fixes: zulip#119
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 8, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 8, 2023
…ting

This way, the Route object itself is distinguishable from other
Route objects. This will come in handy in widget tests for the
upcoming recent-DMs screen (zulip#119), where we'll want to assert that
tapping on a conversation brings up the appropriate message list.

While we're at it, add the usual
`extension FooChecks on Subject<Foo>` boilerplate that we'll use in
those tests.
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 8, 2023
The screen's content area (so, the list of conversations, but not
the app bar at the top) is built against Vlad's design:
  https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594654
except that some features that appear in that design are left
unimplemented for now, since we don't have data structures for them
yet:
- unread counts
- user presence

Fixes: zulip#119
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 9, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 9, 2023
…ting

This way, the Route object itself is distinguishable from other
Route objects. This will come in handy in widget tests for the
upcoming recent-DMs screen (zulip#119), where we'll want to assert that
tapping on a conversation brings up the appropriate message list.

While we're at it, add the usual
`extension FooChecks on Subject<Foo>` boilerplate that we'll use in
those tests.
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 9, 2023
The screen's content area (so, the list of conversations, but not
the app bar at the top) is built against Vlad's design:
  https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594654
except that some features that appear in that design are left
unimplemented for now, since we don't have data structures for them
yet:
- unread counts
- user presence

Fixes: zulip#119
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 10, 2023
…ting

This way, the Route object itself is distinguishable from other
Route objects. This will come in handy in widget tests for the
upcoming recent-DMs screen (zulip#119), where we'll want to assert that
tapping on a conversation brings up the appropriate message list.

While we're at it, add the usual
`extension FooChecks on Subject<Foo>` boilerplate that we'll use in
those tests.
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 10, 2023
The screen's content area (so, the list of conversations, but not
the app bar at the top) is built against Vlad's design:
  https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594654
except that some features that appear in that design are left
unimplemented for now, since we don't have data structures for them
yet:
- unread counts
- user presence

Fixes: zulip#119
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 10, 2023
The screen's content area (so, the list of conversations, but not
the app bar at the top) is built against Vlad's design:
  https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20DM-conversation.20list/near/1594654
except that some features that appear in that design are left
unimplemented for now, since we don't have data structures for them
yet:
- unread counts
- user presence

Fixes: zulip#119
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 10, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Aug 10, 2023
…ting

This way, the Route object itself is distinguishable from other
Route objects. This will come in handy in widget tests for the
upcoming recent-DMs screen (zulip#119), where we'll want to assert that
tapping on a conversation brings up the appropriate message list.

While we're at it, add the usual
`extension FooChecks on Subject<Foo>` boilerplate that we'll use in
those tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-home The home screens of the app; finding and starting conversations a-model Implementing our data model (PerAccountStore, etc.)
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants