From 9480051d8f69c8a0556c3b8f9484db17aacf81f0 Mon Sep 17 00:00:00 2001 From: javiercoronadonarvaez Date: Wed, 24 Jun 2026 08:51:00 -0600 Subject: [PATCH 1/6] feat: add master and develop buttons to Library page --- static/css/v3/branch-buttons.css | 71 ++++++++++++++++++++++ static/css/v3/library-page.css | 17 ++++++ templates/includes/icon.html | 2 + templates/v3/includes/_branch_buttons.html | 31 ++++++++++ templates/v3/library_page.html | 6 +- 5 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 static/css/v3/branch-buttons.css create mode 100644 templates/v3/includes/_branch_buttons.html diff --git a/static/css/v3/branch-buttons.css b/static/css/v3/branch-buttons.css new file mode 100644 index 000000000..abf47e163 --- /dev/null +++ b/static/css/v3/branch-buttons.css @@ -0,0 +1,71 @@ +/* + Branch Buttons + Small, unobtrusive Master ("M") / Develop ("D") branch links. + Bordered icon square with an amber corner badge. Matches Figma node 7696:45822. + Depends on: foundations.css, semantics.css, spacing.css, border-radius.css +*/ + +.branch-buttons { + display: flex; + align-items: center; + gap: var(--space-s); +} + +.branch-button { + position: relative; + display: inline-block; + flex-shrink: 0; + width: 29px; + height: 28px; + color: var(--color-text-primary); + text-decoration: none; +} + +.branch-button__square { + position: absolute; + top: 4px; + left: 5px; + display: flex; + align-items: center; + justify-content: center; + width: 24px; + height: 24px; + background-color: var(--color-surface-weak); + border: 1px solid var(--color-stroke-weak); + border-radius: var(--border-radius-s); + transition: border-color 0.15s ease; +} + +.branch-button__icon { + width: 16px; + height: 16px; + color: var(--color-text-primary); +} + +.branch-button__badge { + position: absolute; + top: 0; + left: 0; + display: flex; + align-items: center; + justify-content: center; + min-width: 12px; + padding: 2px; + border-radius: 60px; + background-color: var(--color-button-accent); + color: var(--color-text-on-accent); + font-size: 8px; + line-height: 1; + letter-spacing: -0.08px; + text-align: center; +} + +.branch-button:hover .branch-button__square { + border-color: var(--color-stroke-brand-accent); +} + +.branch-button:focus-visible { + outline: 2px solid var(--color-stroke-brand-accent); + outline-offset: 2px; + border-radius: var(--border-radius-s); +} diff --git a/static/css/v3/library-page.css b/static/css/v3/library-page.css index c1f8b41e0..8abc60cb3 100644 --- a/static/css/v3/library-page.css +++ b/static/css/v3/library-page.css @@ -18,6 +18,23 @@ padding: 0 var(--space-large); } +/* Filter toolbar row: filters fill the row, branch buttons sit at the far right, + bottom-aligned with the filter dropdowns. */ +.library-page__filter-row { + display: flex; + align-items: flex-end; + gap: var(--space-medium); +} + +.library-page__filter-row .library-filter { + flex: 1 1 auto; + min-width: 0; +} + +.library-page__filter-row .branch-buttons { + flex: 0 0 auto; +} + /* === Hero === */ .library-page-hero { diff --git a/templates/includes/icon.html b/templates/includes/icon.html index cb5357ea2..463cbb41a 100644 --- a/templates/includes/icon.html +++ b/templates/includes/icon.html @@ -139,6 +139,8 @@ {% elif icon_name == "pixel-share" %} + {% elif icon_name == "git-branch" %} + {% elif icon_name == "file-multiple" %} {% elif icon_name == "rss" %} diff --git a/templates/v3/includes/_branch_buttons.html b/templates/v3/includes/_branch_buttons.html new file mode 100644 index 000000000..2c6691f6b --- /dev/null +++ b/templates/v3/includes/_branch_buttons.html @@ -0,0 +1,31 @@ +{% comment %} + V3 Branch Buttons — two small, unobtrusive links to the Master and Develop + branch resources, per Rob's approved design (Figma node 7696:45822). + + Each button is a bordered icon square with a small amber corner badge showing + a single letter ("M" / "D"). The full words "Master" / "Develop" are exposed + via title + aria-label for accessibility (the AC requires those exact words). + + Styles: static/css/v3/branch-buttons.css (link it in the page's extra_head). + + Variables: + master_url (required) — href for the Master branch resource. + develop_url (required) — href for the Develop branch resource. + + Usage: + {% include "v3/includes/_branch_buttons.html" with master_url=master_url develop_url=develop_url %} +{% endcomment %} + diff --git a/templates/v3/library_page.html b/templates/v3/library_page.html index 6ebba3c53..338fa4fd1 100644 --- a/templates/v3/library_page.html +++ b/templates/v3/library_page.html @@ -14,6 +14,7 @@ {% block extra_head %} {{ block.super }} +