From 6c200d7c971732be98a0ee072971dd0460f77775 Mon Sep 17 00:00:00 2001 From: timmy Date: Sun, 16 Aug 2026 12:02:02 +0000 Subject: [PATCH] feat: add mobile issue detail navigation (Closes #961) --- frontend/dashboard.css | 19 +++ frontend/dashboard.js | 14 ++ frontend/index.html | 10 +- frontend/mobile-issue-detail-nav.js | 70 +++++++++ frontend/service-worker.js | 1 + src/frontend_bundle.py | 2 +- tests/test_mobile_issue_detail_navigation.py | 146 +++++++++++++++++++ tests/test_service_worker.py | 1 + 8 files changed, 261 insertions(+), 2 deletions(-) create mode 100644 frontend/mobile-issue-detail-nav.js create mode 100644 tests/test_mobile_issue_detail_navigation.py diff --git a/frontend/dashboard.css b/frontend/dashboard.css index 99499e2..c727ddb 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -469,6 +469,25 @@ textarea { resize: vertical; min-height: 120px; } .issue-sheet-panel { width:min(560px,100%); height:100%; overflow:auto; padding:18px; background:#0b1526; border-left:1px solid #2a496e; } .issue-sheet-header { display:flex; align-items:center; justify-content:space-between; gap:10px; } .issue-sheet-header button { min-height:44px; } +.mobile-issue-detail-nav { display:none; } +@media (max-width:600px) { + .issue-sheet-panel { padding-top:max(12px,env(safe-area-inset-top)); } + .mobile-issue-detail-nav { + position:sticky; top:env(safe-area-inset-top); z-index:6; + display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; + margin:8px -6px 12px; padding:6px; + background:rgba(11,21,38,.98); border-block:1px solid #2a496e; + } + .mobile-issue-detail-nav button { + min-width:0; min-height:44px; padding:4px; overflow-wrap:anywhere; + border-color:transparent; font-size:12px; + } + .mobile-issue-detail-nav button[aria-current="location"] { + border-color:#60a5fa; background:#17365a; color:#fff; + } + #issue-overview, #issue-conversation, #issue-comment, #issue-planning { scroll-margin-top:72px; } +} +@media (min-width:601px) { .mobile-issue-detail-nav { display:none; } } .completed-filed-actions { position:fixed; right:0; bottom:0; z-index:57; box-sizing:border-box; width:min(560px,100%); display:grid; grid-template-columns:minmax(0,1fr); align-items:center; gap:8px; margin:0; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); border:1px solid #4ade80; border-radius:12px 0 0; background:rgba(11,21,38,.98); overflow-wrap:anywhere; } .completed-filed-actions[hidden] { display:none; } .completed-filed-actions button { min-height:44px; min-width:0; } diff --git a/frontend/dashboard.js b/frontend/dashboard.js index 01abcdc..54f72a3 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -15,6 +15,20 @@ ], }); mobileComposerViewport.start(); + const issueDetailPanel = qs('#issue-sheet .issue-sheet-panel'); + const mobileIssueDetailNavigation = createMobileIssueDetailNavigation({ + root:issueDetailPanel, + buttons:Object.fromEntries(Array.from(document.querySelectorAll('[data-issue-section]')).map(button => [button.dataset.issueSection, button])), + targets:{ + overview:qs('#issue-overview'), + conversation:qs('#issue-conversation'), + reply:qs('#issue-comment'), + actions:qs('#issue-planning'), + }, + planning:qs('#issue-planning'), + prefersReducedMotion:() => window.matchMedia('(prefers-reduced-motion: reduce)').matches, + }); + mobileIssueDetailNavigation.start(); [ [qs('.app-menu'), qs('#app-menu-toggle')], [qs('.work-settings'), qs('#work-settings-toggle')], diff --git a/frontend/index.html b/frontend/index.html index 01be0f8..bc4461b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -634,6 +634,12 @@ +
Choose an issue.
-
+