Comments (6)
Yes, I think a boolean "checked" (true|false) would make sense here. I'm not sure any more whether there was a reason for doing it that way. Maybe we were preserving the possibility of other values, e.g. "?", or different types of checks??
@matklad any thoughts?
from djot.js.
Checkboxes can have three different states. For example, with a list of nested checkboxes, there's often "some, but not all, child itmes are checked". As another case study, org mode seems to allow these three: [ ] [-] [X]
.
I'd say: If we only allow two states syntactically, checked: boolean
makes most sense. If we have more than three states, than we need an enum of states.
Status quo, with two states and an enum, doesn't make much sense to me.
No informed opinion on whether we should have two-state or three-state checkboxes, deferring to jgm's taste here, but I maybe lean towards allowing three cases, org-style. Seems easy to support for us, and, if we don't do this, it would be hard to work-around for the user.
from djot.js.
org mode doccs: https://orgmode.org/manual/Checkboxes.html
from djot.js.
This has a lot to do with how we want to
think about decisions in everyday life and
then technology might be fine-tuned to model
the preferred way of thinking...
... and after thinking more about it i am
proposing a fourth value: "not clear":
- "undefined": i did not think about it yet
- "checked": yes - this is true
- "unchecked": no - this is false
- "not clear": i cannot decide
Fuzzy logic
- 0.0 = this is false
- 0.5 = undecided and
- 1.0 = this is true
might be a little bit too much... (?)
Atul Gawande
has done a lot to promote the use of checklists and i use them every day
(like most of all anesthesiologists worldwide) and he is one of my heroes..
His 'Checklist for Checklists'
and his WHO Surgery Safety Checklist
does not support my suggestion above!
For him a check is an action that has to be done...
... and not a query whose result gets documented.
Both interpretations sound good to me - i would
like to be able to use both of them.
But the underlying concept is different and
it is dangerous if one is taken for the other.
What should we do?
The boolean solution?
(although i like my 4-value solution and it includes the boolean one)
from djot.js.
A checkbox on an old-fashioned piece of paper has two states, usually: checked or not checked. There isn't any difference between "I didn't think about it" and "I thought about it and decided not to check it." That's the mental model I have. (Same is true of checkboxes in HTML.)
from djot.js.
Sounds logical.
A 'task' gets done or not (boolean).
And the 'answer to a binary question'
(yes/no/undecided/missing value/...)
is something different, very depending
on the use case and very easy to model
with the current syntax - like
:+: | :-: | :?: | :_:
from djot.js.
Related Issues (20)
- Add docstrings HOT 6
- Update pandoc API version emitted HOT 4
- URLs with parenthesis break parser HOT 11
- Caption parsing is buggy HOT 3
- Include package-lock.json in the repository
- Issues with ellipses and dashes when converting to pandoc format HOT 1
- Multiline references HOT 11
- multiline link urls no longer trimmed and concatenated HOT 4
- Shared HTML id in multiple references to the same footnote HOT 7
- Clarification around list items HOT 6
- Make library available via CDN HOT 1
- Deno Third Party Module HOT 2
- Can we remove auto generated anchor in renderDjot output? HOT 6
- Crash when render tasklist as pandoc HOT 2
- No renderer for span when rendering as djot HOT 1
- Add recursive file inclusion HOT 2
- Error when trying to run `npm run test` HOT 2
- question: Add class name to all sections HOT 3
- Add comment in AST HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djot.js.