Enable Text to be used by Viewer outside Files app#732
Merged
juliusknorr merged 2 commits intomasterfrom Apr 20, 2020
Merged
Conversation
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>
d692c14 to
1061537
Compare
Test summaryRun details
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
approved these changes
Apr 20, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since Nextcloud 18.0.4 the Files app triggers the
LoadViewerevent, so that event can be used to register Text with Viewer instead of doing it through theOCA\Files::loadAdditionalScriptsevent(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 theLoadViewerevent.