mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1685] Game HUD widgets reflow when one is collapsed or dragged; dragging toggles collapse #838
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#838
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 @aeriondyseti on GitHub (May 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1685
Summary
In Game mode, the HUD widget cards are laid out in a vertical flex stack. Because
they share normal document flow, collapsing or dragging one card reflows all the
others — collapse a widget and everything below it jumps up; drag one and the
stack shifts. This makes the HUD feel unstable during play.
Additionally, dragging a widget by its header also fires the header's click
handler on pointer-up, so repositioning a panel toggles its collapsed state
as an unwanted side effect.
Proposed fix
Render the widget cards as independently positioned floating panels:
FloatingWidgetStackmeasures each card's natural flow position once (viauseLayoutEffect, before paint — no flicker), then pins each card toposition: absoluteat its measured top. From then on a card's height changes(collapse/expand) affect only that card; neighbours don't move.
collapse — so a minimised card leaves its slot open instead of yanking the
others up.
onDragStart,swallowed on the trailing
onClick) so repositioning no longer togglescollapse.
Scope
Single file:
src/features/modes/game/components/GameWidgetPanel.tsx.Typecheck and lint clean.
@cha1latte commented on GitHub (May 31, 2026):
Triage note: labeling this as
fixed-in-stagingbecause PR #1686 merged intorefactorwithCloses #1685and implements the described floating HUD widget stack/drag-click fix.Leaving the issue open for now so it can close with the normal staging/main flow rather than manually closing it from the triage pass.