Skip to content

Conversation

@GreyElaina
Copy link

Major update to the Vue package bringing it to feature parity with React/Solid.

Highlights

New Features

  • Vue Devtools integration - Full inspector, timeline, and element highlighting
  • Portal component - Render children outside the component hierarchy
  • render() now accepts existing CliRenderer - Aligns with Solid's API pattern
  • New composables - useTimeline, usePaste, useSelectionHandler

Testing

  • 96 test cases (up from ~0)
  • Coverage for: layout, events, control-flow, portal, devtools, text-nodes, diff, textarea, line-number, link

Examples

  • Added: Animation, Code, Diff, LineNumber, Textarea demos

Fixes

  • Remove unused onKeyPress prop from TextareaProps (no implementation existed)
  • Add test script to package.json
  • Fix README: render(App) not render(createApp(App))

Stats

  • +6,286 lines across 47 files
  • 5 commits

@GreyElaina GreyElaina requested a review from kommander as a code owner January 7, 2026 02:44
Copilot AI review requested due to automatic review settings January 7, 2026 02:44
@GreyElaina GreyElaina requested review from Hona and msmps as code owners January 7, 2026 02:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This is a comprehensive update to the Vue package bringing it to feature parity with React/Solid implementations. The PR adds Vue Devtools integration, Portal component, new composables, extensive test coverage (96 test cases), and multiple example demos. Key improvements include support for TextareaRenderable, CodeRenderable, DiffRenderable, LineNumberRenderable, and text node rendering.

Key Changes

  • Added Vue Devtools integration with inspector, timeline, and element highlighting
  • Introduced Portal component for rendering children outside component hierarchy
  • Added new composables: useTimeline, usePaste, useSelectionHandler
  • Extended test coverage from ~0 to 96 test cases
  • Added support for new renderables and text modifier components

Reviewed changes

Copilot reviewed 43 out of 44 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/vue/types/opentui.d.ts Added type definitions for new components and improved type system
packages/vue/tsconfig.*.json Added bun-types support and typecheck configuration
packages/vue/tests/*.test.ts Added comprehensive test suite covering layout, events, control-flow, portal, devtools, text-nodes, diff, textarea, line-number, and link
packages/vue/src/test-utils.ts New test utilities for rendering components in tests
packages/vue/src/renderer.ts Enhanced renderer with support for new components and text nodes
packages/vue/src/nodes.ts Added TextNodeRenderable support and CommentNode
packages/vue/src/noOps.ts Improved text node handling with ghost nodes and cleanup
packages/vue/src/elements.ts Added new renderable components (Code, Diff, LineNumber, Textarea, text modifiers)
packages/vue/src/devtools/*.ts New devtools integration files
packages/vue/src/composables/*.ts Enhanced and new composables
packages/vue/src/components/Portal.ts New Portal component implementation
packages/vue/index.ts Major refactor with devtools setup and component installation
packages/vue/example/*.vue New and updated example components
packages/vue/package.json Updated dependencies and added test/typecheck scripts
packages/vue/README.md Fixed render API usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (value === null || value === undefined) return value
if (typeof value === "function") return "(function)"
if (typeof value === "symbol") return value.toString()
if (typeof value === "object" && value !== null) {
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable 'value' is of type date, object or regular expression, but it is compared to an expression of type null.

Copilot uses AI. Check for mistakes.
…mples

Devtools:
- Add Vue DevTools integration with custom inspector for renderables
- Add highlight overlay, timeline tracking, and element picker
- Support auto-refresh, visibility toggle, and element focusing

Components & Composables:
- Add Portal component for rendering outside parent hierarchy
- Add usePaste, useSelectionHandler, useTimeline composables
- Update useCliRenderer and useKeyboard

Renderer:
- Improve createElement, patchProp for better Vue 3 compatibility
- Add support for onKeyDown, onContentChange, onCursorChange events
- Handle TextNode rendering with nodeRenderable

Tests:
- Add comprehensive test suite (control-flow, events, layout, portal, text-nodes)
- Add test-utils.ts for testing infrastructure

Examples:
- Add Animation, Code, Diff, LineNumber, Textarea examples
- Update existing examples for new patterns
…ayouts in Vue

- Implement tests for unified and split diff rendering in `diff.test.ts`
- Add tests for line number rendering and conditional removal in `line-number.test.ts`
- Create comprehensive tests for textarea rendering, including basic, prompt-like, and complex layouts in `textarea.test.ts`
@kommander
Copy link
Collaborator

Appreciate the effort, but moving forward the opentui repo will only support react/solid as official packages, Go and Vue were removed. I'll happily support external language/framework bindings though with whatever the core needs to do to support these properly (within means of possibility).

@kommander kommander closed this Jan 8, 2026
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