mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1686] [MERGED] refactor(game): float HUD widgets as independent pinned panels #5211
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#5211
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1686
Author: @aeriondyseti
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @cha1latte
Base:
refactor← Head:feat/game-widget-floating-stack📝 Commits (1)
e513febrefactor(game): float HUD widgets as independent pinned panels📊 Changes
1 file changed (+99 additions, -13 deletions)
View changed files
📝
src/features/modes/game/components/GameWidgetPanel.tsx(+99 -13)📄 Description
Linked issue
Closes #1685
Why this change
In Game mode the HUD widget cards share normal document flow in a vertical flex
stack, so collapsing or dragging one card reflows all the others — collapse a
widget and everything below it jumps; drag one and the stack shifts. The HUD
feels unstable during play. Separately, dragging a card 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.
What changed
FloatingWidgetStack, which measures each card's natural flow top oncevia
useLayoutEffect(before paint — no flicker), then pins each card toposition: absoluteat its measured top. Height changes from collapse/expandnow affect only that card; neighbours stay put.
collapse — a minimised card leaves its slot open instead of yanking the others
up to fill it.
onDragStart,swallowed on the trailing
onClick) so repositioning no longer toggles thecollapsed state.
Refactor impact
Primary owner:
game mode (
src/features/modes/game/components/GameWidgetPanel.tsx)Feature/UI-only change, single file. No engine imports from React, no raw Tauri
or remote-runtime calls, no Rust/storage/schema changes.
Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallySummary by CodeRabbit
Bug Fixes
Improvements
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.