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

Add Checkbox List Type to Gutenberg List Block #15005

Open
ccwalburn opened this issue Apr 16, 2019 · 7 comments
Open

Add Checkbox List Type to Gutenberg List Block #15005

ccwalburn opened this issue Apr 16, 2019 · 7 comments
Labels
[Block] List Affects the List Block New Block Suggestion for a new block [Type] Enhancement A suggestion for improvement.

Comments

@ccwalburn
Copy link

Would it be possible to add a "checkbox" list type to the Gutenberg List Block?

@Soean Soean added the [Block] List Affects the List Block label Apr 17, 2019
@youknowriad youknowriad added the [Type] Enhancement A suggestion for improvement. label Apr 17, 2019
@mtias
Copy link
Member

mtias commented Apr 19, 2019

I think this should probably be a new block instead if widely relevant — with the ability to transform a list to / from it. A while ago I played with the concept here:

https://cloudup.com/crwihuioLVq

@ellatrix
Copy link
Member

ellatrix commented Apr 19, 2019

I've actually started working on this a few weeks ago, but didn't have the time to finish it up.

@mtias I think a check list (or task list) is so similar to a normal list that it might make more sense to built it in the list block. It still benefits form all the normal list interactions (e.g. indentation, enter behaviour), in fact, a check list is just a list with input elements at the start. Even in Github's Markdown this is visible: - [ ] item or * [ ] item (we could even make a shortcut for it). Technically you can also have an ordered check list (try 1. [ ] item, it will still parse correctly, but display the same).


  • This is an unordered check list.

  1. If you inspect the HTML structure of this list, you'll see that it's an ordered list.

@davipontesblog
Copy link

davipontesblog commented Aug 27, 2019

Just got a request for the same thing from a WordPress.com user.

@khristiansnyder
Copy link

khristiansnyder commented Oct 23, 2020

It would be great if we can get a checkbox / checklist type block. I have run into a few instances lately where that would be handy.

@mtias mtias added the New Block Suggestion for a new block label Jul 13, 2021
@carolinan
Copy link
Contributor

carolinan commented Feb 6, 2023

Is this intended to be purely visual or should the state be stored? I mean:
When I add the block in the editor, am I able to check the box, and when I view it on the front, is it then checked?
And does it have any practical use? What is the checklist used for? Do I use it in a form?

@jeffpaul
Copy link
Member

Is this intended to be purely visual or should the state be stored? I mean:
When I add the block in the editor, am I able to check the box, and when I view it on the front, is it then checked?

The state should be stored, though perhaps with limitation on who can "check" items off the list?

And does it have any practical use? What is the checklist used for? Do I use it in a form?

I've hacked together list blocks and ✅ plus 🔳 visually at the front of the text to fake this sort of functionality. Usually used in posts to track progress on something and then checking off tasks as they're completed so that a record of progress is visually tracked in said checklist.

@carolinan
Copy link
Contributor

I am not sure this type of action should be used outside a form. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block New Block Suggestion for a new block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

9 participants