Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Unwrapping multilevel list #44

Open
Rebulus opened this issue Mar 21, 2017 · 3 comments
Open

Unwrapping multilevel list #44

Rebulus opened this issue Mar 21, 2017 · 3 comments

Comments

@Rebulus
Copy link
Contributor

Rebulus commented Mar 21, 2017

Hi.

Currently, when I try to unwrap multilevel list
For example, a list like this:

  • a
    • b
      • c
        • d

plugin just unwrap the first one item. Please, watch the slideshow below:

list_behavior

What do you think, if plugin would unwrap the whole list structure? The same behavior you can find in Google Docs, Pages and Word.

@Rebulus
Copy link
Contributor Author

Rebulus commented Jul 6, 2017

@Soreine Could you write your feedback about that improvement? If it is ok, I could prepare pull for that.

@Soreine
Copy link
Contributor

Soreine commented Sep 19, 2017

I think we could expose a different transform than unwrapList to do that. It is good to keep the current unwrapList available for operation like Backspace at the beginning of an item.

If we want to match Google Docs behavior, we should call the new transform toggleList. Because on Google Docs, you go from

- 1
- 2
  - 2.1
  - 2.2
- 3

to

  1
  2
    2.1
    2.2
  3

No more bullets, but there is still some indentation. And toggling again goes back to the initial list.
I don't know how we could do that in Slate (we need to define "indent").

Would you like instead a transform that flatten all the blocks in a nested list ?

@Rebulus
Copy link
Contributor Author

Rebulus commented Dec 25, 2017

Hi, @Soreine.

Thank you for your answer and sorry that I didn't answer so long time.
As for me, your explanation and suggestion sounds good. Could you a little bit describe your question?
Do you mean, that list will be?
Before:

- 1
- 2
  - 2.1
  - 2.2
- 3

After toggling:

1
2
2.1
2.2
3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants