zulip / zulip

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

Home Page:https://zulip.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve deleted file experience

alya opened this issue · comments

At present, when a file is deleted (https://zulip.com/help/manage-your-uploaded-files), this results in a confusing experience when looking at a message where that file appeared:

Screen Shot 2022-12-02 at 4 28 07 PM

Clicking on the file link, the user sees:
Screen Shot 2022-12-02 at 5 10 37 PM

To clarify that the situation is not a Zulip bug, we should:

  • Replace the "File not found." text with: "This file does not exist or has been deleted."

  • Replace the image thumbnail with an image-not-found image with the following text: "This image does not exist or has been deleted."

It's fine to submit a PR addressing just one of these points.

CZO discussion

A detailed technical design discussion for how to do this correctly is available here: https://chat.zulip.org/#narrow/stream/3-backend/topic/404s.20for.20deleted.20files.20.2323739/near/1519771

Hello @zulip/server-misc members, this issue was labeled with the "area: uploads" label, so you may want to check it out!

@AbhijeetFasate13 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

@alya I just wanted to clarify the second task. When you mean "image preview" do you mean the thumbnail displayed under the file link, or do you mean the image displayed on a new tab after clicking on the thumbnail, or both?

@janiduVBR Thanks for asking! I meant the thumbnail.

I guess it could also be an improvement to change what we show in the preview UI once you click on it. I'll post about it on the linked CZO thread for discussion.

Ah, right, if we change the thumbnail image, it should probably change the preview UI display without any extra work, which seems good. Updated the issue description accordingly.

@janiduVBR You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

Hi!
I'm interested to contribute in this issue. Can I start working on it ?

@Avijit-ap I believe at the moment I have a working solution, but if anything changes I'll let you know.

Welcome to Zulip, @Aryanryn09! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@Kiran-Alex This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

In #24037, a duplicate of this, I wrote:

When a user deletes an attachment, we:

  • remove the contents from disk
  • delete the Attachment row
  • send an event to the user that deleted that attachment, so they can update their list of attachments in their personal settings.

Notably, we don't adjust anything about the messagelist. This has a couple side-effects:

  • New clients that have never fetched the image will try to do so and get an inline broken image link, since the server will 404; this is pretty ugly.
  • Old clients that have a cached copy of the contents will continue to render it ((even with shift-reload, often), giving an inconsistent result with new users.

This is the opposite of #17348, in some senses. Both are due to not using the many-to-many relationship we have to cascade updates across Attachments <-> Messages.

We should:

  • Update the contents of all messages which link to the attachment, to contain some static "this image has been removed by its owner" image.
  • Notify clients that can see it that the attachment has gone away; this is probably a natural outcome of doing the above edit, by sending an "update message" event.

I am not able to make a pull request it is asking for permission

@Aryanryn09 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

just working on it

@Aryanryn09 are you still working on this issue? I am a new contributor, would be great if you can hand this issue to me, I'll definitely try to work on this 😊

@sarthakkathpalia This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

you can claim this issue.

@Aryanryn09 I think you have to first unassign yourself then only I can claim the issue.

@phaneesh707 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

@divijsingla This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

@prafulbbandre This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

@prafulbbandre This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

I want to work on this. If the issue is open, please assign it to me.

I want to work on this. If the issue is open, please assign it to me.

@rajsingh619 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

I am interested in this Issue. Can I do Pull Request or you can assign this issue to Me.

If this issue is still open kindly assign it to me.

first point resolved please check
please check commit #94e80e3

@Midas847 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

@Aryanryn09 are you still working on this issue? I would like to contribute to this issue.

@nishu204 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

commented

@zulipbot claim

Welcome to Zulip, @srijaaan! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

first point resolved please check please check commit #94e80e3

We have not merged any commits that resolve this point.

@alya Can you please assign this issue to me. I am new to open source and I would like to contribute.

@zulipbot Hi! I'm interested to contribute in this issue. Can I start working on it ?

Hey there, kindly assign me this issue, I would like to work on it.

@Aniyar This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

if the issue isn't solved yet. i want to work on this issue! Please assign it to me.

@Aveepsita This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

@Aveepsita This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

Ok,thank you

@Aniyar You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

@sankalp142002 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

@sankalp142002 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

then only file not found line i get is in channel.test.js ,is that the one we have to change
@alya

Welcome to Zulip, @rahulkoul123! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@Jashwanthkanderi This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

@rahulkoul123 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

@zulipbot I am still working on it

ERROR: Unexpected response from GitHub API.

ERROR: Unexpected response from GitHub API.

Hello @skrivit, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!

claim

Welcome to Zulip, @tracycheung98! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@1Shubham7 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

@tracycheung98 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

@zulipbot I have submitted a PR #25432 . It is waiting for review. Thanks.

commented

is this issue still open.. or has the issue already been fixed?

If the issue had been fixed, it would be closed.

As noted in the contributor guide:

What if there is already a pull request for the issue I want to work on? Start by reviewing the existing work. If you agree with the approach, you can use the existing pull request (PR) as a starting point for your contribution. If you think a different approach is needed, you can post a new PR, with a comment that clearly explains why you decided to start from scratch.

Welcome to Zulip, @Ashik763! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@Ashik763 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

Are these issues still open to claim ?

Hi , I am willing to contribute to fix these issues !

Hi, I can solve this issue, just give me the steps to recreate the issue.

@Sachin24704 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

Welcome to Zulip, @arghyadeep10! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@Tabhi109 This issue cannot be claimed, as someone else is already working on it. Please see our contributor guide for advice on finding an issue to work on. Thanks!

Hi, I have solved the first point of issue: Replace the "File not found." text with: "This file does not exist or has been deleted."

I also updated the corresponding unit tests, and all Automated checks have passed.

The PR is #25920

I will also start working on the second point of the issue.

Thanks
Arghyadeep

@arghyadeep10 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

is this issue still open.. or has the issue already been fixed?

if it is not fixed then please assigned this issue to me.

Hey, @abhishekcha790 it's good to see that you want to claim this issue. But right now this issue is in progress.

You can always go ahead and find some issues that are not being worked on -- by searching for issues with the label
help wanted. You can find more details about claiming an issue from our documentation.

Also, you can join our Development Community to discuss things.