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

fix: only save if needed when closing #3644

Closed
wants to merge 2 commits into from

Conversation

max-nextcloud
Copy link
Collaborator

Including tests that open and close do not save unedited files. Test is currently still failing for open.

See #3543.

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README is not required

Including tests that open and close do not save unedited files.
Test is currently still failing for open.

See #3543.

Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud
Copy link
Collaborator Author

/compile

@max-nextcloud
Copy link
Collaborator Author

/backport b695c8a to stable25

@max-nextcloud
Copy link
Collaborator Author

/backport b695c8a to stable24

@max-nextcloud
Copy link
Collaborator Author

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@cypress
Copy link

cypress bot commented Jan 5, 2023



Test summary

115 2 1 0Flakiness 0


Run details

Project Text
Status Failed
Commit 7aecbef
Started Jan 5, 2023 5:42 PM
Ended Jan 5, 2023 5:49 PM
Duration 06:54 💡
OS Linux Ubuntu -
Browser Electron 106

View run in Cypress Dashboard ➡️


Failures

sync.spec.js Failed
1 Text and server mimetypes > does not save file when closing
nodes/Links.spec.js Failed
1 test link marks > link preview > shows a link preview

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

@max-nextcloud max-nextcloud marked this pull request as draft January 5, 2023 19:12
@max-nextcloud
Copy link
Collaborator Author

Okay... turns out a stable sync between client and server can take even longer than 4 roundtrips because the server only saves the doc every so and so often if it's an autosave and the first save was already triggered by the transaction caused by the headings.

@max-nextcloud
Copy link
Collaborator Author

This PR misses the point. The server will only persist changes if the version has been bumped. So that should in itself already prevent saving without changes.
However the version gets bumped by process headings - so that's what we need to fix.

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

Successfully merging this pull request may close these issues.

None yet

3 participants