feat(examples): add markdown-editor example#627
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds a new example app under examples/markdown-editor with bun-based package.json, TypeScript config, a split two-pane UI (MultilineTextInput editor + live Markdown preview), keyboard exit handling ( ChangesMarkdown Editor Example
Sequence DiagramsequenceDiagram
participant User
participant App as App Instance
participant Editor as MultilineTextInput
participant Preview as Markdown Widget
User->>App: press key
alt exit key (q or Ctrl+C)
App->>App: exit process
else text input
App->>Editor: forward key event
Editor->>Editor: update text content
Editor->>Preview: onChange -> new markdown text
Preview->>Preview: render updated preview
App->>App: request render
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@examples/markdown-editor/package.json`:
- Around line 6-9: The package.json scripts currently reference src/index.ts but
the project entry is src/index.tsx and there's no typecheck script or typescript
devDependency; update the "start" and "dev" script values to point to
"src/index.tsx" (the "start" and "dev" keys in package.json) and add a
"typecheck" script that runs the TypeScript compiler (e.g., tsc --noEmit) so bun
run typecheck succeeds, and add "typescript" to devDependencies so the
typechecker is available during CI/local runs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b1887cff-5091-4127-9c0c-e9e3bb68eb4f
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
examples/markdown-editor/package.jsonexamples/markdown-editor/src/index.tsxexamples/markdown-editor/tsconfig.json
Description
Adds a new markdown-editor example demonstrating a live Markdown editor built with TermUI.
The example uses MultilineTextInput for editing, Markdown for preview rendering, and Columns for a side-by-side layout. The preview updates in real time as the user types.
Related Issue
Closes #526
Which package(s)?
examples/markdown-editor
@termuijs/widgets
@termuijs/ui
Type of Change
type:bug)type:feature)type:docs)type:testing)type:refactor)type:design)type:accessibility)type:performance)type:devops)type:security)Checklist
needs-starcheck blocks your merge otherwise.bun vitest runbun run buildbun run typecheckCONTRIBUTING.md.type: short description.markDirty()(if your change affects rendering).anytypes without an inline comment explaining why.GSSoC 2026 Participation
https://gssoc.girlscript.org/profile/____Screenshots / Recordings (UI changes)
na
Notes for the Reviewer
Added a new markdown editor example under examples/markdown-editor.
Demonstrates live Markdown preview using existing Markdown, MultilineTextInput, and Columns components.
No changes were made to core packages or widget implementations.
Summary by CodeRabbit
New Features
Chores