vimwiki-backup / vimwiki

Automatically exported from code.google.com/p/vimwiki
1 stars 1 forks source link

Todo HTML generation seems not quite right #294

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a TODO list like:
* [ ] Item 1
* [x] Item 2 is complete

What is the expected output? What do you see instead?
I'd except to see the html output look pretty much the same. Instead it looks 
like:
http://dl.dropbox.com/u/258585/test.png

What version of the product are you using? On what operating system?
Dev version 497 on linux

Thanks!
Scott

Original issue reported on code.google.com by firecat4...@gmail.com on 21 Mar 2012 at 11:48

GoogleCodeExporter commented 9 years ago
And how it should look like?
Previously there were checkboxes used to "draw" todo items. Now (I am not sure 
since when though) it is pure CSS.

Original comment by habamax on 22 Mar 2012 at 3:17

GoogleCodeExporter commented 9 years ago
For checked:
<li><input type="checkbox" checked="checked" disabled="disabled" />Completed, 
no strikethrough</li>

or for unchecked:
<li><input type="checkbox" disabled=disabled />TODO item</li>

or for checked and strikethrough:
<li style="text-decoration: line-through"><input type="checkbox" 
checked="checked" disabled="disabled" />Completed TODO with strikethrough</li>

Is that what you're asking? 

Scott

Original comment by firecat4...@gmail.com on 22 Mar 2012 at 4:32

GoogleCodeExporter commented 9 years ago
Yes, there are no more "checkboxes". Only css.

Original comment by habamax on 22 Mar 2012 at 4:44

GoogleCodeExporter commented 9 years ago
But default css should be tinkered to make checked list items more appealing.

Original comment by habamax on 22 Mar 2012 at 4:48

GoogleCodeExporter commented 9 years ago
The html for a todo list looks like:
<li class="done0">
List TODO #1

<li class="done0">
List TODO #2

and the default CSS for class done0 is:
.done0:before {content: "\2592\2592\2592\2592"; color: SkyBlue;}

1. Should there be a </li> after each list item?
2. I guess I don't understand what visual effect is being accomplished with 
that CSS statement, other than printing 4 blue boxes (like in my screenshot 
from my initial post? Sorry if I'm being dense :)
3. Is there a reason you just don't use the default html checkbox?

Thanks,
Scott

Original comment by firecat4...@gmail.com on 22 Mar 2012 at 6:52

GoogleCodeExporter commented 9 years ago
1. Vimwiki generates HTML, not XHTML, therefore closing tags for <li> are not 
required
2. Some parts of the documentation probably make this less obvious (and name 
"checkboxes" might make an incorrect impression on some), but vimwiki actually 
allows you to specify five different completion levels (of which [ ] and [X] 
are just two extreme cases). The default CSS tries to indicate the completion 
level in a simple semi-graphical way (as a "progress" bar).
3. Many reasons:
  * As mentioned above, there are actually more than two states that need to be represented.
  * The meaning of various "checkmarks" or "crossmarks" is quite culturally dependent.
  * HTML form elements are meant to allow for input (to be processed by scripts), while Vimwiki has the wiki file as input, and produces HTML as output.
  * Even if producing a certain HTML would not be outright wrong, hard-wiring it into Vimwiki generator would be much less flexible than using simple logical HTML and leave visual representation to (a user controlled) CSS.

The default css sort of encourages those people who are using todo-lists to 
modify it by having a peculiar set of colors. But you can modify how 
"checkboxes" are represented too.

If you only use the [ ] and [X] and prefer to see crossmarks, you may for 
instance modify your style.css file to display ☐ for .done0 class (use 
"\2610" in content:) and ☒ for .done4 class (use "\2612"). If your browser 
does not display these two characters, try to get some more fonts on your 
system or pick some other symbols for your .css file that your system can 
handle.

Original comment by tpospi...@gmail.com on 24 Mar 2012 at 7:30