mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[GH-ISSUE #63] position absolute bottom/right does not work #12
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @niicojs on GitHub (Aug 24, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/63
I'm doing a very simple app with a debug box display on the top right but
right={0}does not work. Left and right are working.Is there some conditions to make this work?
@kommander commented on GitHub (Aug 24, 2025):
Might need an explicit width, because width is
autootherwise?@msmps commented on GitHub (Aug 24, 2025):
i don't think we're handling right/bottom in the
core/for absolute positioned renderablesgithub.com/sst/opentui@c90c6c139b/packages/core/src/Renderable.ts (L645-L650)@kommander commented on GitHub (Aug 24, 2025):
@msmps you are right. That's because of the performance workaround for the yoga-layout engine. It needs manual handling at that point.
Would right/bottom override left/top? Simple fix would be to not use the performance workaround path when right or bottom are set.
@msmps commented on GitHub (Aug 24, 2025):
I think
top/leftshould take priority when present? There are different behaviours on web depending on how the element is positioned.@kommander commented on GitHub (Aug 24, 2025):
Yeah, the correct solution would be to just let yoga handle it. I want to have yoga as bun ffi bindings, either standalone package or exposed in the core binary, that would solve performance.
Also I want to split out the UI pieces like layout into a
UIRenderableas base for all the UI Renderables we currently have and the real base Renderable would only manage x/y and z-index.Reason: some want to use Renderables as image tiles for games for example, then the layout and all UI stuff that comes with it is overkill.
Either way we have to get rid of that performance workaround instead of baking it in and making it more complex.
@niicojs commented on GitHub (Aug 25, 2025):
fixed in 0.1.9 thanks