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

Enable startPresentation parameter #4051

Open
timur-g opened this issue Sep 20, 2024 · 4 comments · May be fixed by #4209
Open

Enable startPresentation parameter #4051

timur-g opened this issue Sep 20, 2024 · 4 comments · May be fixed by #4209
Assignees
Labels
1. to develop Waiting for a developer enhancement New feature or request

Comments

@timur-g
Copy link

timur-g commented Sep 20, 2024

Collabora Online supports starting presentation with any presentation file, appending ?startPresentation=true after file URL.
https://sdk.collaboraonline.com/docs/advanced_integration.html?highlight=startpresentation#url-query-parameters.
But Nextcloud seems to remove the parameter from the url. Would be good to support this.

@juliusknorr juliusknorr added enhancement New feature or request 1. to develop Waiting for a developer labels Sep 20, 2024
@elzody
Copy link
Contributor

elzody commented Oct 4, 2024

I am getting errors like the following screenshots when I try to append this to the URL. Any ideas?

@timur-g

Browser error

Image

Collabora error

Image

@timur-g
Copy link
Author

timur-g commented Oct 17, 2024

Collabora error fixed with CollaboraOnline/online#10198.

@elzody
Copy link
Contributor

elzody commented Oct 24, 2024

I've done some research into how we could implement this in richdocuments. So far, this is my analysis and proposed solution:

First, I tried to solve the problem of the &startPresentation=true parameter being removed from the URL when you try to open a presentation from within Nextcloud. This ended up being due to the file action which the viewer app registers; it uses OCP.Files.Router.goToRoute() to navigate to a very specific route, providing its own queries / parameters (thus erasing all others you give it manually). I cannot find a workaround for getting the parameter in richdocuments unless I use some hacky solution or something changes with how the viewer handles this, but with such a small addition I doubt it would be worth it to change anything there.

With that being said, my proposed solution would be to register a file action on presentation files which would immediately open them in presentation mode. It's one more click to show the file action menu, and you couldn't, for example, simply share a link to a presentation which would open it automatically in presentation mode, but it would provide a cleaner solution in my opinion.

Any thoughts or ideas which I haven't thought of?
@juliusknorr and @timur-g (in case you want to stay up-to-date)

@juliusknorr
Copy link
Member

A quick option would be to check for the parameter on page load in PHP and pass it to the richdocuments frontend code as initial state or store it in the session if it needs to persist multiple page reloads due to redirects.

Cleaner option would be if the files app could preserve url parameters somehow, but might be larger effort

@elzody elzody linked a pull request Nov 7, 2024 that will close this issue
4 tasks
@elzody elzody self-assigned this Nov 7, 2024
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Nov 7, 2024
@elzody elzody moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 📝 Office team Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Waiting for a developer enhancement New feature or request
Projects
Status: 🏗️ In progress
Development

Successfully merging a pull request may close this issue.

3 participants