IssueRaiser

Collapsible contents (code block) in comments / spoiler tag

Related: #154, isaacs/github#208 GitHub really needs a way to collapse long contents. Being able to collapse entire comments may suffice for most. To me however, the ideal solution would be to collapse any code block with more than 10 lines (or whatever number) by default. The code block would be replaced by the text: `Code (130 lines) - Expand` Where clicking "Expand" reveals the code block. Being able to specify a collapsible code block with ````collapse` would work equally as well. I recall reading a discussion about this feature involving some GitHub developers. I can't find the link to that discussion, but their response at the time was "We'll implement it when CommonMark does." Here's the CommonMark discussion: http://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767 The GitHub Markdown guide hasn't been updated in over 2 years: https://guides.github.com/features/mastering-markdown/ Perhaps it's time to stop waiting for CommonMark to change and simply add this functionality to GitHub's Web UI; no MarkDown hacks required.

Posted by aensley on May 24, 2016, 4:12 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments

ux (Software)

Collapsible contents (code block) in comments / spoiler tag

aensleyMay 24, 2016, 4:12 PM

Related: #154, isaacs/github#208 GitHub really needs a way to collapse long contents. Being able to collapse entire comments may suffice for most. To me however, the ideal solution would be to collapse any code block with more than 10 lines (or whatever number) by default. The code block would be replaced by the text: `Code (130 lines) - Expand` Where clicking "Expand" reveals the code block. Being able to specify a collapsible code block with ````collapse` would work equally as well. I recall reading a discussion about this feature involving some GitHub developers. I can't find the link to that discussion, but their response at the time was "We'll implement it when CommonMark does." Here's the CommonMark discussion: http://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767 The GitHub Markdown guide hasn't been updated in over 2 years: https://guides.github.com/features/mastering-markdown/ Perhaps it's time to stop waiting for CommonMark to change and simply add this functionality to GitHub's Web UI; no MarkDown hacks required.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue