Files
plainleaf/client/codemirror
Matouš Jan FialkaandGitHub 203ef99fc7 Improve enhanced task widget (#1905)
* Fix (tasks): Toggle dropdown on re-click and narrow mark decoration range

- Clicking the dropdown icon now dismisses the completion menu if it
  is already open (`closeCompletion`).

- The `data-task-state` mark decoration now covers only the inner state
  text (excluding brackets). This prevents CodeMirror cursor/editing
  issues when the caret is inside the brackets and allows bracket-aware
  CSS styling. Example:

  ```space-style
  [data-task-state="DONE"] { color: green; }
  [data-task-state="PLANNED"] { color: orange; }
  [data-task-state] { font-weight: bold; }
  ```

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

* Refactor (tasks): Unify task state data attribute to `data-task-state`

Rename `data-state` to `data-task-state` on extended task state spans in
Markdown renderer and update the corresponding places.

Previously the editor (CodeMirror mark decoration) used
`data-task-state` while the widget HTML renderer used `data-state`,
requiring duplicate CSS selectors. Now a single attribute selector works
everywhere (for example tasks rendered using `template.taskItem` also
follow the styling now):

```css
[data-task-state="PLANNED"] { /* cool CSS here */; }
```

Note: Checkbox inputs (`[ ]`/`[x]`/`[X]`) still use `data-state` since
they follow a different code path.

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>

---------

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
2026-03-24 08:51:13 +01:00
..
2025-09-29 11:17:55 +02:00
2026-02-14 22:08:35 +01:00
2025-09-29 11:17:55 +02:00
2025-09-29 11:17:55 +02:00
2025-09-29 11:17:55 +02:00
2026-03-13 09:24:52 +01:00
2025-09-29 11:17:55 +02:00
2025-09-29 11:17:55 +02:00
2025-09-29 11:17:55 +02:00
2026-03-24 08:51:13 +01:00