-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
PoC: Emit events on files_versions frontend actions to allow apps to hook into them #26023
Conversation
…into them Signed-off-by: Julius Härtl <jus@bitgrid.net>
446ae93
to
ae8a44c
Compare
What about instead of canceling the restore operation, allow the event handlers to return a |
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 :) |
CI is unhappy, js needs a rebuild. 22 or move to 23? |
ping @juliushaertl |
Closing for now |
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.