Skip to content

Feature Request: Render Checkboxes for list items starting with square brackets #57

@RichardWepner

Description

@RichardWepner

On Gitea (as well as GitHub, Gitlab, and probably other issue systems using Markdown), list entries starting with a pair of square brackets and either a space or an x in between (i. e. starting with - [ ] or - [x]) are not rendered with the regular list bullet point, but rather with a checkbox.

Example

## Tasks

- [ ] Create repositories and projects as necessary
- [ ] add annotations to declare types to use generated serializers
- [ ] find all applicable types in the project

would be rendered in Gitea as

Gitea Screenshot

image

but is rendered in VSCode as

VSCode Screenshot

image

As a comparison, this is the same from above here on GitHub:

Markdown
  • Create repositories and projects as necessary
  • add annotations to declare types to use generated serializers
  • find all applicable types in the project

List Nesting

Please keep in mind that since this is done inside of lists, nesting needs to be respected and the indentation should be respected. Here is an example on Github how this could look like:

Markdown with multiple levels
  • Level 1 Without
  • Level 1 With
    • Level 2 Without
    • Level 2 With
  • Level 1 checked

Checking of Checkboxes

In most issue trackers, checking a checkbox created with this would automatically update the issue by setting an x into the square brackets.

As long as this extension offers only read-only access to the issues, the checkboxes should be rendered as readonly or disabled. This is also used in the preview mode of platforms using this feature.

Once write access to the Gitea instance is established, another feature to be implemented would be to interpret checkbox clicks as edits and updating the issue. However, this is out of scope for this issue and should be implemented afterwards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions