Skip to content

Switch notes panel to RichTextEditor, add checklist button, fix dead comment button - #2

Merged
yattdev merged 3 commits into
mainfrom
feature/enhance-the-note-tak-xoj
Aug 9, 2026
Merged

Switch notes panel to RichTextEditor, add checklist button, fix dead comment button#2
yattdev merged 3 commits into
mainfrom
feature/enhance-the-note-tak-xoj

Conversation

@yattdev

@yattdev yattdev commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Use host.ui.RichTextEditor for the notes panel, matching the Plan editor
  • Add a checklist (GFM task-list) toolbar button
  • Hide the dead comment button on the rich editor; add a modal preview toggle

Context

These 3 commits were made after PR #1 was merged but were never pushed, so they were missing from main. This PR lands the remaining work.

Test plan

  • Open the notes panel and confirm the rich text editor renders (matching the Plan editor)
  • Use the checklist toolbar button to insert a GFM task list
  • Confirm the comment button is hidden and the modal preview toggle works
  • ui/bundle.test.mjs passes

🤖 Generated with Claude Code

ayattara-sfl and others added 3 commits August 8, 2026 07:09
Adds applyCheckboxList, mirroring the existing bullet/numbered-list
toggle transforms: toggles a "- [ ] " marker on every non-blank
selected line, converting a plain bullet in-place to "- [ ] " rather
than double-prefixing, and toggles all-checked lines back to plain
text in one click. Wires a new "checkbox-list" entry into
TOOLBAR_ACTIONS so the button shows in MarkdownToolbar for both the
notes panel and the kanban modal (both share the same component).

Adds unit tests covering empty note, blank-line caret, full-selection
toggle on/off, blank-line skipping mid-selection, existing-bullet
conversion, and bare-caret behavior. Updates README's toolbar feature
list to mention the checklist button.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The task panel/mobile surface now renders host.ui.RichTextEditor — the
same TipTap-based WYSIWYG editor the Plan panel uses (markdown in,
markdown out via tiptap-markdown; bold/italic/headings/lists/links/
code blocks/checklists reachable through its own bubble menu and "/"
slash commands) — instead of the hand-rolled markdown textarea, per
the request to model the notes editor on the existing Plan text area.

The kanban card's "Edit notes" modal keeps the markdown textarea +
MarkdownToolbar: host.ui.RichTextEditor calls useMermaidErrorToast,
which requires a ToastProvider ancestor, and the host's
PluginModalHost (where this plugin's modal mounts) does not render
one — this is the same platform gap a prior commit
(283b7f8, "fix: use a plain textarea in the kanban notes modal")
already discovered and documented; it still applies. NotesEditor now
branches on `presentation` internally to pick the right editor per
surface, rather than exposing a separate prop.

Since host.ui.RichTextEditor only consumes its `value` prop as the
TipTap editor's initial content (no effect resyncs a later value
change, same as the Plan panel's own tiptap-plan-editor.tsx), a
`lastRichValueRef`-driven effect bumps an `editorKey` to force a
remount whenever the note's value changes for a reason other than the
editor's own onChange (a cross-tab sync refresh, or an accepted
"Enhance with AI" preview) — mirroring task-plan-panel.tsx's own
`editorKey` pattern for the same problem.

Updates README to describe the new per-surface editor split and
updates a stale test comment referencing the old unified-editor
design.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- host.ui.RichTextEditor's bubble menu always renders a "comment" button
  (inherited unconditionally from the Plan editor's TipTapPlanEditor),
  but the plugin-facing RichTextEditor wrapper never forwards
  onSelectionChange, so clicking it is a silent no-op for every plugin
  that uses it, not just this one. There is no prop to disable it and no
  host change is in scope here, so this hides it with a small scoped CSS
  rule (injectPluginStyles) targeting the panel's own RichTextEditor
  instance via a new "kandev-notes-richtext" class.
- Add a "Preview" toggle next to "Enhance with AI" in the kanban modal
  that swaps the plain textarea for host.ui.RichTextReadOnly (the Plan
  editor's read-only renderer), showing headings/lists/checkboxes/code
  blocks/links rendered as they'll look. This has no ToastProvider
  dependency (unlike the fully-editable RichTextEditor), so it's safe to
  mount inside the modal, which still can't host the editable rich editor
  due to that host-platform gap (documented in an earlier commit).
- Confirmed the "Todos" tab seen alongside "Notes" in the add-panel menu
  is a built-in kandev panel (layout-manager/constants.ts), unrelated to
  this plugin.
- Add unit tests for injectPluginStyles (single tag, idempotent, correct
  selector) and for initialize() being safe without a document global.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yattdev
yattdev merged commit 63524d0 into main Aug 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants