Skip to content

[NEW] Delete all Attachments / Files from a Channel /Chat #7383

Closed
danilomiranda wants to merge 4 commits intoRocketChat:developfrom
danilomiranda:delAllAttach
Closed

[NEW] Delete all Attachments / Files from a Channel /Chat #7383
danilomiranda wants to merge 4 commits intoRocketChat:developfrom
danilomiranda:delAllAttach

Conversation

@danilomiranda
Copy link
Contributor

@RocketChat/core

Closes #6193

A new feature to remove all files from room with one click.
Plus an indicator of how much files are displayed

Plus an indicator of hoy much files are displayed
Copy link
Contributor

@geekgonecrazy geekgonecrazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this!

I know English is not likely your native language. But just a few changes to wording.

"Your_email_has_been_queued_for_sending": "Your email has been queued for sending",
"Your_entry_has_been_deleted": "Your entry has been deleted.",
"Your_file_has_been_deleted": "Your file has been deleted.",
"Your_files_are_been_deleted": "Your files are been deleted.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is for when its still deleting. You might want to change the wording here to:

Your files are being deleted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this string is used after deletion is successful, so I think it should be

Your files have been deleted.

Copy link
Contributor Author

@danilomiranda danilomiranda Jul 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No @gdelavald, we display the string during the delete process. I delete more than 800 files and the modal only close when all files are erased.

"Yes_unarchive_it": "Yes, unarchive it!",
"Yes_clear_all": "Yes, clear all!",
"Yes_delete_it": "Yes, delete it!",
"Yes_delete_all_it": "Yes, delete all it!",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change the wording here to:

Yes, delete them all!

@geekgonecrazy geekgonecrazy requested a review from karlprieb July 1, 2017 21:33
"You_should_name_it_to_easily_manage_your_integrations": "You should name it to easily manage your integrations.",
"You_will_not_be_able_to_recover": "You will not be able to recover this message!",
"You_will_not_be_able_to_recover_file": "You will not be able to recover this file!",
"You_will_not_be_able_to_recover_all_files": "You will not be able to recover all files!",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fit with the message above (recover this file), I would suggest doing:

You will not be able to recover these files.

"Your_email_has_been_queued_for_sending": "Your email has been queued for sending",
"Your_entry_has_been_deleted": "Your entry has been deleted.",
"Your_file_has_been_deleted": "Your file has been deleted.",
"Your_files_are_been_deleted": "Your files are being deleted.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the variable name too? A little thing :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, sorry to petpeeve on this, but since it's the success message after deleting multiple files, it should read

Your files have been deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah @geekgonecrazy , totally. I’ll do that asap :) thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gdelavald I see your point, but the message appears during the deletion. We can see that with a lot of files

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danilomiranda / @gdelavald I think the issue is that on large channels with lots of files the box will show while it's still deleting and won't go away until finished

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it makes sense, but I would rather show a loading indicator while it's deleting and a successful message when it's done, I'm not sure what kind of logic that would need though.


self.files.map((file) => {
return removeFiles(file, msg);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.map is synchronous. So you could actually put that swal for success on multiple here.

As far as that goes... the swal for success really shouldn't be being shown until its actually finished. So might just move the swal below this whole block. And remove the text for TAPi18n.__('Your_files_are_being_deleted');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The map function run very fast b/c the RocketChat.models.Uploads.remove is asynchronous. I tried to use the Meteor.wrapAsync without succes. move the swal to de end of the block doesn't delay the success message

@rodrigok
Copy link
Member

@danilomiranda Can you fix the conflict?

@danilomiranda
Copy link
Contributor Author

@rodrigok The @marceloschmidt is helping me with that.

@AmShaegar13
Copy link
Contributor

@danilomiranda May I help fixing the conflicts to get this one in?

@dhoeld
Copy link

dhoeld commented Jun 6, 2018

@danilomiranda Will be any further progress on the failing checks?

@ggazzo ggazzo requested a review from tassoevan August 7, 2018 22:30
@ggazzo ggazzo added the area: ui Touches the code on client side label Aug 7, 2018
@ggazzo ggazzo added this to the 0.69.0 milestone Aug 7, 2018
@ggazzo
Copy link
Member

ggazzo commented Aug 14, 2018

@danilomiranda this issue was closed here #11236 sorry about that =/

@ggazzo ggazzo closed this Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Touches the code on client side

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

Comments