Page MenuHomePhabricator

Support Task List syntax in remarkup
Closed, ResolvedPublic

Description

For simple projects and tasks, creating subtasks can be necessary. We often use task list in a main task's description to indicate smaller todo items.

Github provided a task lists syntax for that:

https://help.github.com/articles/github-flavored-markdown#task-lists

I think it will be useful.

# [ ] Steal Underpants.
# [ ] ?
# [ ] Profit

Event Timeline

chengyin created this task.Oct 11 2013, 9:33 PM
chengyin updated the task description. (Show Details)
chengyin raised the priority of this task from to Needs Triage.
chengyin added a subscriber: chengyin.
epriestley triaged this task as Wishlist priority.Oct 12 2013, 11:45 PM
epriestley added a subscriber: epriestley.

This requires writing back into the markup source when it is edited, which we currently don't do anywhere else and which I don't think allows us to build that much other stuff. It's also pretty complicated.

FYI

In GitHub, the generated HTML disabled the checkbox - it is not an interactive piece. It is a pure presentational piece.

To check the checkbox, the markdown source needs to be edited manually.

Correction:

@epriestley was right, the checkboxes are functional UI pieces [1]. I saw it disabled was because of permissions.

[1]: https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments

One thing I didn't try was using the element in a README.md -- I can't imagine how that works. My guesses are "it doesn't", "it isn't editable", or "it glitches horribly when the list is edited".

I do think the feature is pretty cool, it's just a lot of work compared to most markup features.

I guess a fourth possibility is: it makes a commit every time you check a checkbox.

I hope it's that.

Mystery solved: it is not supported in (README.md)[1].

Only supported in the GitHub functions, not the rendered repo content.

The blog post says "GFM: Issues/Pulls, Comments" so I think that's where it is available.

[1]: https://github.com/chengyin/gh-checkbox

An alternate approach would be to implement these lists as first-class objects, so you'd have a button on the remarkup area which opened up an editor or something and then ultimately embedded {X123} (roughly, like files/images work). This would mean you couldn't create these lists from the CLI (like in arc diff) and couldn't edit them when editing remarkup (although the rendered version could let you launch the editor), but would solve all the other issues and maybe open up other integrations.

This would be less complex, but a whole lot of work.

◀ Merged tasks: T4247.

Another compromise we could implement easily is to make these read-only, and you check them off by editing the comment or object description. That would be a little less convenient (to check a box, you have to edit -> place an "X" -> save), but very straightforward to implement and not open up any of the messy questions that a writable implementation implies. Basically, it would just be a new list style, where [ ] renders a (non-interactive) unticked checkbox, and [x] renders a (non-interactive) ticked checkbox.

qgil added a subscriber: qgil.Apr 23 2014, 3:15 PM
qgil moved this task to Important on the Wikimedia board.

@qgil, how valuable is the read-only version compared to the read-write version? Rough breakdown here is that read-only will take about 10 minutes, read-write will take 70,000 centuries.

qgil added a comment.May 1 2014, 7:28 PM

Let me think.

(silence)

I believe we'll go for read-only, then. ;)

Our product guys will be able to edit the markup, sure.

epriestley edited this Maniphest Task.May 1 2014, 8:10 PM
epriestley edited this Maniphest Task.May 1 2014, 8:14 PM

I've marked D8931 (which implements the read-only version) as resolving this task. We might implement the read-write version some day, but the infrastructure complexity and product questions (how do we show edit history?) are hard to justify given that the feature is probably not hugely earth-shattering.

If we develop other features in the future which would benefit from writable, rendered remarkup, that would help support the case for a read-write version of this, but I don't think we currently have any plans or feature requests in this vein.

epriestley edited this Maniphest Task.May 2 2014, 12:53 AM
epriestley closed this task as Resolved.May 2 2014, 12:53 AM

Closed by commit rPHUd7732a7cc050.

epriestley edited this Maniphest Task.May 2 2014, 12:53 AM
turadg added a subscriber: turadg.Jul 8 2014, 4:14 PM