From 7e12fdb065e80644bbedeaa357e256c5ef10ea02 Mon Sep 17 00:00:00 2001 From: Francis Secada Date: Tue, 18 Aug 2026 21:43:19 -0400 Subject: [PATCH 1/2] =?UTF-8?q?spike(button):=20resolve=20#72=20=E2=80=94?= =?UTF-8?q?=20attrs=20passthrough=20shape,=20land=20on=20Button=20(#71)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settles the design questions from #72's spike: attrs: dict[str, str] rendering as literal key="value" pairs, escaped for free by the autoescape/auto-escaping every Button template already carries, no naming collision, Button-only per the issue's own recommendation. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Ur2c6d3peuerUGgRdJ6Fvs --- docs/primitives.md | 30 ++++++ .../cotton/_themes/bootstrap/button.html | 2 +- .../cotton/_themes/bulma/button.html | 2 +- .../cotton/_themes/daisy/button.html | 2 +- .../cotton/_themes/fomantic/button.html | 2 +- .../cotton/_themes/foundation/button.html | 2 +- src/cf_ui/templates/cotton/cf/button.html | 1 + .../templates/jinja/bootstrap/Button.jinja | 5 +- src/cf_ui/templates/jinja/bulma/Button.jinja | 5 +- src/cf_ui/templates/jinja/daisy/Button.jinja | 5 +- .../templates/jinja/fomantic/Button.jinja | 5 +- .../templates/jinja/foundation/Button.jinja | 5 +- tests/unit/cotton/test_attrs_passthrough.py | 68 ++++++++++++++ tests/unit/jinja/test_attrs_passthrough.py | 92 +++++++++++++++++++ 14 files changed, 211 insertions(+), 15 deletions(-) create mode 100644 tests/unit/cotton/test_attrs_passthrough.py create mode 100644 tests/unit/jinja/test_attrs_passthrough.py diff --git a/docs/primitives.md b/docs/primitives.md index 3a749c0..ebaa331 100644 --- a/docs/primitives.md +++ b/docs/primitives.md @@ -209,8 +209,38 @@ is built. | `type` | `"button"` | `button` `submit` `reset`. Only applies to the `