Skip to content

Conversation

@dereuromark
Copy link
Contributor

@dereuromark dereuromark commented Nov 30, 2025

Summary

Extends task list syntax beyond [ ] and [x] to support additional states inspired by Org-mode:

Syntax State Use Case
[ ] pending Todo item
[x] done Completed
[-] cancelled No longer needed
[>] deferred Postponed for later
[?] question Needs clarification

Example

- [ ] Pending task
- [x] Completed task
- [-] Cancelled task
- [>] Deferred task
- [?] Question task

HTML Output

<ul class="task-list">
  <li><input disabled="" type="checkbox"/> Pending task</li>
  <li><input disabled="" type="checkbox" checked=""/> Completed task</li>
  <li class="task-cancelled"><input disabled="" type="checkbox" data-state="cancelled"/> Cancelled task</li>
  <li class="task-deferred"><input disabled="" type="checkbox" data-state="deferred"/> Deferred task</li>
  <li class="task-question"><input disabled="" type="checkbox" data-state="question"/> Question task</li>
</ul>

Styling Example

.task-cancelled { text-decoration: line-through; opacity: 0.6; }
.task-deferred { color: #888; font-style: italic; }
.task-question { color: #f90; }
[data-state="cancelled"]::before { content: "✗ "; }

Backwards Compatible

  • Existing [ ] and [x] syntax unchanged
  • getChecked() still works (deprecated in favor of getTaskState())
  • New getTaskState() returns one of ListItem::STATE_* constants

Acceptance plan

  • BC: getChecked() returns correct bool for all states
  • Wait for official approval from jdot author

Preview

task-list

@dereuromark dereuromark force-pushed the feature/extended-task-states branch from 86e8720 to 7bc4d3d Compare November 30, 2025 04:21
@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.30%. Comparing base (ec86f65) to head (36b77a7).

Files with missing lines Patch % Lines
src/Node/Block/ListItem.php 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master       #9      +/-   ##
============================================
+ Coverage     92.28%   92.30%   +0.02%     
- Complexity     1406     1422      +16     
============================================
  Files            53       53              
  Lines          3616     3639      +23     
============================================
+ Hits           3337     3359      +22     
- Misses          279      280       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dereuromark dereuromark force-pushed the feature/extended-task-states branch from 7bc4d3d to 34cbddb Compare November 30, 2025 04:25
Extends task list syntax beyond [ ] and [x] to support additional states:
- [-] Cancelled
- [>] Deferred
- [?] Question/uncertain

HTML rendering includes:
- data-state attribute on checkbox for extended states
- class="task-{state}" on li element for CSS styling

Backwards compatible - existing [ ] and [x] continue to work.
ListItem now has getTaskState() method returning state constants.
@dereuromark dereuromark force-pushed the feature/extended-task-states branch from 34cbddb to de48525 Compare November 30, 2025 04:30
@dereuromark dereuromark added extra beyond standard/specs RFC labels Dec 1, 2025
@dereuromark
Copy link
Contributor Author

TBD: Add [/] as half or "somewhere between no and yes" = "partially"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extra beyond standard/specs RFC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants