[xwiki/xwiki-platform] 34a1fe: XWIKI-24372: Implement auto-save for BlockNote rea...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-platform Commit: 34a1fe12504d547486ca9bb8f1f03d64f48ff8c7 https://github.com/xwiki/xwiki-platform/commit/34a1fe12504d547486ca9bb8f1f03... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-02 (Wed, 02 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-webjar/src/main/webjar/saver.js Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Replace the GenericSaver / ChainPadSaver / XWikiSaver inheritance chain with composition: a generic Saver delegates the synchronization of the saver states to a SaveTransport and the saving of the edited content to a SaveTarget, so that the transport and the target can vary independently (a Yjs transport will be able to reuse the XWiki edit form target). * Determine whether the local changes have been saved using a monotonic watermark instead of looking them up in the state of every client, so that the information is not lost when the client that saved those changes leaves the editing session. Co-Authored-By: Claude Opus 5 <[email protected]> Commit: fe77ef0c2d3a0ccd8236e163f31d7da28d1f1989 https://github.com/xwiki/xwiki-platform/commit/fe77ef0c2d3a0ccd8236e163f31d7... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-02 (Wed, 02 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-webjar/src/main/webjar/saver.js Log Message: ----------- XWIKI-24371: Skip the force edit lock confirmation when joining a realtime collaboration session with BlockNote * Load jQuery on demand in XWikiFormSaveTarget instead of declaring it as a dependency of the whole xwiki-realtime-saver module, so that save targets which don't need it don't pull it in. SaveTarget#initialize() becomes asynchronous as a result, and is now awaited by Saver#toBeReady(). * Use the DOM API where it is enough: Element#matches(':enabled') and Element#click() on the save button, and Object.assign() instead of $.extend() when overriding AjaxSaveAndContinue. * Remember only the AjaxSaveAndContinue methods that are actually overridden, instead of a shallow copy of its whole prototype, to know what to restore. Co-Authored-By: Claude Opus 5 <[email protected]> Commit: 0618285939f4cac9e365078b65243f38b3d15b7a https://github.com/xwiki/xwiki-platform/commit/0618285939f4cac9e365078b65243... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-02 (Wed, 02 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-node/src/main/node/editors/blocknote-headless/src/__tests__/playwright-ct/LinkEdition.spec.tsx M xwiki-platform-core/xwiki-platform-node/src/main/node/editors/blocknote-react/src/__tests__/playwright-ct/BlockNote.story.tsx M xwiki-platform-core/xwiki-platform-node/src/main/node/editors/blocknote-react/src/__tests__/playwright-ct/LinkEdition.spec.tsx M xwiki-platform-core/xwiki-platform-node/src/main/node/editors/blocknote-react/src/__tests__/playwright-ct/syntax.mock.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/editors/blocknote-react/src/__tests__/playwright-ct/utils.ts Log Message: ----------- XWIKI-24744: Upgrade blocknote to 0.54.0 * Fix the BlockNote Playwright component tests that open the link toolbar. The toolbar is no longer opened by the editor on mouseover: the hovered link is only recorded in the component state and the opening is delegated to floating-ui, which starts listening for pointer events on the link on the render that follows. A single synthetic mouse move is thus never seen, so move the caret inside the link with the keyboard instead, like the functional tests already do. * Fix the blocknote-react Playwright component tests, which were not compiled at all (and thus reported as skipped) because two type-only symbols were imported as values. Co-Authored-By: Claude Opus 5 <[email protected]> Commit: 7ff9b824bc0307578f3139109883df769bfe6f5b https://github.com/xwiki/xwiki-platform/commit/7ff9b824bc0307578f3139109883d... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-02 (Wed, 02 Sep 2026) Changed paths: M pnpm-lock.yaml M pnpm-workspace.yaml M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/i18nResolver.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/image/DefaultImageWizard.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/macros/DefaultMacroWizard.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/testUtils.js M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-designsystem-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-designsystem-webjar/src/main/node/src/vue/XDialog.vue M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-designsystem-webjar/src/main/node/src/vue/XDropdown.vue M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-designsystem-webjar/src/main/node/src/vue/XTabGroup.vue M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-designsystem-webjar/src/main/node/src/vue/__tests__/XDialog.test.ts M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-designsystem-webjar/src/main/node/src/vue/__tests__/XDropdown.test.ts M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-designsystem-webjar/src/main/node/tsconfig.app.json M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-designsystem-webjar/src/main/node/vite.config.ts M xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-node/xwiki-platform-livedata-node-ui/src/main/node/vite.config.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/etc/platform-livedata-ui.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/package.json M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/displayerXObjectPropertyHelper.js M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/displayers/DisplayerDate.test.js M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/displayers/DisplayerDate.vue M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/displayers/DisplayerXObjectProperty.test.js M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/displayers/DisplayerXObjectProperty.vue M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/filters/FilterBoolean.vue M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/filters/FilterDate.vue M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/filters/FilterList.test.js M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/filters/FilterList.vue M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/index.ts R xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/services/require.js R xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/services/requirejs.js M xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-xwiki/src/liveDataSource.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/test/requirejs/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/test/requirejs/etc/platform-test-requirejs.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/test/requirejs/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/test/requirejs/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/test/requirejs/src/mock-requirejs.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/test/requirejs/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/test/requirejs/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/test/requirejs/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/test/requirejs/vitest.config.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/etc/platform-xwiki-utils.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/__tests__/require.test.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/require.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/requirejs.ts M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-webjar/src/main/node/src/components/DisplayerToggle.vue M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-webjar/src/main/node/src/components/__tests__/DisplayerToggle.test.ts Log Message: ----------- XWIKI-24371: Skip the force edit lock confirmation when joining a realtime collaboration session with BlockNote * Move loadById(), the promise wrapper around the callback-based RequireJS require(), from @xwiki/platform-livedata-ui to @xwiki/platform-xwiki-utils, so that it can be used outside Live Data: the autosave code that is being moved to xwiki-platform-node loads jQuery through RequireJS. @xwiki/platform-livedata-ui keeps a deprecated re-export for its existing consumers. * Reject the returned promise when a module fails to load, instead of leaving it pending forever, and read the RequireJS global off globalThis on each call, so that importing the package no longer needs a RequireJS environment. * Replace the copies of the same helper with loadById(): XDropdown, XTabGroup and XDialog in the design system webjar (which no longer needs @types/requirejs), and i18nResolver, DefaultMacroWizard and DefaultImageWizard in the BlockNote webjar. * Add @xwiki/platform-test-requirejs, whose mockRequireJS() installs a fake RequireJS backed by an in-memory module registry, replacing the four hand-rolled test doubles it supersedes. This fixes the FilterList test, whose mock did not match loadById()'s contract, and removes the Module.prototype.require override the design system tests needed. * Bundle @xwiki/platform-xwiki-utils in the webjars that use it, since it is not distributed as a webjar of its own. Co-Authored-By: Claude Opus 5 <[email protected]> Compare: https://github.com/xwiki/xwiki-platform/compare/6a39311e1c24...7ff9b824bc03 To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications