Skip to content

feat: implement task list support - #92

Merged
hryhoriiK97 merged 6 commits into
mainfrom
@hryhoriiK97/feat/add-support-for-tasks-list
Feb 20, 2026
Merged

hryhoriiK97 merged 6 commits into
mainfrom
@hryhoriiK97/feat/add-support-for-tasks-list

Conversation

@hryhoriiK97

@hryhoriiK97 hryhoriiK97 commented Feb 19, 2026 •

Copy link
Copy Markdown
Collaborator

What/Why?

PR adds interactive GFM task list checkboxes (- [x] / - [ ]) to the library. Tapping a checkbox toggles it on the native side (iOS & Android) and re-renders immediately . The onTaskListItemPress callback fires with the new checked state so consumers can sync external state if needed.

Testing

Screenshots

iOS Android

PR Checklist

  • Code compiles and runs on iOS
  • Code compiles and runs on Android
  • Updated documentation/README if applicable
  • Ran example app to verify changes

@hryhoriiK97 hryhoriiK97 changed the title feat: implement task list support in EnrichedMarkdown feat: implement task list support Feb 19, 2026
@hryhoriiK97
hryhoriiK97 marked this pull request as ready for review February 20, 2026 09:44
@hryhoriiK97
hryhoriiK97 merged commit ddf020c into main Feb 20, 2026
5 checks passed
@hryhoriiK97
hryhoriiK97 deleted the @hryhoriiK97/feat/add-support-for-tasks-list branch February 20, 2026 14:13
hryhoriiK97 added a commit to pingdotgg/enriched-markdown that referenced this pull request Oct 16, 2026
…kdown

toggleTaskListItemAtIndex wrote `[ ]` for checked and `[x]` for unchecked,
the inverse of Android, since software-mansion#92. The checkbox looked right because the
attributed string is patched separately, but the cached markdown recorded
the opposite state, so anything reading it after a tap saw a stale checkbox
and a prop echo of the toggled document never matched the local render.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
eszlamczyk added a commit that referenced this pull request Oct 16, 2026
* feat: add a per-block line wrap toggle to code block headers

Adds an opt-in `enableCodeBlockWrapToggle` prop to the React Native
package. Each top-level fenced code block gets a wrap button next to copy;
tapping it wraps that block's lines at the block width, and tapping again
returns to horizontal scrolling.

Wrap state is a set of document-order indexes of top-level code blocks, fed
to the view-free measure pass (part of the iOS measurement cache key and the
Android measure hash). It resets when anything before the previous
document's last line changes, so streaming and task toggles keep it.
Labels come from `accessibilityLabels.codeBlock.wrap` / `.unwrap`.

Closes #1009

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ios): write the checked state a task toggle produces into the markdown

toggleTaskListItemAtIndex wrote `[ ]` for checked and `[x]` for unchecked,
the inverse of Android, since #92. The checkbox looked right because the
attributed string is patched separately, but the cached markdown recorded
the opposite state, so anything reading it after a tap saw a stale checkbox
and a prop echo of the toggled document never matched the local render.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix: keep wrap state across task toggles and stroke the Android wrap icon

iOS reset the wrapped set when the markdown prop changed before its last
line, which a task-toggle echo always does. The reset now skips a prop that
equals the markdown already rendered locally, so the reader's choice stands.

Android drew the wrap glyph through androidx.core.graphics.PathParser, a
RestrictTo API, as a filled shape. WrapGlyph strokes the same Material
outline with the copy glyph's paint, so the two header buttons match.

Docs note that macOS accepts the prop without a toggle. Comments restating
adjacent code are trimmed. CodeBlockContainerViewTest moves to a follow-up
PR that adds native coverage on both platforms.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix: update the logic acording to latest review

* fix: apply inline cr

---------

Co-authored-by: Abdullah1738 <ardudeisepic@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Gregory Moskaliuk <mosckalyuck@gmail.com>
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.

1 participant