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
[FIX] web_editor: properly handle nested lists and list conversion #32709
[FIX] web_editor: properly handle nested lists and list conversion #32709
Conversation
b98852b
to
aa38f0c
Compare
aa38f0c
to
ec25c8d
Compare
ec25c8d
to
877d698
Compare
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.
Looks globally good but... could you move the corresponding tests to each "FIX" commit (instead of having one big "tests" commit).
877d698
to
0ae253d
Compare
@pparidans Thanks for the review. I applied your requested changes. |
0ae253d
to
647f25a
Compare
@pparidans Thanks, all fixed! |
The `o_checklist` class was preserved when converting a checklist to an ordered list.
This addresses various bugs that occured with nested lists - including lists that are nested with a UL within a LI (as opposed to a UL directly within another UL).
A list item with text can be written as <li>text</li> or as <li><p>text</p></li>. Issues occurred when both syntaxes need to be merged together. Namely, the <p>text</p> was being appended to the other list item, thereby creating a visible new line.
The "comparisons" website snippet uses a list group with the class set on a UL. In consequence, the web editor considers it as a regular list and may try to outdent it, which is not the expected behavior with a list group. This fix ensures that ULs with the `list-group` class cannot be in/outdented.
647f25a
to
dfa9c58
Compare
@robodoo r+ |
Because this PR has multiple commits, I need to know how to merge it:
|
Staging failed: ci/runbot on 3f8dc210740391c34e63cb9546b9cb78aa828228 (view more at http://runbot.odoo.com/runbot/build/509875) |
@robodoo retry |
The "comparisons" website snippet uses a list group with the class set on a UL. In consequence, the web editor considers it as a regular list and may try to outdent it, which is not the expected behavior with a list group. This fix ensures that ULs with the `list-group` class cannot be in/outdented. closes #32709 Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Staging failed: ci/runbot on 48b9a42dd0f444f717bba0c9f641f026c9a07428 (view more at http://runbot.odoo.com/runbot/build/509989) |
@robodoo retry |
Merged, thanks! |
These are various fixes for bugs concerning nested lists and the conversion a type of list into an other. Many tests were added to better cover nested lists as well as checklists in general.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr