Skip to content

Commit b9e1131

Browse files
committed
fix(html): polish mobile responsive layout — sticky tabs, scroll shadows, compact topbar
1 parent 34ae3ab commit b9e1131

6 files changed

Lines changed: 63 additions & 39 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ run-name: benchmark • ${{ github.event_name }} • ${{ github.ref_name }}
33

44
on:
55
push:
6-
branches: [ "feat/2.0.0" ]
6+
branches: [ "**" ]
77
pull_request:
8-
branches: [ "feat/2.0.0" ]
98
workflow_dispatch:
109
inputs:
1110
profile:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
- Fix page-level horizontal scrolling in wide table tabs by constraining overflow to local table wrappers (#14).
1212
- Fix mobile header brand block layout on narrow viewports (#15).
13+
- Make mobile navigation tabs sticky and horizontally scrollable with scroll-shadow affordance.
1314
- Keep Overview KPI micro-badges inside cards at extreme browser/mobile widths.
1415
- Restyle Report Provenance summary badges to match the card-style badge language used across the report.
1516

codeclone/_html_css.py

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,12 @@
288288

289289
_TABLES = """\
290290
.table-wrap{display:block;inline-size:100%;max-inline-size:100%;min-inline-size:0;overflow-x:auto;
291-
overflow-y:hidden;border:1px solid var(--border);border-radius:var(--radius-lg);margin-bottom:var(--sp-4)}
291+
overflow-y:hidden;border:1px solid var(--border);border-radius:var(--radius-lg);margin-bottom:var(--sp-4);
292+
background:
293+
linear-gradient(to right,var(--bg-surface) 30%,transparent) left center / 40px 100% no-repeat local,
294+
linear-gradient(to left,var(--bg-surface) 30%,transparent) right center / 40px 100% no-repeat local,
295+
linear-gradient(to right,rgba(0,0,0,.15),transparent) left center / 14px 100% no-repeat scroll,
296+
linear-gradient(to left,rgba(0,0,0,.15),transparent) right center / 14px 100% no-repeat scroll}
292297
.table{inline-size:max-content;min-inline-size:100%;border-collapse:collapse;font-size:.82rem;
293298
font-family:var(--font-mono)}
294299
.table th{position:sticky;top:0;z-index:2;padding:var(--sp-2) var(--sp-3);text-align:left;font-family:var(--font-sans);
@@ -521,7 +526,7 @@
521526
background:var(--bg-alt)}
522527
523528
/* Badge modal */
524-
.badge-modal{max-width:540px;width:90vw;max-height:85vh}
529+
.badge-modal{max-width:680px;width:92vw;max-height:85vh}
525530
.badge-modal .modal-head{display:flex;align-items:center;justify-content:space-between;
526531
padding:var(--sp-3) var(--sp-4);border-bottom:1px solid var(--border)}
527532
.badge-modal .modal-head h2{font-size:1rem;font-weight:700;margin:0}
@@ -1051,15 +1056,34 @@
10511056
.overview-row-spread{margin-left:0;width:100%}
10521057
.suggestion-head{flex-direction:column;align-items:flex-start}
10531058
.suggestion-facts{grid-template-columns:1fr}
1059+
.sf-head{flex-direction:column;align-items:flex-start}
1060+
.sf-meta{width:100%}
10541061
.container{padding:0 var(--sp-3)}
10551062
.topbar{position:static}
1056-
.topbar-inner{height:auto;padding:var(--sp-3);flex-direction:column;align-items:stretch;gap:var(--sp-2)}
1057-
.brand{align-items:flex-start}
1058-
.brand h1{font-size:1rem}
1059-
.brand-meta{font-size:.72rem;line-height:1.4}
1060-
.topbar-actions{width:100%;justify-content:flex-start}
1061-
.main-tabs-wrap{top:0}
1062-
.main-tabs{padding:0 var(--sp-3)}
1063+
.topbar-inner{height:auto;padding:var(--sp-2) var(--sp-3);flex-direction:row;
1064+
align-items:center;gap:var(--sp-2)}
1065+
.brand{flex:1;min-width:0;align-items:center;gap:var(--sp-2)}
1066+
.brand-logo{width:24px;height:24px}
1067+
.brand-text{gap:0}
1068+
.brand h1{font-size:.85rem;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1069+
.brand-project-name{font-size:.78em;padding:0 3px}
1070+
.brand-meta{display:none}
1071+
.topbar-actions{flex-shrink:0;gap:var(--sp-1)}
1072+
.topbar-actions .btn-prov{font-size:0;gap:0;width:32px;height:32px;
1073+
padding:0;align-items:center;justify-content:center}
1074+
.topbar-actions .btn-prov .prov-dot{width:10px;height:10px}
1075+
.theme-toggle{font-size:0;gap:0;width:32px;height:32px;
1076+
padding:0;align-items:center;justify-content:center}
1077+
.theme-toggle svg{width:16px;height:16px}
1078+
.main-tabs-wrap{position:sticky;top:0;z-index:90;padding:var(--sp-2) 0 0}
1079+
.main-tabs{padding:var(--sp-1);gap:2px;
1080+
background:
1081+
linear-gradient(to right,var(--bg-surface) 30%,transparent) left center / 28px 100% no-repeat local,
1082+
linear-gradient(to left,var(--bg-surface) 30%,transparent) right center / 28px 100% no-repeat local,
1083+
linear-gradient(to right,rgba(0,0,0,.12),transparent) left center / 10px 100% no-repeat scroll,
1084+
linear-gradient(to left,rgba(0,0,0,.12),transparent) right center / 10px 100% no-repeat scroll,
1085+
var(--bg-surface)}
1086+
.main-tab{flex:none;padding:var(--sp-1) var(--sp-2);font-size:.78rem}
10631087
}
10641088
@media(max-width:480px){
10651089
.overview-kpi-grid{grid-template-columns:1fr}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ dev = [
6767
"build>=1.4.1",
6868
"twine>=5.0.0",
6969
"mypy>=1.19.1",
70-
"ruff>=0.15.7",
70+
"ruff>=0.15.8",
7171
"pre-commit>=4.5.1",
7272
]
7373

tests/test_html_report.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,10 @@ def test_html_report_mobile_topbar_reflows_brand_block() -> None:
752752
html,
753753
"@media(max-width:768px){",
754754
".topbar{position:static}",
755-
".topbar-inner{height:auto;padding:var(--sp-3);flex-direction:column;align-items:stretch;gap:var(--sp-2)}",
756-
".brand h1{font-size:1rem}",
757-
".topbar-actions{width:100%;justify-content:flex-start}",
758-
".main-tabs-wrap{top:0}",
755+
".topbar-inner{height:auto;",
756+
".brand-meta{display:none}",
757+
".main-tabs-wrap{position:sticky;top:0;",
758+
".main-tab{flex:none;",
759759
)
760760

761761

uv.lock

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)