Граф коммитов

4705 Коммитов

Автор SHA1 Сообщение Дата
Julius Härtl 93d5884186
Merge pull request #3789 from nextcloud/fix/session-creation 2023-02-16 15:09:56 +01:00
nextcloud-command d9fbb435af Compile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-02-16 14:09:26 +00:00
Max a2cc9e66c2
fix(autosave): only autosave after actual changes happened
With the yjs backend loading the file will already trigger a push.
In the past we also had the problem that some extensions
triggered pushes even without changes to the content.

Use the state of the document history to determine if autosave is needed.
Do not save if there is no change to undo / redo.

Also move the autosave functionality into the SyncService.
This reduces the complexity of the PollingBackend further
and makes it readily accessible from the Editor.

Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:05:32 +01:00
Max 47e2f761bd
fix: prevent undo of initial content loading
Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:05:32 +01:00
Max 25fd996e43
fix(document load): possible race condition
When two people create a session roughly at the same time
they will both be handed the content of the file
as no steps have been pushed yet.

Use `setContent` rather than loading the document with the content
as it is idempotent.

Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:05:32 +01:00
Max 1738bdd6fe
fix(test): invalid file id to really be unused
Looks like we actually use file id 123 in CI now.
Change it to something less likely: 123456789.

Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:05:31 +01:00
Max 38a9f4ecdb
fix(Session): race condition in session creation
When one user creates a session but never pushes the initial steps
send the content of the file to the next user as well.

This still opens the door for another race condition:
If the first user continues to establish the session afterwards
the initial content will be loaded twice.

Will tackle this in another commit

Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:05:29 +01:00
Max 2ca76f171d
test(SessionApi): use cy.clearCookies instead of cy.logout
It is enough for these api level tests and avoids loading the page.

Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:04:23 +01:00
Max a17d5d6292
refactor: move save and forceSave into SyncService
Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:04:22 +01:00
Max ac7218eb2a
fix(conflicts): apply steps during 409 handling
Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:04:22 +01:00
Max 99c82fb0c1
fix: recover session when unsaved steps exist
Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:04:22 +01:00
Max aa2c3fad40
fix(SessionApi): only send content if no session is open
If a session is open - even if no state has been saved yet
the content of the document will be recovered from the steps.

In this case do not send the content in the response to the create request
as it would be duplicated:
* once created when the editor is initialized with the content
* then again when the steps are replayed.

Include tests for this corner case and another one.

Signed-off-by: Max <max@nextcloud.com>
2023-02-16 15:04:22 +01:00
Julius Härtl f0a6e72ef8
Merge pull request #3792 from nextcloud/renovate/main-nextcloud-dialogs-4.x 2023-02-16 14:32:31 +01:00
renovate[bot] 6e03c18234 fix(deps): update dependency @nextcloud/dialogs to ^4.0.1
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-02-16 13:29:17 +00:00
Jonas fb860791ed
Merge pull request #3798 from nextcloud/renovate/main-jest
chore(deps): update jest to ^29.4.3 (main)
2023-02-16 09:57:05 +01:00
renovate[bot] 0d5366404b
chore(deps): update jest to ^29.4.3 2023-02-16 00:23:53 +00:00
Jonas 9b9f3a2ad3
Merge pull request #3796 from nextcloud/renovate/main-yjs-13.x
fix(deps): update dependency yjs to ^13.5.46 (main)
2023-02-15 12:21:50 +01:00
nextcloud-command 45f12ca137 Compile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-02-15 10:05:08 +00:00
renovate[bot] 3e48f50be5
fix(deps): update dependency yjs to ^13.5.46 2023-02-15 02:36:13 +00:00
dependabot[bot] ba80f3b77e
Merge pull request #3787 from nextcloud/dependabot/composer/phpunit/phpunit-9.6.3 2023-02-11 06:34:19 +00:00
dependabot[bot] 5380d5794d
chore(deps-dev): Bump phpunit/phpunit from 9.6.1 to 9.6.3
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.1 to 9.6.3.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/main/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.1...9.6.3)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-11 04:15:45 +00:00
Nextcloud bot c4d2a7414a
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-02-11 03:06:20 +00:00
Julius Härtl efed9ff546
Merge pull request #3786 from nextcloud/enh/noid/bump-vue-richtext 2023-02-10 17:18:43 +01:00
Julien Veyssier 238e606476
use vue-richtext 2.1.0-beta.5
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-02-10 16:09:02 +01:00
Nextcloud bot 86caf181d7
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-02-10 03:10:06 +00:00
Julius Härtl c31527c9b7
Merge pull request #3735 from nextcloud/bugfix/noid/import 2023-02-09 23:21:44 +01:00
Julius Härtl dd98981c49 chore(import): Avoid importing NcModal throuhg other export
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-02-09 22:21:19 +00:00
Julius Härtl ee9ab9e159
Merge pull request #3776 from nextcloud/enh/separate-awareness-messages 2023-02-09 21:44:55 +01:00
nextcloud-command e89201fe51 Compile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-02-09 16:12:29 +00:00
Max ffaf7bb767
fix: adjust cypress tests to session api changes
* `push` now expects an `awareness` parameter.
* Closing the window closes the session
  which causes new sessions to receive the content of the doc
  rather than the state.

Signed-off-by: Max <max@nextcloud.com>
2023-02-09 16:27:38 +01:00
Max 88b6fa7163
fix: handle awareness messages without steps
Signed-off-by: Max <max@nextcloud.com>
2023-02-09 11:23:24 +01:00
Max bc8c78ca3a
perf(ApiService): return early if steps are empty
Signed-off-by: Max <max@nextcloud.com>
2023-02-09 10:20:25 +01:00
Max 4fce40bb61
enh: store awareness messages separately
Signed-off-by: Max <max@nextcloud.com>
2023-02-09 10:08:47 +01:00
max-nextcloud 4d3918f313
Merge pull request #3781 from nextcloud/renovate/main-lib0-0.x
fix(deps): update dependency lib0 to ^0.2.62 (main)
2023-02-09 06:39:39 +01:00
renovate[bot] b74bf8a853
fix(deps): update dependency lib0 to ^0.2.62 2023-02-08 23:29:26 +00:00
max-nextcloud 5ef0e58955
Merge pull request #3766 from nextcloud/fix/3739-empty-codeblocks
fix: empty code blocks
2023-02-08 15:14:36 +01:00
nextcloud-command 3857c46b85 Compile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-02-08 13:38:45 +00:00
Max 8374999a77
fix: empty code blocks
Prosemirror and tiptap do not like empty text nodes.
Leave out the entire text node instead.

Fixes #3739.

Signed-off-by: Max <max@nextcloud.com>
2023-02-08 14:28:02 +01:00
Julien Veyssier f5b48adae1
Merge pull request #3770 from nextcloud/fix/noid/link-picker-focus-issue
Fix focus becoming impossible to get after escape pressed in the link picker modal
2023-02-08 12:49:06 +01:00
nextcloud-command c4ffc12ffc Compile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-02-08 11:24:26 +00:00
Julien Veyssier 5217a6c55e
tell the link picker modal it is created while the Viewer is displayed
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-02-08 12:10:32 +01:00
max-nextcloud d81cd1c64b
Merge pull request #3778 from nextcloud/renovate/main-nextcloud-vue-richtext-2.x
fix(deps): update dependency @nextcloud/vue-richtext to ^2.1.0-beta.4 (main)
2023-02-08 08:30:59 +01:00
nextcloud-command e5f5630fd1 Compile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-02-08 07:19:51 +00:00
max-nextcloud 5e33bf89b6
Merge pull request #3777 from nextcloud/renovate/main-jest
chore(deps): update jest to ^29.4.2 (main)
2023-02-08 08:16:23 +01:00
Nextcloud bot 27b757393f
Fix(l10n): 🔠 Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-02-08 03:06:25 +00:00
renovate[bot] 171a90634a
fix(deps): update dependency @nextcloud/vue-richtext to ^2.1.0-beta.4 2023-02-08 02:49:14 +00:00
renovate[bot] 20698aabf9
chore(deps): update jest to ^29.4.2 2023-02-08 02:48:36 +00:00
max-nextcloud 706fd47e6b
Merge pull request #3772 from nextcloud/renovate/main-lib0-0.x
fix(deps): update dependency lib0 to ^0.2.61 (main)
2023-02-07 10:44:52 +01:00
renovate[bot] 1814532de8 fix(deps): update dependency lib0 to ^0.2.61
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-02-07 08:30:51 +00:00
Julius Härtl ac91e932d8
Merge pull request #3769 from nextcloud/fix/collaborator-disconnect 2023-02-07 09:15:58 +01:00