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

Document lists research: Lists model structure #9470

Closed
Mgsy opened this issue Apr 14, 2021 · 1 comment
Closed

Document lists research: Lists model structure #9470

Mgsy opened this issue Apr 14, 2021 · 1 comment
Labels
domain:v4-compatibility This issue reports a CKEditor 4 feature/option that's missing in CKEditor 5. package:list type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@Mgsy
Copy link
Member

Mgsy commented Apr 14, 2021

The biggest question is about their structure in the model. We should consider this together with the support for ul/ol attributes as this topic is really tricky today too. Another topic that we should consider is support for having two subsequent lists.

The current completely flat structure works great from the perspective of editing it (enter, backspace, pasting, cutting, joining subsequent lists, RTC, etc). With a bunch of post-fixers, it guarantees the model stays correct.

Naturally, the current approach has the aforementioned limitations. Mapping the list's model structure to the view structure 1 to 1 will be a major step backwards. A simple indent/outdent might create many operations and require complex processing.

@Mgsy Mgsy added type:task This issue reports a chore (non-production change) and other types of "todos". package:list squad:compat domain:v4-compatibility This issue reports a CKEditor 4 feature/option that's missing in CKEditor 5. labels Apr 14, 2021
@Mgsy Mgsy added this to the iteration 42 milestone Apr 14, 2021
@Mgsy
Copy link
Member Author

Mgsy commented Apr 14, 2021

We've decided to try with the flat structure and research it further.

View

<ul>
	<li>a</li>
	<li>
		<p>b</p>
		<ul>
			<li>c</li>
		</ul>
		<p>d</p>
		<p>e</p>
		<ul>
			<li>f</li>
		</ul>
		<figure class=img></figure>
	</li>
	<li>
		<span>g</span>
		<ul>
			<li>h</li>
		</ul>
	</li>
</ul>

----------------

<h1>x</h1>
<ul>
	<li>...</li>
	<li>
		...
		...
		...
		...
		<ul>
			<li>...</li>
		</ul>
		...
	</li>
	<li>
		...
		<ul>
			<li>...</li>
		</ul>
	</li>
</ul>
<h1>x</h1>

Model

<parag i=0 id=xa>a</parag>

<parag i=1 id=xb>b</parag>

<parag i=2 id=xc>c</parag>

<parag i=1 id=xb>d</parag>
<parag i=1 id=xb>e</parag>

<parag i=2 id=xf>f</parag>

<img i=1 id=xb></img>

<parag i=0 id=xg>g</parag>

<parag i=1 id=xh>h</parag>

----------------

<heading1>x</heading1>

<parag i=0 id=xa>a</parag>

<parag i=1 id=xb>b</parag>

<parag i=1 id=xb>c</parag>

<parag i=1 id=xb>d</parag>
<parag i=1 id=xb>e</parag>

<parag i=2 id=xf>f</parag>

<img i=1 id=xb></img>

<parag i=0 id=xg>g</parag>

<parag i=1 id=xh>h</parag>

<heading1>x</heading1>

@Mgsy Mgsy closed this as completed Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:v4-compatibility This issue reports a CKEditor 4 feature/option that's missing in CKEditor 5. package:list type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

No branches or pull requests

1 participant