Skip to content

Conversation

mflorea
Copy link
Member

@mflorea mflorea commented Oct 17, 2025

Jira URL

https://jira.xwiki.org/browse/XWIKI-2470

Changes

  • Remove duplicated code between SaveAction and SaveAndContinueAction that builds the JSON response. Put the "JSON" map object on the XWiki context and let various parts of the code add stuff that needs to be returned to the editor.
  • Remove the redirect object before updating the authors, in order to be able to detect if the document is dirty before the authors are set.
  • Move the line that sets the metadata dirty right before saving, because it is needed only to force incrementing the version.
  • Small code improvements and more comments added.
  • Let the editor know when the save doesn't create a new revision in order to not show the "Saved" notification because it can mislead the user into thinking that a new version was created.
  • Add page objects for the history dropdown from the realtime toolbar.
  • Add functional test.
  • Don't propagate the version on save (to the other collaborators) if there's no new version.
  • Bulletproof the history dropdown to not duplicate versions.

Executed Tests

All realtime editing tests, for Firefox and Chrome.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • 16.10.x
    • 17.4.

* Remove duplicated code between SaveAction and SaveAndContinueAction that builds the JSON response. Put the "JSON" map object on the XWiki context and let various parts of the code add stuff that needs to be returned to the editor.
* Remove the redirect object before updating the authors, in order to be able to detect if the document is dirty before the authors are set.
* Move the line that sets the metadata dirty right before saving, because it is needed only to force incrementing the version.
* Small code improvements and more comments added.
* Let the editor know when the save doesn't create a new revision in order to not show the "Saved" notification because it can mislead the user into thinking that a new version was created.
* Add page objects for the history dropdown from the realtime toolbar.
* Add functional test.
* Don't propagate the version on save (to the other collaborators) if there's no new version.
* Bulletproof the history dropdown to not duplicate versions.
* Return the new (latest) version even when we don't create a new revision because the editor that sent the save request might have an outdated version number. This can happen if two users save the same document state, either because they didn't modify the document or because they made the same modifications.
* Update since version
* Fix RealtimeEditToolbar#waitForConcurrentEditingWarning() that was causing both the existing #editFullScreen() test and the new #preventEmptyRevisions() test to flicker (we need to wait for the fade-in / fade-out popover animation to end).
* Display the revision author, not modifier (last content updater), in the history dropdown.
* The auto-saver should check if the new version is different from the current version.
* Extend the #preventEmptyRevisions() functional test to check what happens when both users save the same document state.
* Simplify the version update handler in actionButtons.js
* Modify meta.js to not trigger the 'xwiki:document:changeVersion' event if the version didn't change.
@mflorea mflorea merged commit 789a2b9 into stable-17.9.x Oct 21, 2025
2 checks passed
@mflorea mflorea deleted the XWIKI-2470 branch October 21, 2025 07:53
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.

3 participants