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

Integrate to-do list with autoformat #7518

Closed
mlewand opened this issue Jun 30, 2020 · 4 comments · Fixed by #8735
Closed

Integrate to-do list with autoformat #7518

mlewand opened this issue Jun 30, 2020 · 4 comments · Fixed by #8735
Assignees
Labels
domain:ui/ux This issue reports a problem related to UI or UX. intro Good first ticket. package:autoformat squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@mlewand
Copy link
Contributor

mlewand commented Jun 30, 2020

📝 Provide a description of the new feature

Autoformat could also support inserting to-do lists with [ ]  - which would symbolize a checbox.

GitHub, for instance, uses a - [ ]  marker for todo checkbox. This will work out of the box (given #6170 is done) as dash (-) will transform line to a unordered list and subsequent [ ]  will turn it into a to-do item as expected.


If you'd like to see this feature implemented, add a 👍 reaction to this post.

@mlewand mlewand added type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:autoformat domain:ui/ux This issue reports a problem related to UI or UX. labels Jun 30, 2020
@mlewand
Copy link
Contributor Author

mlewand commented Jun 30, 2020

Adding to a discussion, should there be more combinations that trigger the to-do list rather than - [ ] alone, for example.

I personally typically try to use [ ] - and then I'm always surprised that GH doesn't get it 😄 So in addition to - [ ] I suggest handling [ ] too.

Another thing: should the space between the bracket be mandatory?

@Reinmar
Copy link
Member

Reinmar commented Jun 30, 2020

I always try [ ] text and I'm then pissed that it doesn't work :D

@jodator
Copy link
Contributor

jodator commented Jun 30, 2020

For me PITA is lack of [] support in GH.

In Notion you'd type [] only (OTOH in Notion [ ] doesn't work...).

What should trigger - I think [] or [ ] is enough as `- ` would trigger list (just checked Notion):

  1. type -
  2. paragraph gets turned into list item
  3. type []
  4. list item gets turned into todo list item

@mlewand
Copy link
Contributor Author

mlewand commented Jun 30, 2020

  • type -
  • paragraph gets turned into list item
  • type []
  • list item gets turned into todo list item

Yes, this might also work 👍

So based on our comments I can see that the best option is to look at beginning that would match following regexp: \s\[\s\]\s:

[ ]
 [ ]
[]
 []

@mlewand mlewand added the intro Good first ticket. label Jul 6, 2020
@mlewand mlewand added this to the nice-to-have milestone Jul 6, 2020
@Reinmar Reinmar added squad:core Issue to be handled by the Core team. and removed squad:red labels Jul 28, 2020
@oleq oleq modified the milestones: nice-to-have, iteration 39 Dec 21, 2020
Reinmar added a commit that referenced this issue Dec 31, 2020
Feature (autoformat): Square brackets should convert the current line to a to-do list item. Closes #7518.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ui/ux This issue reports a problem related to UI or UX. intro Good first ticket. package:autoformat squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants