From 26ebfcab097e11d9d3963c177f1fc14a43a5bade Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 6 Jan 2026 19:46:19 -0600 Subject: [PATCH] fix: ensure grid action icon+label do not wrap --- src/wuttaweb/grids/base.py | 3 ++- tests/grids/test_base.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wuttaweb/grids/base.py b/src/wuttaweb/grids/base.py index 313dd67..82965ef 100644 --- a/src/wuttaweb/grids/base.py +++ b/src/wuttaweb/grids/base.py @@ -2604,9 +2604,10 @@ class GridAction: # pylint: disable=too-many-instance-attributes """ html = [ self.render_icon(), + HTML.literal(" "), self.render_label(), ] - return HTML.literal(" ").join(html) + return HTML.tag("span", c=html, style="white-space: nowrap;") def render_icon(self): """ diff --git a/tests/grids/test_base.py b/tests/grids/test_base.py index 4d9872d..b8334a6 100644 --- a/tests/grids/test_base.py +++ b/tests/grids/test_base.py @@ -2051,7 +2051,9 @@ class TestGridAction(TestCase): action, render_icon=lambda: "ICON", render_label=lambda: "LABEL" ): html = action.render_icon_and_label() - self.assertEqual("ICON LABEL", html) + self.assertTrue(html.startswith("