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

Tri-state checkboxes #32

Open
fabwi opened this issue Jan 20, 2022 · 6 comments
Open

Tri-state checkboxes #32

fabwi opened this issue Jan 20, 2022 · 6 comments

Comments

@fabwi
Copy link

fabwi commented Jan 20, 2022

I really enjoy using this extension, not only for simple to-do lists but also for "decision" lists. I start these lists by enumerating all the options I have and then I consider every single option in detail. What I now miss sometimes is a third state to distinguish between "unconsidered yet" and "rejected". I fully understand if this was not your intention, but maybe a third state is valuable in other use cases as well :-)

@PKief
Copy link
Owner

PKief commented Jan 21, 2022

Sounds interesting, do you've any idea how this could look like, I mean syntactically?

@fabwi
Copy link
Author

fabwi commented Jan 26, 2022

I looked into your code and I'm afraid that this is probably not the easiest thing to achieve because of the fundamental changes it would mean. Instead of just toggling between checked/True and unchecked/False a third state would be needed. Without knowing the extension code in detail I guess that the necessary changes would be anywhere, from the model in checkbox.js to the command markCheckbox.js and the status bar in checkboxStatus.ts. It also effects the customizable options "Type of checkmark", "Italic", "Strikethrough" and "Date when checked" - there would not be a simple "checked" state anymore but a "x-checked" and a "tick-checked" state, and the need to configure each of these states.

@PKief
Copy link
Owner

PKief commented Jan 26, 2022

Regardless of the code I mean how the third state should be displayed in markdown. Maybe we could introduce a "-" inside the brackets to mark it as partially checked, like an intermediate state of the checkbox:

- [-] this point is unconsidered yet

@fabwi
Copy link
Author

fabwi commented Jan 27, 2022

In the manual "pencil and a sheet of paper" world I would probably just skip a checkbox to leave it unsonsidered. I would accept items by "tick-check" and reject items by "x-check".

In the current release, "x-checks" in the markdown code are rendered to "tick-checks" in my markdown preview. So obviously my manual habits are not working very well here ;-)

I think "-" sounds good to mark an item as unconsidered. With the advantage of leaving the current meaning of "unchecked" as "undone" which is perfect for todo lists.

@chmac
Copy link

chmac commented Dec 30, 2022

I'm also interested in multiple states for checkboxes. Dendron uses different characters inside the brackets. So they have states like "dropped" which is [d]. I use these quite a lot.

Personally, I'm also interested in finding an extension which supports alternatives to the square brackets. I'd like to be able to track repeating checklists as - ( ) for example, and have them rendered as a checkbox in the preview. Then I can grep for - [ ] while not finding my checklists!

@PKief Would adding these esoteric cases be a bit over the top for your plugin?

@darthwalsh
Copy link

@chmac adding [d] seems reasonable, instead of tri-state this feature could be custom-state-for-any-single-char, where [ ] and [x] are just two of many?

But the question of using a different markdown syntax - ( ) belongs in a different issue

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

No branches or pull requests

4 participants