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

juliusknorr
Copy link
Member

@juliusknorr juliusknorr 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

@juliusknorr juliusknorr requested a review from skjnldsv as a code owner March 8, 2024 08:16
@juliusknorr juliusknorr changed the title fix/file widget viewer Use viewer to open files still on the simple widget Mar 8, 2024
@juliusknorr juliusknorr requested review from mejo-, max-nextcloud, a team, szaimen and emoral435 and removed request for a team March 8, 2024 08:52
@juliusknorr juliusknorr 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? :)

@juliusknorr
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 😊

@juliusknorr juliusknorr force-pushed the fix/file-widget-viewer branch from 97f6404 to 54c8d3e Compare March 11, 2024 06:11
@juliusknorr
Copy link
Member Author

Thanks, adjusted

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr force-pushed the fix/file-widget-viewer branch from 54c8d3e to 7b92e23 Compare March 11, 2024 15:49
@juliusknorr juliusknorr merged commit 212b297 into master Mar 11, 2024
98 checks passed
@juliusknorr juliusknorr 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