Skip to content

fix(wall): uniform cell widths + halve column count to kill h-scroll - #3

Merged
sakanni merged 1 commit into
mainfrom
feat/wall-colgroup
Jun 8, 2026
Merged

sakanni merged 1 commit into
mainfrom
feat/wall-colgroup

Conversation

@sakanni

@sakanni sakanni commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two layout issues observed after PR #2 merged to main, fixed in this single PR:

1. Cells were still visibly uneven

GitHub's table renderer was auto-sizing columns based on content despite the per-cell `<td width="55">` attribute. Adding an explicit `` with one `<col width="55"/>` per column gives the renderer authoritative column widths that take precedence over content-based sizing.

2. Horizontal scrollbar was still present

Root cause: column count is the lever, not avatar size. A table can't shrink narrower than `GRID_COLS × CELL_WIDTH`, and 660px (12 cols × 55px) exceeded many viewports - especially mobile and narrow desktops with sidebars open.

Drop `GRID_COLS` 12 → 6, so total table width becomes 6 × 55 = 330px. Fits viewports down to ~360px (most narrow mobile widths).

Trade-off

Wall is now 26 rows tall instead of 13 for 151 contributors. Per design discussion, row count is not constrained - height is fine.

Tests

  • 36/36 passing
  • Padding-cell counts updated for new column count
  • colgroup test added with 6-col expectation
  • After merge, verify org page at github.com/BHoM renders without horizontal scroll and with uniform cell widths

GitHub's table renderer was auto-sizing columns based on content despite
<td width="55">, producing visibly uneven cell widths on the org page.

Adding an explicit <colgroup> with one <col width="55"/> per column gives
the renderer authoritative column widths that take precedence over
content-based sizing.

Kept <td width="55"> as a fallback in case colgroup is stripped by a
future sanitizer change.
@sakanni
sakanni merged commit cdf6bd0 into main Jun 8, 2026
2 checks passed
@sakanni sakanni changed the title fix(wall): uniform cell widths via colgroup fix(wall): uniform cell widths + halve column count to kill h-scroll Jun 8, 2026
sakanni added a commit that referenced this pull request Jun 8, 2026
fix(wall): GRID_COLS 12 -> 6 (the change that missed PR #3)
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