Skip to content

windowstead #41: reposition popup panel after dock side change - #60

Merged
itsmiso-ai merged 1 commit into
mainfrom
fix/issue-41-popup-reposition-v2
Apr 18, 2026
Merged

windowstead #41: reposition popup panel after dock side change#60
itsmiso-ai merged 1 commit into
mainfrom
fix/issue-41-popup-reposition-v2

Conversation

@itsmiso-ai

Copy link
Copy Markdown
Contributor

Ref #41. Fix menu disappearing when changing dock side.

Fix: save menu visibility state before apply_dock_position(), restore after resize, reposition popup panel after window resize.

@smurf-bot

smurf-bot Bot commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Automated recommendation: APPROVE

Analysis engine: MiniMax-M2.7@https://api.minimax.io/v1

Summary

Recommendation: Approve - This is a focused fix for issue #41 that correctly restores menu visibility and repositioning after dock side changes.

Change Analysis

The PR modifies _on_dock_side_selected() in scripts/main.gd to restore menu state after apply_dock_position():

  1. Captures menu_was_open state before the dock change (already present in the function)
  2. After dock repositioning completes, restores:
    • sidebar_scroll.visible
    • menu_actions.visible
    • management_panels.visible
  3. Calls position_popup_panel() with the new dock anchor
  4. Updates the menu button text

This directly addresses the reported bug where the menu would disappear when changing the dock side, by explicitly re-establishing all menu UI elements and positioning them according to the new orientation.

Standards Compliance

Repository Patterns:

  • Uses existing function names (position_popup_panel, update_menu_button_text) consistent with the codebase
  • Follows GDScript style: PascalCase for functions, camelCase for local variables (menu_was_open)
  • Commit message format fix: description matches repo convention (seen in d04479c, e02f1af, etc.)

UX Requirements (AGENTS.md):

  • Aligns with "explicit behavior over silent layout morphing" - the fix explicitly restores menu state rather than relying on implicit behavior
  • Preserves popup overlay pattern ("Menus should be temporary popup overlays, not persistent sidebars")

Unknowns / Needs Verification

None - the change is straightforward and uses existing established patterns. The fix is consistent with earlier work in 6db2b3a ("Fix menu disappearing when changing dock side") which introduced the menu_was_open variable, this PR builds on that foundation to also reposition the popup panel.

@itsmiso-ai
itsmiso-ai merged commit 9caa49f into main Apr 18, 2026
2 checks passed
@itsmiso-ai
itsmiso-ai deleted the fix/issue-41-popup-reposition-v2 branch April 18, 2026 13:34
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.

1 participant