HomePhabricator
Diffusion Comm 3fd1233147c1

[web] Change ThreadList behaviour after hiding ChatThreadComposer

Description

[web] Change ThreadList behaviour after hiding ChatThreadComposer

Summary:
Depends on D4939
Context: here

Changing behaviour after closing ChatThreadComposer.

Now, when we close thread composer on pending thread by clicking the X button, app will focus on the first thread on the top of the list

In other cases, app will focus on the currently generated or matched thread.

Also, this diff improves behavior of ChatThreadListItem onClick event. Now, clicking on currently active thread in chat creation mode doesn't close ChatThreadComposer.

Test Plan:
Steps to test new ChatThreadComposer behavior:

  1. Click Create new chat
  2. Create pending thread (don't select any users or select set of users, which doesn't match to any existing thread)
  3. Close composer by click X button

Now, app is currently focused on the first thread from the thread list.

In other cases, when we send a message to a new thread or we close ChatThreadComposer on an already existing thread, app keeps focus on the current thread.

Steps to test new ChatThreadListItem behavior:

  1. Click Create new chat: a) Click on currently active ChatThreadListItem -> chat creation mode still active b) Click on any other ChatThreadListItem -> app switches active chat item to the new one and closes chat creation mode

Reviewers: tomek, atul, ashoat

Reviewed By: tomek, ashoat

Subscribers: ashoat, tomek, atul, abosh

Differential Revision: https://phab.comm.dev/D4940

Details

Provenance
jakubAuthored on Sep 8 2022, 4:44 AM
Reviewer
tomek
Differential Revision
D4940: [web] Change ThreadList behaviour after hiding ChatThreadComposer
Parents
rCOMM005bd9ece94e: [services] Backup - Blob Get Client - Prepare for error handling
Branches
Unknown
Tags
Unknown