Skip to content

Commit 741ef62

Browse files
committed
feat(mobile): WCAG-aligned tap targets on cohort selects + tighter modal/header padding on phone
1 parent 4b4fb5b commit 741ef62

5 files changed

Lines changed: 58 additions & 0 deletions

File tree

src/dashboard/src/components/chat/ChatPanel.module.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@
6767
outline: 2px solid var(--amber);
6868
outline-offset: 1px;
6969
}
70+
71+
// Phone: bump tap target to clear the WCAG 2.5.5 44px guideline and
72+
// raise font size so iOS doesn't auto-zoom the page on focus.
73+
@media (max-width: 480px) {
74+
padding: 10px 8px;
75+
font-size: var(--font-md);
76+
}
7077
}
7178

7279
.agentBtn {

src/dashboard/src/components/layout/VerdictModal.module.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@
5959
.cohortDetails {
6060
padding: 12px 4px 8px;
6161
color: var(--text-1);
62+
63+
// Phone: pull the padding flush with the dialog edge so 360px
64+
// viewports get more rendering room for the headline + summary.
65+
@media (max-width: 480px) {
66+
padding: 8px 0 6px;
67+
}
6268
}
6369

6470
.cohortHeader {
@@ -122,6 +128,15 @@
122128
border: 1px solid color-mix(in srgb, var(--actor-color, var(--amber)) 28%, transparent);
123129
border-left: 3px solid var(--actor-color, var(--amber));
124130
border-radius: 8px;
131+
132+
// Phone: tighten the badge column so the rationale text gets more
133+
// horizontal room. The rank badge is short enough (#1 to #99) to
134+
// still center-read at 40px while leaving meaningful body width.
135+
@media (max-width: 480px) {
136+
grid-template-columns: 40px 1fr;
137+
gap: 10px;
138+
padding: 10px 12px;
139+
}
125140
}
126141

127142
.cohortRankBadge {

src/dashboard/src/components/reports/ReportView.module.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,17 @@
242242
border: 1px solid var(--border);
243243
border-radius: 4px;
244244
min-width: 160px;
245+
246+
// Phone: 160px min-width forces the two selects + "vs" to wrap onto
247+
// 3 rows on a 360px viewport. Dropping the floor + flex-grow lets
248+
// them share the row width and clears the WCAG 2.5.5 44px tap
249+
// target via the larger padding.
250+
@media (max-width: 480px) {
251+
min-width: 0;
252+
flex: 1 1 0;
253+
padding: 10px 8px;
254+
font-size: var(--font-md);
255+
}
245256
}
246257

247258
.actorPairPickerVs {

src/dashboard/src/components/viz/CohortSwarmGrid.module.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@
8787
background: var(--bg-panel);
8888
border-bottom: 1px solid var(--actor-color, var(--border));
8989
flex-shrink: 0;
90+
91+
// Phone: shrink the header padding + gap so the slot label + name +
92+
// pop chip stay on one line at narrow widths. Archetype already
93+
// truncates with text-overflow: ellipsis so it shrinks naturally.
94+
@media (max-width: 480px) {
95+
padding: 8px 10px;
96+
gap: 6px;
97+
}
9098
}
9199

92100
.columnHeaderSlot {

src/dashboard/src/components/viz/SwarmViz.module.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,13 @@
405405
& + & {
406406
border-left: 1px solid var(--border);
407407
}
408+
409+
// Phone: bump tap target to the WCAG 2.5.5 "Target Size" recommended
410+
// 44×44px minimum so thumb taps don't miss between adjacent pills.
411+
@media (max-width: 480px) {
412+
padding: 10px 14px;
413+
min-height: 44px;
414+
}
408415
}
409416

410417
.cohortViewModeButtonActive {
@@ -448,6 +455,16 @@
448455
outline: 2px solid var(--amber);
449456
outline-offset: 1px;
450457
}
458+
459+
// Phone: drop the 160px floor so two selects + the "vs" separator
460+
// can both fit on a single row inside a 360px viewport, and bump
461+
// the height to clear the WCAG 2.5.5 44px target-size guideline.
462+
@media (max-width: 480px) {
463+
min-width: 0;
464+
flex: 1 1 0;
465+
padding: 10px 8px;
466+
font-size: var(--font-md);
467+
}
451468
}
452469

453470
.cohortPairPickerVs {

0 commit comments

Comments
 (0)