From d121b8a4e5e726324fb8b447c39df2741a7b0784 Mon Sep 17 00:00:00 2001 From: Seun Akanni Date: Mon, 8 Jun 2026 15:49:53 +0100 Subject: [PATCH] fix(wall): drop GRID_COLS 12 -> 6 to fit narrow viewports The GRID_COLS reduction was supposed to ship in PR #3 but my amend was pushed after PR #3 had already been merged - so the merged commit only contained the colgroup fix, not the column-count reduction. Live org page still showed 12 columns and a horizontal scrollbar. Total table width: 6 x 55 = 330px (down from 12 x 55 = 660px). Fits viewports down to ~360px (most narrow mobile widths). Wall is now 26 rows tall for 151 contributors. Row count was previously confirmed acceptable. Tests: - Padding cells expected: 4 (was 10) for 2-cell first row - Two-rows test uses 8 items (was 14) since 12 cols fit more per row - colgroup test expects 6 entries (was 12) - 36/36 passing --- profile/README.md | 32 ++++++++++++++++++++++++------ scripts/generate_wall_of_honour.py | 2 +- scripts/tests/test_generate.py | 12 +++++------ 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/profile/README.md b/profile/README.md index 50a0a55..ae80610 100644 --- a/profile/README.md +++ b/profile/README.md @@ -36,12 +36,6 @@ Contributors who have supported and advanced the BHoM. - - - - - - @@ -62,6 +56,8 @@ Contributors who have supported and advanced the BHoM.
Al Fisher
+ +
Alaa Alfaka…
@@ -100,6 +96,8 @@ Contributors who have supported and advanced the BHoM.
Arne Marten…
+ +
Arvid Sigur…
@@ -138,6 +136,8 @@ Contributors who have supported and advanced the BHoM.
Daniel Jons…
+ +
DarienC
@@ -176,6 +176,8 @@ Contributors who have supported and advanced the BHoM.
Ellie Adebo…
+ +
Emil Svedjer
@@ -214,6 +216,8 @@ Contributors who have supported and advanced the BHoM.
Geir Soderin
+ +
Gideon Tamir
@@ -252,6 +256,8 @@ Contributors who have supported and advanced the BHoM.
Johanna Isa…
+ +
Johanna Olin
@@ -290,6 +296,8 @@ Contributors who have supported and advanced the BHoM.
Karolina Pr…
+ +
Kartheek My…
@@ -328,6 +336,8 @@ Contributors who have supported and advanced the BHoM.
Luis E. Fra…
+ +
Madelene Sa…
@@ -366,6 +376,8 @@ Contributors who have supported and advanced the BHoM.
Matilda Sve…
+ +
Matteo Comi…
@@ -404,6 +416,8 @@ Contributors who have supported and advanced the BHoM.
Nathan Brown
+ +
Nazeefa Bus…
@@ -442,6 +456,8 @@ Contributors who have supported and advanced the BHoM.
Peter Nugent
+ +
PiotrBuda
@@ -480,6 +496,8 @@ Contributors who have supported and advanced the BHoM.
Sam Vazquez
+ +
Samuel Basi…
@@ -518,6 +536,8 @@ Contributors who have supported and advanced the BHoM.
wojciech bu…
+ +
Łukasz Mark…
diff --git a/scripts/generate_wall_of_honour.py b/scripts/generate_wall_of_honour.py index 4c200ae..ad4c3e6 100644 --- a/scripts/generate_wall_of_honour.py +++ b/scripts/generate_wall_of_honour.py @@ -87,7 +87,7 @@ def enrich_display_names( return contributors -GRID_COLS = 12 +GRID_COLS = 6 AVATAR_SIZE = 45 CELL_WIDTH = 55 NAME_MAX_LEN = 12 # truncate longer display names with an ellipsis; full name in title attr diff --git a/scripts/tests/test_generate.py b/scripts/tests/test_generate.py index b623740..9c65784 100644 --- a/scripts/tests/test_generate.py +++ b/scripts/tests/test_generate.py @@ -233,7 +233,7 @@ def test_render_wall_single_row(): # Centered wrapper assert "
" in md # Empty padding cells fill row to GRID_COLS width - assert md.count("") == 10 + assert md.count("") == 4 def test_render_wall_stats_with_repo_count(): @@ -256,12 +256,12 @@ def test_render_wall_pluralization_singular(): def test_render_wall_two_rows_with_remainder(): - contributors = {f"user{i}": {"avatar_url": f"https://x/{i}", "contributions": 1, "name": f"User {i}"} for i in range(14)} + contributors = {f"user{i}": {"avatar_url": f"https://x/{i}", "contributions": 1, "name": f"User {i}"} for i in range(8)} md = render_wall(contributors, "2026-06-08") assert md.count("") == 2 - # 14 populated cells (links present) + 10 empty padding cells in the second row - assert md.count("") == 10 + # 8 populated cells (links present) + 4 empty padding cells in the second row + assert md.count("") == 4 def test_render_wall_truncates_long_names_with_ellipsis(): @@ -299,7 +299,7 @@ def test_render_wall_uses_colgroup_for_uniform_column_widths(): contributors = {"alice": {"avatar_url": "x", "contributions": 1, "name": "Alice"}} md = render_wall(contributors, "2026-06-08") assert "" in md - assert md.count("") == 12 # one per GRID_COLS + assert md.count("") == 6 # one per GRID_COLS def test_render_wall_sort_is_case_insensitive_and_unicode():