PoC: Emit events on files_versions frontend actions to allow apps to hook into them#26023
Closed
juliusknorr wants to merge 1 commit intomasterfrom
Closed
PoC: Emit events on files_versions frontend actions to allow apps to hook into them#26023juliusknorr wants to merge 1 commit intomasterfrom
juliusknorr wants to merge 1 commit intomasterfrom
Conversation
…into them Signed-off-by: Julius Härtl <jus@bitgrid.net>
446ae93 to
ae8a44c
Compare
Member
What about instead of canceling the restore operation, allow the event handlers to return a |
Member
Not possible, events are async and should not block the main process. This is prone to failure. I think this approach is the cleaner and safer :) |
skjnldsv
approved these changes
Mar 29, 2021
ChristophWurst
approved these changes
Mar 29, 2021
Member
|
CI is unhappy, js needs a rebuild. 22 or move to 23? |
Member
|
ping @juliushaertl |
Merged
Merged
Merged
Member
Author
|
Closing for now |
4 tasks
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.
Apps might offer the possibility to view certain versions of a file in their viewer and revert to older versions during editing. In order to achieve this in a more sane way than just attaching to click events this PR adds generic events for the actions that the files_versions sidebar triggers.
In addition to the version info and file info that is passed with the events the preventDefault property can be used by the apps to stop before the files_versions app executes the actual logic, e.g. for Collabora we need to wait for the Collabora server to be ready before we execute the actual MOVE action to restore a file.