Skip to content

joryirving/windowstead #90: keep side-dock tiles square instead of vertically stretched - #97

Merged
joryirving merged 1 commit into
mainfrom
fix/issue-90-side-dock-tiles-stretched
Apr 24, 2026
Merged

joryirving/windowstead #90: keep side-dock tiles square instead of vertically stretched#97
joryirving merged 1 commit into
mainfrom
fix/issue-90-side-dock-tiles-stretched

Conversation

@itsmiso-ai

Copy link
Copy Markdown
Contributor

Fixes #90. The only sets a floor — the parent has padding (), so the GridContainer expands beyond its minimum and Godot's GridContainer stretches tiles to fill available space. Setting explicitly locks the grid to exact dimensions, keeping tiles square.

@smurf-bot

smurf-bot Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Automated recommendation: APPROVE

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

Review: Fix side-dock tiles vertically stretched (PR #97)

Summary

Single-line fix in scripts/main.gd that adds explicit size assignment to world_grid alongside the existing custom_minimum_size.

Change Analysis

world_grid.custom_minimum_size = Vector2(world_size.x, world_size.y)
world_grid.size = Vector2(world_size.x, world_size.y)  // NEW LINE

The PR body correctly diagnoses the Godot GridContainer behavior:

  • custom_minimum_size only establishes a floor, not an exact size
  • When a parent Panel/Container has padding, the GridContainer expands beyond its minimum
  • Without explicit size, GridContainer stretches cells to fill available space
  • Explicitly setting size locks the grid to exact pixel dimensions, preserving square tile geometry

This matches the root cause described in issue #90 and the implementation aligns with the fix rationale.

Standards Compliance

Tile-first dock sizing (AGENTS.md): The fix maintains square tile geometry by deriving exact grid dimensions from tile calculations, not sizing the dock first.

Minimal, focused change: Single file, single logical change addressing one specific bug.

Repository conventions: Pattern of world_grid.custom_minimum_size = ... and world_grid.size = ... is consistent with other layout control in this codebase.

⚠️ Validation: No headless test coverage for this specific visual behavior. CONTRIBUTING.md recommends launching the editor and verifying the game runs when touching rendering or UI.

Linked Issue Fit

Acceptance Criterion Status
tiles in right-side dock render square, not vertically stretched ✅ Addressed by explicit size lock
tile sizing is verified in a real built/run artifact ⚠️ Not confirmed in PR
no regression to bottom-anchor tile sizing size applied in same function for all anchors

Unknowns / Needs Verification

  • Built artifact testing: Issue bug: side-dock tiles render taller than they are wide in real build #90 explicitly notes "This is based on direct play/open testing of the downloaded build." The PR does not include evidence that the fix was verified in an actual exported build. The commit 89124a5 is the first/only commit on this branch, so there may not have been runtime verification yet.

Recommendation

Approve with note: The diagnosis is sound and the fix targets the correct mechanism (Godot GridContainer sizing behavior). However, consider verifying in a built/exported artifact before close, per the issue's explicit requirement that the fix hold "in the actual shipped/downloaded build."

@joryirving
joryirving merged commit 05da4b3 into main Apr 24, 2026
4 checks passed
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.

bug: side-dock tiles render taller than they are wide in real build

2 participants