Skip to content

Conversation

@rrahir
Copy link
Collaborator

@rrahir rrahir commented Dec 24, 2025

Description:

[FIX] tests: fix network serialization in mock

The mock transport service did not serialize the messages the same way
it would occur in real life.

JSON.parse(JSON.stringify({ a: undefined })) === {}

deepCopy({ a: undefined }) === { a: undefined }

[FIX] Style: UPDATE_CELL overwrites the cell style

The command UPDATE_CELL was designed so that any style passed to it
would simply overwrite the cell style. This differs from the
SET_FORMATTING command and unfortunately, the distinction was lost
during recent split of style from the cells.

Task: 5441149

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

@robodoo
Copy link
Collaborator

robodoo commented Dec 24, 2025

Pull request status dashboard

this.pendingMessages.push(message);
} else {
this.notifyListeners(message);
this.notifyListeners(JSON.parse(JSON.stringify(message)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: maybe a comment explaining why we do that, and not a deepCopy

@rrahir rrahir force-pushed the saas-19.1-fix-update-cell-style-change-rar branch 2 times, most recently from 6121cde to de4d63e Compare January 6, 2026 10:28
Copy link
Collaborator

@LucasLefevre LucasLefevre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robodoo r+ rebase-ff

const msg: CollaborationMessage = deepCopy(message);
// simulates network serialization, which removes undefined values of an object,
// contrary to deepCopy
const msg: CollaborationMessage = JSON.parse(JSON.stringify(message));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@robodoo
Copy link
Collaborator

robodoo commented Jan 9, 2026

Merge method set to rebase and fast-forward.

robodoo pushed a commit that referenced this pull request Jan 9, 2026
The mock transport service did not serialize the messages the same way
it would occur in real life.

```ts

JSON.parse(JSON.stringify({ a: undefined })) === {}

deepCopy({ a: undefined }) === { a: undefined }
```

Task: 5441149
Part-of: #7692
Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
robodoo pushed a commit that referenced this pull request Jan 9, 2026
The command UPDATE_CELL was designed so that any style passed to it
would simply overwrite the cell style. This differs from the
SET_FORMATTING command and unfortunately, the distinction was lost
during recent split of style from the cells.

closes #7692

Task: 5441149
Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
@robodoo
Copy link
Collaborator

robodoo commented Jan 9, 2026

@rrahir @LucasLefevre staging failed: ci/runbot (view more at https://runbot.odoo.com/runbot/batch/2311815/build/97556437)

rrahir added 2 commits January 9, 2026 09:10
The mock transport service did not serialize the messages the same way
it would occur in real life.

```ts

JSON.parse(JSON.stringify({ a: undefined })) === {}

deepCopy({ a: undefined }) === { a: undefined }
```

Task: 5441149
The command UPDATE_CELL was designed so that any style passed to it
would simply overwrite the cell style. This differs from the
SET_FORMATTING command and unfortunately, the distinction was lost
during recent split of style from the cells.

Task: 5441149
@rrahir rrahir force-pushed the saas-19.1-fix-update-cell-style-change-rar branch from de4d63e to c8842ea Compare January 9, 2026 08:29
Copy link
Collaborator

@LucasLefevre LucasLefevre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robodoo r+

robodoo pushed a commit that referenced this pull request Jan 9, 2026
The mock transport service did not serialize the messages the same way
it would occur in real life.

```ts

JSON.parse(JSON.stringify({ a: undefined })) === {}

deepCopy({ a: undefined }) === { a: undefined }
```

Task: 5441149
Part-of: #7692
Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
robodoo pushed a commit that referenced this pull request Jan 9, 2026
The command UPDATE_CELL was designed so that any style passed to it
would simply overwrite the cell style. This differs from the
SET_FORMATTING command and unfortunately, the distinction was lost
during recent split of style from the cells.

closes #7692

Task: 5441149
Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
@robodoo robodoo closed this Jan 9, 2026
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.

4 participants