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

community owner should be able to delete channels #400

Closed
holmesworcester opened this issue Mar 28, 2022 · 13 comments
Closed

community owner should be able to delete channels #400

holmesworcester opened this issue Mar 28, 2022 · 13 comments
Assignees
Labels

Comments

@holmesworcester
Copy link
Contributor

holmesworcester commented Mar 28, 2022

Right now no one can remove channels, so our workspace just gets more and more cluttered with meaningless or obsolete channels.

The most important stuff:

  1. The community owner should be able to remove channels, on desktop.
  2. Only the owner has this ability
  3. Deleting a channel should communicate to all other community member devices that the channel should be deleted.
  4. On desktop and mobile, all member devices should stop loading and syncing this channel, so that it has no impact on performance anymore. (this is the most important thing because channel size is causing a performance problem)
  5. Channel should disappear from UI
  6. All requests to delete channels signed by non-owner should be ignored as invalid
  7. We have a design for a "three dots" menu in the top right of the channel view. This can have a single item: "Delete channel".
  8. The user should get a confirmation dialog "Delete #channel-name? This cannot be undone. [Yes / No]"
  9. Deleting the general channel should erase all messages but create a new #general channel so we have a place to put "joined" messages e.g..

Additional requirements (non-urgent but important, so make issues for these if we don't do them now):

  1. Deleted messages should be deleted from all devices, with the channel name. Tests confirm that no local data about the channel can remain or be synced with any user once the channel is deleted.
  2. Owner should be able to remove channels on mobile
  3. We should show a special message similar to our "Channel created" message in #general that the channel has been deleted, e.g. "@holmes deleted #channel-name". If general is deleted this should appear in the new #general

UPDATE: As discussed, I created separate issues for the access controller, for attachment file deletion, and for attachment IPFS block deletion: #1489, #1490, #1491

@holmesworcester holmesworcester changed the title community owner should be able to remove channels, except general channel community owner should be able to delete channels, except general channel Oct 17, 2022
@holmesworcester holmesworcester changed the title community owner should be able to delete channels, except general channel community owner should be able to delete channels Apr 4, 2023
@holmesworcester holmesworcester moved this to Next Sprint in Quiet Apr 5, 2023
@holmesworcester holmesworcester moved this from Next Sprint to Sprint in Quiet Apr 9, 2023
@holmesworcester holmesworcester moved this from Sprint to Next Sprint in Quiet Apr 9, 2023
@holmesworcester
Copy link
Contributor Author

If there's a way to split this up into parts that multiple people can work on, that would be ideal. Possible split:

  1. backend deletion api stub
  2. frontend screens using api
  3. marking channel deleted, sending to others
  4. hiding deleted channels in UI
  5. true deletion of deleted channels
  6. validating that deletion request is sent by owner

@siepra siepra moved this from Next Sprint to In progress in Quiet Apr 12, 2023
@Kacper-RF Kacper-RF self-assigned this Apr 18, 2023
@siepra
Copy link
Contributor

siepra commented Apr 25, 2023

Here is how it looks like on mobile, with swiping gesture

screen-20230425-155445_2.mp4

@holmesworcester
Copy link
Contributor Author

This looks good! If the other version works better with e2e tests then let's use that instead but this is totally good.

@Kacper-RF
Copy link
Contributor

Desktop version, for deletion general channel I had to add a modal with info, to prevent jumping channel list.
Also i had conversation with Bartek, and is possibility that we also will use that modal to block UI to prevent user to double click on channel deletion in case that is lot of files on channel

channel-deletion.mp4

@Kacper-RF Kacper-RF moved this from In progress to Ready for QA in Quiet Apr 26, 2023
@holmesworcester
Copy link
Contributor Author

holmesworcester commented Apr 26, 2023

Oh wow, I can't wait to play with this. Thoughts:

  1. Seems redundant and confusing to say "created #general" and then "#general channel has been recreated..." What if it just said "@kacper1 deleted all messages in #general" in the #general channel case?

  2. If someone is in another channel and #general gets deleted, I think it's wrong for their whole UI to get taken over. what if they were typing an important message or mid-conversation? They should be able to do other things while deletion is happening. What if we made the general channel inactive (slightly lower opacity) an unclickable as soon as it was deleted, so that the list wouldn't jump?

  3. How slow will deletion be for a big channel with lots of files? If something really big is being deleted, will users still be able to do stuff? Will there need to be a spinner? How will this look on mobile? Can we do deletion in the background? We'll need to delete in the background without slowing the UI when we have timed deletion, because deletion will happen automatically at moments not initiated by the user. Completion is fuzzy anyway because other member devices could start the deletion process much later, so I think it's okay to do it in the background.

@Kacper-RF
Copy link
Contributor

Thanks for feedback !

  1. Yes, sure that's better, i will do it in that way

  2. You are right, I don't know at the moment, that i will can not deleting channel from channel list in sidebar UI while doing that all deletion stuff in sagas, but for sure I will change logic with blocking all users with this modal while general is recreated, I will try to find solution some for inactive general channel with lower opacity.

  3. I talked with Bartek and if there are lot of big files in channel, that can be time consuming, so maybe solution is only blocking deletion button on this channel, to prevent double click and not showing any modals.

@vinkabuki
Copy link
Contributor

  1. IPFS uses content addressed data, which means that there is a risk that different files share some blocks.
    • We must add mechanism for keeping track how many files reference a given block and do not delete it if there is more than one reference
    • Before we do that, let's investigate it a little bit more, because there is a chance that ipfs itself can somehow deal with that.
  2. Access controllers
    • Just figure out how to derive peerid from identityProvider identity.
    • Adding access controller to exisiting database results in orbitdb assumes it's new database.
  3. Files are stored multiple times - this is not critical problem at this point.
    • We store it in DATA_DIR/temporary files and DATA_DIR/downloads, I think temporary files should be erased once file uploaded.

@Kacper-RF
Copy link
Contributor

general channel deletion fixes, without modal, blocking UI and with only one message about deletion:

channel-deletion-v2.mp4

@holmesworcester
Copy link
Contributor Author

This looks great! I want it to say "@kacper created #dev" as the first message in #dev too, but that's totally out of scope. If trivial it might be nice to to it now while we're here. If not trivial, we'll do it later.

@holmesworcester
Copy link
Contributor Author

holmesworcester commented Apr 28, 2023

As discussed, I created separate issues for the access controller, for attachment file deletion, and for attachment IPFS block deletion: #1489, #1490, #1491

@holmesworcester
Copy link
Contributor Author

holmesworcester commented Apr 28, 2023

@Kacper-RF one more small thing. the drawer should say "#channel-name settings" and not just "#channel-name". can you make that change on desktop and mobile?

@Kacper-RF
Copy link
Contributor

yes, of course, i will add that change to my current PR with deletion fixes

@kingalg
Copy link
Collaborator

kingalg commented May 12, 2023

Version: 1.2.1-alpha.3

There are some problems that are addressed in other issues, most important one is: #1523 but in general this functionality is implemented and in most cases can be used as expected.

@kingalg kingalg closed this as completed May 12, 2023
@kingalg kingalg moved this from Ready for QA to Done in Quiet May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

5 participants