From 30753795b7bd9328df0a24e3afb5c589eb71d3db Mon Sep 17 00:00:00 2001 From: Seun Akanni Date: Mon, 8 Jun 2026 15:23:37 +0100 Subject: [PATCH] fix(wall): use colgroup so cells render at uniform width GitHub's table renderer was auto-sizing columns based on content despite , producing visibly uneven cell widths on the org page. Adding an explicit with one per column gives the renderer authoritative column widths that take precedence over content-based sizing. Kept as a fallback in case colgroup is stripped by a future sanitizer change. --- profile/README.md | 14 ++++++++++++++ scripts/generate_wall_of_honour.py | 4 ++++ scripts/tests/test_generate.py | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/profile/README.md b/profile/README.md index 8804a56..50a0a55 100644 --- a/profile/README.md +++ b/profile/README.md @@ -29,6 +29,20 @@ Please let us know how can we improve it! Please raise GitHub Issues in the [Doc Contributors who have supported and advanced the BHoM. + + + + + + + + + + + + + + " for _ in range(GRID_COLS)) + colgroup = " \n" + colgroup_lines + "\n " + return ( "\n\n" "---\n\n" "
\n\n" f"{INTRO_TEXT}\n\n" "

AaronWagner
diff --git a/scripts/generate_wall_of_honour.py b/scripts/generate_wall_of_honour.py index e18a259..4c200ae 100644 --- a/scripts/generate_wall_of_honour.py +++ b/scripts/generate_wall_of_honour.py @@ -138,12 +138,16 @@ def render_wall( else: stats = f"{contributors_part}. Last updated {last_updated}." + colgroup_lines = "\n".join(f"
\n" + + colgroup + "\n" + "\n".join(rows) + "\n
\n\n" f"{stats}\n\n" diff --git a/scripts/tests/test_generate.py b/scripts/tests/test_generate.py index 0059e12..b623740 100644 --- a/scripts/tests/test_generate.py +++ b/scripts/tests/test_generate.py @@ -293,6 +293,15 @@ def test_render_wall_uses_valign_top(): assert "valign=\"top\"" in md +def test_render_wall_uses_colgroup_for_uniform_column_widths(): + # colgroup gives GitHub's table renderer authoritative column widths, + # preventing content-based auto-sizing that produces uneven cell 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 + + def test_render_wall_sort_is_case_insensitive_and_unicode(): contributors = { "zoe": {"avatar_url": "z", "contributions": 1, "name": "Zoe"},