Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Slate Losing Lists #192

Closed
irmerk opened this issue Nov 13, 2019 · 4 comments
Closed

Slate Losing Lists #192

irmerk opened this issue Nov 13, 2019 · 4 comments
Assignees
Labels

Comments

@irmerk
Copy link
Member

irmerk commented Nov 13, 2019

Describe the bug
There seems to be an error with the schema for SlateJS and lists are lost when coming from markdown to slate in the markdown-transform

To Reproduce
Roundtrip Slate DOM to markdown back to Slate DOM

Expected behavior
There should be rendering of list items correctly, not as paragraphs?

Screenshots
Screen Shot 2019-11-13 at 14 53 30 PM
Note that the indentation is way off after a list now.

Screen Shot 2019-11-13 at 14 53 42 PM

Note that this is not being registered as a list in the toolbar, and entering creates a plain paragraph (indented)
@irmerk irmerk added Type: Bug 🐛 Something isn't working Difficulty: Medium labels Nov 13, 2019
@irmerk irmerk added this to Triage in Cicero UI v1.0 via automation Nov 13, 2019
@irmerk irmerk moved this from Triage to Priority: High in Cicero UI v1.0 Nov 13, 2019
@irmerk irmerk self-assigned this Nov 14, 2019
@irmerk
Copy link
Member Author

irmerk commented Nov 14, 2019

In the demo you can see that the list already created and there in the demo renders with a paragraph tag, but a new list created by the user has list items which are not paragraph tags:


Default list:
Screen Shot 2019-11-14 at 17 23 38 PM


User made list:
Screen Shot 2019-11-14 at 17 23 13 PM


The default ones are not registering as a list to the toolbar because it is being recognized as just a paragraph.

@jeromesimeon
Copy link
Member

This looks like a regression introduced when we switched to markdown-transform 0.8.0.

@irmerk
Copy link
Member Author

irmerk commented Nov 15, 2019

Right, this seems to have to do with needing to update the way we handle lists in this component now. Because it used to be

ol_list => list_item => text

But now is

ol_list => list_item => paragraph => text

@jeromesimeon
Copy link
Member

makes sense! The relationship between the schema and how we modify the DOM is also pretty sensitive. I'm wondering if there is a good way to document both so they remain in sync.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
Cicero UI v1.0
  
Finished Issues
Development

No branches or pull requests

2 participants