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

feat: Add events for version restore #40184

Merged
merged 2 commits into from
Sep 6, 2023

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Aug 31, 2023

Fixes #35511

Slightly simplified version of #26023

Since version preview is now implemented in viewer, we only need an event before a restore attempt and after success/failure.

This is needed for restoring a version while having an ongoing editing session e.g. with Collaboera as we will need to save current changes first, let Collabora handle the restore in order to have a smooth transition from the old to the restored document.

Usage can be seen in https://github.com/nextcloud/richdocuments/blob/chore/refactor-iframe/src/mixins/version.js

Checklist

@juliushaertl
Copy link
Member Author

/backport to stable27

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
I wonder how far we should allow ourselves to go from standard events like files:node:moved

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@max-nextcloud
Copy link
Contributor

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@max-nextcloud max-nextcloud merged commit 8ac768c into master Sep 6, 2023
38 of 39 checks passed
@max-nextcloud max-nextcloud deleted the enh/files_versions_events-vue branch September 6, 2023 13:11
@backportbot-nextcloud
Copy link

The backport to stable27 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable27
git pull origin stable27

# Create the new backport branch
git checkout -b fix/foo-stable27

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@juliushaertl
Copy link
Member Author

/backport bb41932 to stable27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reload editor/viewer after restoring a version
5 participants