-
Notifications
You must be signed in to change notification settings - Fork 295
chore: remove unmaintained vue and go packages #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Sebastian Herrlinger <[email protected]>
Co-authored-by: Sebastian Herrlinger <[email protected]>
…st” error (#200) Resolves #199 ## The Bug When inserting a React element in the middle of a list inside a `<scrollbox>`, the application crashes with: ``` Error: Anchor does not exist at insertBefore (packages/core/src/Renderable.ts:1118:17) at insertBefore (packages/react/src/reconciler/host-config.ts:65:12) ``` ## Root Cause ScrollBox has an internal wrapper structure where user content is added to a nested child (`this.content`), not directly to the ScrollBox instance. The component hierarchy looks like: ``` ScrollBox ├── wrapper (scroll-box-wrapper) │ └── viewport │ └── content ← User children go here └── scrollbar (scroll-box-vertical-scrollbar) ``` ScrollBox correctly overrides `add()` and `remove()` to delegate to `this.content`: - `add(obj, index)` → `this.content.add(obj, index)` ✓ - `remove(id)` → `this.content.remove(id)` ✓ **However, ScrollBox was missing an override for `insertBefore()`.** When React inserts an element in the middle of a list (e.g., when a conditional element appears after initial render), it calls: ```typescript parent.insertBefore(newChild, anchorChild) ``` Without the override, this uses the base `Renderable.insertBefore()` which: 1. Looks for `anchorChild` in the parent's direct children via `renderableMapById` 2. Fails because `anchorChild` is actually in `this.content` (the wrapper), not in ScrollBox's direct children ## The Fix Added `insertBefore()` override in ScrollBox to delegate to `this.content`, matching the pattern used for `add()` and `remove()`: ## Impact Analysis ### Affected Components - ✅ **ScrollBox** - Fixed by adding `insertBefore()` override - ✅ **TextRenderable** - Already had proper `insertBefore()` delegation ### Affected Renderers - ❌ **React** - Was affected (uses `insertBefore()` directly) - ✅ **Solid** - Not affected (uses `add(node, anchorIndex)` pattern) - ✅ **Vue** - Not affected (uses `add(node, anchorIndex)` pattern)
…ngs after them (#201) Resolves #197 ## Issue Conditional React elements with sibling elements after them were not rendering. For example: ```tsx {foo ? <box>content</box> : null} <box>sibling after conditional</box> // This caused the bug ``` ## Root Cause `insertBefore()` had `else if (renderable.parent)` that only handled children transferring from different parents. New children (where `renderable.parent` is null) had **no initialization code at all** - they weren't added to either tracking array or registered in the parent's map. Children need to be in both: - `_childrenInLayoutOrder` (for layout) - `_childrenInZIndexOrder` (for rendering) New children were missing both, making them invisible and inaccessible. ## Fix Changed `else if (renderable.parent)` to `else` to handle both transferred children AND new children. Added missing `_childrenInZIndexOrder.push(renderable)` to ensure children are properly tracked for rendering. ## Test Added test verifying `insertBefore()` makes new children accessible via `getRenderable()`. Co-authored-by: Claude <[email protected]>
Added an ErrorBoundary component that displays the error stack trace instead of a black screen <img width="1146" height="488" alt="Screenshot 2025-10-06 at 13 33 17" src="https://github.com/user-attachments/assets/648acae3-fca3-4677-bd93-9519465b3f75" />
This PR adds scroll acceleration, enabled by default for macOS Without acceleration, notice that all scrolls are the about the same speed https://github.com/user-attachments/assets/7913e603-ba37-416c-bb22-02ae629c2648 With acceleration, notice some scolls are faster, in those cases I moved the mouse wheel faster https://github.com/user-attachments/assets/bb7f2b86-17fa-473d-bded-1d0cdee803c2
Some terminals send 2 or more ticks for each mouse wheel tick, for example Ghostty, with a small delay between each tick, about 4ms on average. We ignore these ticks otherwise they would cause faster acceleration to kick in ghostty-org/ghostty#7577 --------- Co-authored-by: Sebastian <[email protected]>
`flushSync` was renamed to `flushSyncFromReconciler` in react-reconciler 0.32.0. This fix uses nullish coalescing to check for the new name first, falling back to the old name for backwards compatibility. Ref: facebook/react#35424 --------- Co-authored-by: Matt Simpson <[email protected]>
This reverts commit db3dcda.
u16 fields silently overflow in release builds when processing lines exceeding 65535 bytes. Add regression. Fix #463
+ fix double allocation for wrap breaks
--------- Co-authored-by: Sebastian Herrlinger <[email protected]>
--------- Co-authored-by: Sebastian <[email protected]>
51c57f2 to
8035887
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes unmaintained
@opentui/vueand@opentui/gopackages from monorepo.A large part of OpenTUI project is implemented in TypeScript, which means language bindings need to reimplement a lot of API. This is why Go bindings fell behind and became unmaintained.
Given that both Go and Vue are now unmaintained fragments in monorepo, this change removes them to keep only what is officially supported: React, Solid and Core on top of Bun/TypeScript bindings.
Language bindings can then live in their own separate repositories, so they're also not a bottleneck for merges etc.
Changes:
packages/vue/directorypackages/go/directoryinstall.sh(was only used for Go/native bindings)