-
Notifications
You must be signed in to change notification settings - Fork 71
[FIX] Style: UPDATE_CELL overwrites the cell style #7692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tests/__mocks__/transport_service.ts
Outdated
| this.pendingMessages.push(message); | ||
| } else { | ||
| this.notifyListeners(message); | ||
| this.notifyListeners(JSON.parse(JSON.stringify(message))); |
There was a problem hiding this comment.
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
6121cde to
de4d63e
Compare
LucasLefevre
left a comment
There was a problem hiding this 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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
Merge method set to rebase and fast-forward. |
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]>
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]>
|
@rrahir @LucasLefevre staging failed: ci/runbot (view more at https://runbot.odoo.com/runbot/batch/2311815/build/97556437) |
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
de4d63e to
c8842ea
Compare
LucasLefevre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
robodoo r+
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]>
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]>

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.
[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