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

Toggle list should work anywhere in the list #222

Closed
santialbo opened this issue Jul 23, 2020 · 3 comments
Closed

Toggle list should work anywhere in the list #222

santialbo opened this issue Jul 23, 2020 · 3 comments
Labels
bug Something isn't working plugin:list Bulleted & ordered lists plugin:normalizers

Comments

@santialbo
Copy link
Collaborator

santialbo commented Jul 23, 2020

There are some strange behaviors when toggling list (click on the button) on nested lists. If you play with it on the storybook for a while its very easy to come up with these situations.

I would expect that only li nodes could be children of ul nodes but that is not the case. Are my expectations reasonable?

An example

- ul
  - li
    - p A
    - ul
      - li
        - p B <- toggle list here
        - ul
          - li
            - p C

becomes

- ul
  - li
    - p A
    - p B <- toggle list here one more time
    - ul
      - ul
        - li
          - p C

becomes

- ul
  - p A
- p B <- toggle list here one more time
- ul
  - ul
    - ul
      - li
        - p C

I hope this makes sense 😅

@zbeyens zbeyens added bug Something isn't working plugin:list Bulleted & ordered lists labels Jul 23, 2020
@zbeyens
Copy link
Member

zbeyens commented Jul 23, 2020

Indeed, the plugin needs some work. A normalizer may be a good fallback for these kinds of bugs not yet handled.

@horacioh
Copy link
Collaborator

I would also add that the behaviour is also happening when removing list items that has list children (watch gif).
yeah this might be solved with a normalizer!

nested-list-bug

@horacioh
Copy link
Collaborator

related: #66

@zbeyens zbeyens changed the title Strange behaviours when toggling list on nested lists levels Toggle list should work anywhere in the list Jul 15, 2021
@zbeyens zbeyens closed this as completed Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugin:list Bulleted & ordered lists plugin:normalizers
Projects
None yet
Development

No branches or pull requests

3 participants