odoo/o-spreadsheet#6162

Created by BI, Adrien Minne (adrm)
Merged at d82f7b2b305c2222ff5b8654d0bf6ef0cb2064ed

Statuses:

label
odoo:master-fix-debounce-test-adrm
head
425406553f7b3ca3a2e5505008a214ddaca7664f
merged
8 months ago by BI, Lucas Lefèvre (lul)
odoo/o-spreadsheet
master #6162

Session & debounce

Description:

[FIX] tests: indeterministic tests with debounce

When creating a model, we trigger a session.move that is debounced,
and that trigger a render when the debounce is over. This can lead to
indeterministic tests, with random renders happening in the middle of
a test.

This commit removes the debounce of session.move for all the tests.

[IMP] registries: remove registries index

We had a index.ts file for some registries. The file was a bit of a
problem because:

  • It mixes apples and oranges: some registries are purely UI, some not,
    so importing everything at once don't really make sense.
  • It is an easy source of circular dependencies. For example, we had
    to split side_panel_registry in two files to avoid circular dependencies

This commit removes the index.ts file and imports the registries
individually where needed.

[IMP] session: better handling of session.move

Currently, session.move do nothing if session.join is not called
beforehand. But as it turns out, we do actually call session.move
before session.join. It just always work in practice, because
session.move is debounced.

With this commit, we store the client position in session.move, and
send it to the server when session.join is called.

Task: 4737879

review checklist

  • [ ] feature is organized in plugin, or UI components
  • [ ] support of duplicate sheet (deep copy)
  • [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • [ ] in model/UI: ranges are strings (to show the user)
  • [ ] undo-able commands (uses this.history.update)
  • [ ] multiuser-able commands (has inverse commands and transformations where needed)
  • [ ] new/updated/removed commands are documented
  • [ ] exportable in excel
  • [ ] translations (_t("qmsdf %s", abc))
  • [ ] unit tested
  • [ ] clean commented code
  • [ ] track breaking changes
  • [ ] doc is rebuild (npm run doc)
  • [ ] status is correct in Odoo