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

Opening non-image attachments is broken #3849

Closed
mejo- opened this issue Feb 28, 2023 · 6 comments · Fixed by #5042
Closed

Opening non-image attachments is broken #3849

mejo- opened this issue Feb 28, 2023 · 6 comments · Fixed by #5042
Assignees
Labels
bug Something isn't working high needs triage: luka

Comments

@mejo-
Copy link
Member

mejo- commented Feb 28, 2023

Describe the bug
Opening non-image attachments is broken in latest Text. I'd expect them to be opened in the Viewer, but instead a modal is displayed that tries to load them as image and displays them as broken image.

Probably related: #2924 @luka-nextcloud

To Reproduce
Steps to reproduce the behavior:

  1. Open a Text file, upload a non-image attachment
  2. Click on the attachment
  3. See the modal showing a broken image

Expected behavior
The attachment should be opened in the viewer.

@mejo- mejo- added bug Something isn't working high regression labels Feb 28, 2023
@luka-nextcloud luka-nextcloud self-assigned this Feb 28, 2023
@mejo- mejo- removed the regression label Feb 28, 2023
@mejo-
Copy link
Member Author

mejo- commented Feb 28, 2023

After discussing this a bit more I'm not sure anymore whether we want the attachment to be opened in Viewer - because Text itself might already be open in Viewer. 🤔

@mejo-
Copy link
Member Author

mejo- commented Feb 28, 2023

@click="handleImageClick(src)">
is the relevant part in code.

@luka-nextcloud
Copy link
Contributor

@mejo- @juliushaertl
I would suggest to show an icon based on the file type of attachments in the preview modal.
Or just a file icon for all non-image file, it may be a simple fix for now.

@mejo-
Copy link
Member Author

mejo- commented Mar 7, 2023

I would suggest to show an icon based on the file type of attachments in the preview modal.

I'm not sure whether that's useful from a user perspective. How about opening non-image attachments in the files app in a new tab (target="_blank") instead. That way the files app could take care of opening the attachment in viewer.

Maybe we would just make the whole non-image NodeView a link to the file view (/f/<fileId>) and let the default linkHandler do it's job. That way we could take care of opening it in Viewer from Collectives with its own linkHandler later on 🤔

@luka-nextcloud
Copy link
Contributor

@mejo- Sounds good to me, totally agree with you.

@hcaihao
Copy link

hcaihao commented Nov 13, 2023

Does this issue sloved? How to update & test?

mejo- added a commit that referenced this issue Nov 22, 2023
When viewer is available, not in use and supports the mimetype, let's
open the attachment in viewer. Otherwise, open the file app URL in
a new tab.

Fixes: #3849, #4723

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Nov 27, 2023
When viewer is available, not in use and supports the mimetype, let's
open the attachment in viewer. Otherwise, open the file app URL in
a new tab.

Fixes: #3849, #4723

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Nov 27, 2023
When viewer is available, not in use and supports the mimetype, let's
open the attachment in viewer. Otherwise, open the file app URL in
a new tab.

Fixes: #3849, #4723

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Nov 27, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849, #4723

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Nov 27, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849, #4723

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Nov 27, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849, #4723

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- mentioned this issue Nov 27, 2023
49 tasks
mejo- added a commit that referenced this issue Nov 27, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Nov 27, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Nov 28, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Nov 29, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Nov 29, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
backportbot-nextcloud bot pushed a commit that referenced this issue Nov 29, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Dec 5, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Dec 5, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Dec 5, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Dec 5, 2023
When viewer is available, not in use and supports the mimetype, and
we're not in a public share, open the attachment in viewer. Otherwise,
download the attachment.

Fixes: #3849
Fixes: #4723
Fixes: #5030

Signed-off-by: Jonas <jonas@freesources.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high needs triage: luka
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants