From 955450d33f5bdd4e55f4762fda8528939de8f240 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Thu, 8 Oct 2026 06:28:02 -0400 Subject: [PATCH] fix(ui): section tabs above the breadcrumb, so the Ansible tab strip holds still (#5214) The tabs were drawn in each page's content block, which base.html renders after the breadcrumb, so on every nested Ansible page the strip moved down a line. base.html now has a section_tabs block above the breadcrumb, and every Ansible page fills it. A guard in test_breadcrumbs.py fails any page that calls a tabs macro outside that block. Co-Authored-By: Claude Opus 5.5 --- steward/templates/_macros.html | 7 +++-- steward/templates/ansible/index.html | 2 +- .../ansible/inventory/group_detail.html | 2 +- .../templates/ansible/inventory/index.html | 2 +- .../ansible/inventory/target_detail.html | 2 +- steward/templates/ansible/playbook.html | 2 +- .../templates/ansible/playbook_editor.html | 2 +- steward/templates/ansible/playbooks.html | 2 +- steward/templates/ansible/run_detail.html | 2 +- steward/templates/ansible/schedule.html | 2 +- steward/templates/ansible/schedules.html | 2 +- steward/templates/base.html | 2 ++ tests/test_breadcrumbs.py | 29 +++++++++++++++++++ 13 files changed, 45 insertions(+), 13 deletions(-) diff --git a/steward/templates/_macros.html b/steward/templates/_macros.html index 771cc01..1e94cb9 100644 --- a/steward/templates/_macros.html +++ b/steward/templates/_macros.html @@ -73,9 +73,10 @@ {%- endmacro %} -{# A section's own pages as tabs under the crumbs (#5328): items are - (key, label, href); the one whose key is `active` is the current page. - Links, not a tablist: each tab is its own page. #} +{# A section's own pages as tabs (#5328): items are (key, label, href); the + one whose key is `active` is the current page. Links, not a tablist: each + tab is its own page. Call it in base.html's section_tabs block, which sits + above the breadcrumb, so the strip stays put as the trail grows. #} {% macro section_tabs(items, active, label) -%}