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 Text to be used by Viewer outside Files app #732

Merged

Conversation

danxuliu
Copy link
Member

@danxuliu danxuliu commented Mar 26, 2020

Since Nextcloud 18.0.4 the Files app triggers the LoadViewer event, so that event can be used to register Text with Viewer instead of doing it through the OCA\Files::loadAdditionalScripts event (although the previous way needs to be kept for now just in case Text is run on a previous Nextcloud 18 version).

Besides being more correct for the Files app it also makes possible to use Text when opening files through Viewer in other apps, like Talk.

Note, however, that in public share pages Text is still opened using the fallback actions instead of through Viewer, as Viewer currently does not provide the share token of the public shared folder that contains the file to be opened. This will be addressed in a follow up pull request.

Also note that currently the stable18 branch of server still reports 18.0.2 as its version, so if tested on that branch Text is registered twice with Viewer. That will stop happening once the version is bumped in the stable18 branch of server to 18.0.4 and Text is registered only due to the LoadViewer event.

@danxuliu danxuliu added enhancement New feature or request 3. to review labels Mar 26, 2020
src/files.js Outdated Show resolved Hide resolved
@nickvergessen
Copy link
Member

Fixed the version in nextcloud/server#20195

OCA.Text.Files is not used in the Text, Viewer or Files app.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Since Nextcloud 18.0.4 the Files app triggers the "LoadViewer" event, so
that event can be used to register Text with Viewer instead of doing it
through the "OCA\Files::loadAdditionalScripts" event.

Besides being more correct for the Files app it also makes possible to
use Text when opening files through Viewer in other apps, like Talk.

Note, however, that in public share pages Text is still opened using the
fallback actions instead of through Viewer, as Viewer currently does not
provide the share token of the public shared folder that contains the
file to be opened.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu force-pushed the enable-text-to-be-used-by-viewer-outside-files-app branch from d692c14 to 1061537 Compare April 20, 2020 13:08
@cypress
Copy link

cypress bot commented Apr 20, 2020



Test summary

12 0 0 0


Run details

Project text
Status Passed
Commit 1061537
Started Apr 20, 2020 1:12 PM
Ended Apr 20, 2020 1:12 PM
Duration 00:49 💡
OS Linux Ubuntu Linux - 18.04
Browser Electron 78

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@juliusknorr juliusknorr merged commit d8b47e7 into master Apr 20, 2020
@juliusknorr juliusknorr deleted the enable-text-to-be-used-by-viewer-outside-files-app branch April 20, 2020 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants