-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Document lists] Research the approach to the conversion in GHS #11284
Comments
🟢 Scenario 1 (that works)Set data: <paragraph listIndent=0>x</paragraph>
<paragraph listIndent=1>y</paragraph> Conversion to view:
At some point we have this in the view: <ul><li><p>x</p></li></ul>
<ul><li><ul><li><p>y</p></li></ul></li></ul> Thanks to ul and li being attribute elements, the uls and lis that are "similar" are merged into: <ul><li><p>x</p> [</li></ul>
<ul><li>] <ul><li><p>y</p></li></ul></li></ul> (everything between Finally, we get this: <ul><li>
<p>x</p>
<ul><li>
<p>y</p>
</li></ul>
</li></ul> 🟢 Scenario 2 (that still works)Set data: <paragraph listItemId=a listIndent=0>x1</paragraph>
<paragraph listItemId=a listIndent=0>x2</paragraph>
<paragraph listItemId=b listIndent=1>y</paragraph> ... conversion happens At some point we have this in the view: <ul><li _id=a><p>x1</p></li></ul>
<ul><li _id=a><p>x2</p></li></ul>
<ul><li _id=a><ul><li _id=b><p>y</p></li></ul></li></ul> .... merging happens Finally, we get this: <ul><li>
<p>x1</p>
<p>x2</p>
<ul><li>
<p>y</p>
</li></ul>
</li></ul> 🟢 Scenario 3 (that still works)Set data: <paragraph listItemId=a listIndent=0 listStyle=Q>x1</paragraph>
<paragraph listItemId=a listIndent=0 listStyle=Q>x2</paragraph>
<paragraph listItemId=b listIndent=1 listStyle=Q>y</paragraph> ... base conversion of lists happens At some point we have this in the view: <ul><li _id=a><p>x1</p></li></ul>
<ul><li _id=a><p>x2</p></li></ul>
<ul><li _id=a><ul><li _id=b><p>y</p></li></ul></li></ul> Then, listStyle conversion kicks in. It wraps e.g. <ul style=Q><li _id=a><p>x1</p></li></ul>
<ul style=Q><li _id=a><p>x2</p></li></ul>
<ul style=Q><li _id=a><ul style=Q><li _id=b><p>y</p></li></ul></li></ul> .... then merging happens Finally, we get this: <ul style=Q><li>
<p>x1</p>
<p>x2</p>
<ul style=Q><li>
<p>y</p>
</li></ul>
</li></ul> 🔴 Scenario 4 (that doesn't work)Set data: <paragraph listItemId=a listIndent=0 listStyle=Q htmlLiAttributes=W>x1</paragraph>
<paragraph listItemId=a listIndent=0 listStyle=Q htmlLiAttributes=W>x2</paragraph>
<paragraph listItemId=b listIndent=1 listStyle=Q>y</paragraph> ... conversion happens At some point we have this in the view: <ul><li _id=a><p>x1</p></li></ul>
<ul><li _id=a><p>x2</p></li></ul>
<ul><li _id=a><ul style=Q><li _id=b><p>y</p></li></ul></li></ul> Then, listStyle conversion kicks in. It wraps e.g. <ul style=Q><li _id=a><p>x1</p></li></ul>
<ul style=Q><li _id=a><p>x2</p></li></ul>
<ul style=Q><li _id=a><ul style=Q><li _id=b><p>y</p></li></ul></li></ul> Then GHS's converter kicks in. It wraps those blocks again in another ul/lis. Situation before GHS's elements get merged with their siblings:
We'd like PROBLEM ☝️ |
Ideas:
|
The text was updated successfully, but these errors were encountered: