Skip to content

feat: Add events for version restore - #40184

Merged
max-nextcloud merged 2 commits into
masterfrom
enh/files_versions_events-vue
Sep 6, 2023
Merged

feat: Add events for version restore#40184
max-nextcloud merged 2 commits into
masterfrom
enh/files_versions_events-vue

Conversation

@juliusknorr

@juliusknorrjuliusknorr commented Aug 31, 2023

Copy link
Copy Markdown
Member

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

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable27

@skjnldsvskjnldsv left a comment

Copy link
Copy Markdown
Member

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

@juliusknorr
juliusknorrforce-pushed the enh/files_versions_events-vue branch from aa6eb35 to 9ef6dc7CompareAugust 31, 2023 19:52
@juliusknorr
juliusknorrforce-pushed the enh/files_versions_events-vue branch from 9ef6dc7 to beb2356CompareSeptember 6, 2023 06:29
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@max-nextcloud
max-nextcloudforce-pushed the enh/files_versions_events-vue branch from beb2356 to bb41932CompareSeptember 6, 2023 11:29
@max-nextcloud

Copy link
Copy Markdown
Contributor

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@max-nextcloud
max-nextcloud merged commit 8ac768c into masterSep 6, 2023
@max-nextcloud
max-nextcloud deleted the enh/files_versions_events-vue branch September 6, 2023 13:11
@backportbot-nextcloud

Copy link
Copy Markdown

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

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport bb41932 to stable27

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reload editor/viewer after restoring a version

5 participants

@juliusknorr@max-nextcloud@artonge@skjnldsv@nextcloud-command