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

Use viewer to open files still on the simple widget #44076

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Mar 8, 2024

Follow up to #44012

This brings back the behaviour to open the viewer on non-interactive widget rendering.

Fixes recent failures on nextcloud/text#5447 for the link bubble

Checklist

@juliushaertl juliushaertl changed the title fix/file widget viewer Use viewer to open files still on the simple widget Mar 8, 2024
@juliushaertl juliushaertl requested review from mejo-, max-nextcloud, a team, szaimen and emoral435 and removed request for a team March 8, 2024 08:52
@juliushaertl juliushaertl added bug 3. to review Waiting for reviews labels Mar 8, 2024
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

It was done on purpose, you cannot open viewer on text as text us already using viewer. It will close the text app.

Can you explain the context? :)

@juliushaertl
Copy link
Member Author

It was done on purpose, you cannot open viewer on text as text us already using viewer. It will close the text app.

Can you explain the context? :)

The widget is not only rendered in viewer but also in collectives or the folder description where it is used then to open the viewer.

I don't quite remember how the behavior was if this is triggered trough text in viewer still, but would say either the close and open or another file is expected or we can safeguard this to only happen if no file is currently open in the viewer.

@skjnldsv
Copy link
Member

skjnldsv commented Mar 9, 2024

I don't quite remember how the behavior was if this is triggered trough text in viewer still

It wasn't. The Vue event was missing a stop and therefore the behaviour was unstable and still opening the file as if the link was clicked.

I suggest the following, until we support multiple viewer, on top of checking if Viewer supports the mime, please also check if a file is already opened in it.
Something like !OCA.Viewer.file should work 😊

@juliushaertl
Copy link
Member Author

Thanks, adjusted

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliushaertl juliushaertl merged commit 212b297 into master Mar 11, 2024
98 checks passed
@juliushaertl juliushaertl deleted the fix/file-widget-viewer branch March 11, 2024 17:07
@Altahrim Altahrim mentioned this pull request Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants