HomePhabricator
Diffusion Comm 6421b301872e

[web] Warn the user when deleting a chat that has contained chats

Tags
None
Referenced Files
F642488: screen2.png
Aug 2 2023, 11:21 PM
File Not Attached
F642476: screen1.png
Aug 2 2023, 11:21 PM
File Not Attached
Subscribers
None

Description

[web] Warn the user when deleting a chat that has contained chats

Summary:
Part of ENG-4319.

Before deletion, the user is warned about possible contained chats. For subchannel deletion, the modal looks like this:

screen1.png (627×1 px, 55 KB)

When deleting a whole community, message changes:

screen2.png (716×1 px, 55 KB)

When there are no contained chats, the confirmation modal does not pop up.

Depends on D8526.

Test Plan:
This modal should pop up when deleting:

  • Non-empty community
  • Subchannel with threads

Modal should not pop up when deleting:

  • Empty community
  • Empty subchannel
  • Thread

Note: right now we don't support deleting subchannels when the parent channel is deleted. What I mean is this situation:
-> Community
--> Subchannel 1
---> Subchannel 2
If we delete Subchannel 1, right now Subchannel 2 is not deleted, thus modal should not pop up.

Reviewers: bartek, tomek, inka, michal, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek

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

Details

Provenance
patrykAuthored on Aug 2 2023, 11:17 PM
Reviewer
ashoat
Differential Revision
D8530: [web] Warn the user when deleting a chat that has contained chats
Parents
rCOMMe7e6e8a7a1a9: [web] Add "Use ENS avatar" option to `EditUserAvatarMenu`
Branches
Unknown
Tags
Unknown