Skip to content
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

[FW][FIX] web_editor: convert inline before send message #165205

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 13, 2024

Commit that introduced the issue: 1

Issue:

The email sent from chatter message isn't correctly formatted.

Steps to reproduce the issue:

  • Go to chatter of any form view
  • Open the mail compose modal
  • Add a primary link the in the email body
  • Send it
  • The email isn't formatted in the received email.

Origin of the issue:

The flow goes as follow, we first change the field and then when
clicking send, we first update the value of the editor by
onWysiwygBlur , then before the send is done, the field is saved which
will trigger the event NEED_LOCAL_CHANGES which will call
commitChanges, but since we already updated the value and we don't have
urgent, nothing will happend and the function toInline will never be
called.

Solution:

To not break the old commit behavior and make it reset with disard, we
add another flag shouldInline so we can force commitChanges and
calculating inline style when saving.

opw-3885368

Forward-Port-Of: #163323

@robodoo
Copy link
Contributor

robodoo commented May 13, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented May 13, 2024

@Mtaylorr @dmo-odoo cherrypicking of pull request #163323 failed.

stdout:

Auto-merging addons/web_editor/static/src/js/backend/html_field.js
CONFLICT (content): Merge conflict in addons/web_editor/static/src/js/backend/html_field.js

stderr:

12:35:40.030217 git.c:463               trace: built-in: git cherry-pick 1e6831b54112ea7ee406d3d47102d62245703454
error: could not apply 1e6831b54112... [FIX] web_editor: convert inline before send message
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
----------
status:

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added forwardport This PR was created by @fw-bot conflict There was an error while creating this forward-port PR labels May 13, 2024
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 13, 2024
@Mtaylorr Mtaylorr force-pushed the saas-16.3-16.0-opw-3885368-macr-aNKj-fw branch from 25ed880 to 4f076cb Compare May 13, 2024 11:47
Commit that introduced the issue: [1]

Issue:
======
The email sent from chatter message isn't correctly formatted.

Steps to reproduce the issue:
=============================
- Go to chatter of any form view
- Open the mail compose modal
- Add a primary link the in the email body
- Send it
- The email isn't formatted in the received email.

Origin of the issue:
====================
The flow goes as follow, we first change the field and then when
clicking send, we first update the value of the editor by
`onWysiwygBlur` , then before the send is done, the field is saved which
will trigger the event `NEED_LOCAL_CHANGES` which will call
commitChanges, but since we already updated the value and we don't have
urgent, nothing will happend and the function `toInline` will never be
called.

Solution:
=========
To not break the old commit behavior and make it reset with disard, we
add another flag `shouldInline` so we can force `commitChanges` and
calculating inline style when saving.

[1]: odoo@3573167

opw-3885368

X-original-commit: b7ecc3f
@C3POdoo C3POdoo requested a review from a team May 13, 2024 11:49
@Mtaylorr
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request May 13, 2024
Commit that introduced the issue: [1]

Issue:
======
The email sent from chatter message isn't correctly formatted.

Steps to reproduce the issue:
=============================
- Go to chatter of any form view
- Open the mail compose modal
- Add a primary link the in the email body
- Send it
- The email isn't formatted in the received email.

Origin of the issue:
====================
The flow goes as follow, we first change the field and then when
clicking send, we first update the value of the editor by
`onWysiwygBlur` , then before the send is done, the field is saved which
will trigger the event `NEED_LOCAL_CHANGES` which will call
commitChanges, but since we already updated the value and we don't have
urgent, nothing will happend and the function `toInline` will never be
called.

Solution:
=========
To not break the old commit behavior and make it reset with disard, we
add another flag `shouldInline` so we can force `commitChanges` and
calculating inline style when saving.

[1]: 3573167

opw-3885368

closes #165205

X-original-commit: b7ecc3f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
@robodoo robodoo closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants