Skip to content

Commit 97661de

Browse files
committed
feat: improve mobile UI/UX with responsive design
- Reduce padding on mobile devices for better space utilization - Convert form rows to single column on mobile - Optimize table display with better scrolling and smaller font sizes - Improve button touch targets (min-height 44px) for better mobile interaction - Stack action buttons vertically on mobile - Add touch-action: manipulation for better touch responsiveness - Improve horizontal scrolling with -webkit-overflow-scrolling: touch - Add custom scrollbar styling for better mobile experience - Optimize navigation drawer item spacing for mobile - Make summary sections stack vertically on mobile
1 parent 68498fc commit 97661de

File tree

6 files changed

+172
-24
lines changed

6 files changed

+172
-24
lines changed

src/client/App.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,20 @@
2323

2424
.app-main {
2525
flex: 1;
26-
padding: var(--space-6);
26+
padding: var(--space-4);
2727
overflow-y: auto;
2828
margin-left: 0;
2929
transition: margin-left var(--transition-normal);
3030
min-height: 100vh;
3131
position: relative;
32+
padding-top: calc(var(--space-4) + 60px);
33+
}
34+
35+
@media (min-width: 640px) {
36+
.app-main {
37+
padding: var(--space-6);
38+
padding-top: calc(var(--space-6) + 60px);
39+
}
3240
}
3341

3442
@media (min-width: 1024px) {

src/client/components/HistoryList.css

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,32 @@
3434
transition: all var(--transition-fast);
3535
}
3636

37+
@media (min-width: 640px) {
38+
.history-item {
39+
padding: var(--space-6);
40+
}
41+
}
42+
3743
.history-item:hover {
3844
border-color: var(--border-strong);
3945
box-shadow: var(--shadow-sm);
4046
}
4147

4248
.history-item-header {
4349
display: flex;
44-
justify-content: space-between;
45-
align-items: flex-start;
50+
flex-direction: column;
4651
gap: var(--space-4);
4752
margin-bottom: var(--space-2);
4853
}
4954

55+
@media (min-width: 640px) {
56+
.history-item-header {
57+
flex-direction: row;
58+
justify-content: space-between;
59+
align-items: flex-start;
60+
}
61+
}
62+
5063
.history-item-main {
5164
flex: 1;
5265
display: flex;
@@ -102,14 +115,23 @@
102115

103116
.history-item-actions {
104117
display: flex;
118+
flex-direction: column;
105119
gap: var(--space-2);
120+
width: 100%;
121+
}
122+
123+
@media (min-width: 640px) {
124+
.history-item-actions {
125+
flex-direction: row;
126+
width: auto;
127+
}
106128
}
107129

108130
.btn-action {
109131
background: transparent;
110132
border: 1px solid var(--border-default);
111133
color: var(--text-primary);
112-
padding: var(--space-2) var(--space-3);
134+
padding: var(--space-3) var(--space-4);
113135
font-family: var(--font-mono);
114136
font-size: 0.75rem;
115137
font-weight: 600;
@@ -118,6 +140,8 @@
118140
border-radius: 4px;
119141
transition: all var(--transition-fast);
120142
text-transform: uppercase;
143+
min-height: 44px;
144+
touch-action: manipulation;
121145
}
122146

123147
.btn-action:hover {
@@ -204,6 +228,25 @@
204228
border: 1px solid var(--border-subtle);
205229
border-radius: 4px;
206230
margin-top: var(--space-4);
231+
-webkit-overflow-scrolling: touch;
232+
scrollbar-width: thin;
233+
}
234+
235+
.history-results-table::-webkit-scrollbar {
236+
height: 8px;
237+
}
238+
239+
.history-results-table::-webkit-scrollbar-track {
240+
background: var(--bg-surface);
241+
}
242+
243+
.history-results-table::-webkit-scrollbar-thumb {
244+
background: var(--border-default);
245+
border-radius: 4px;
246+
}
247+
248+
.history-results-table::-webkit-scrollbar-thumb:hover {
249+
background: var(--border-strong);
207250
}
208251

209252
.history-results-table table {

src/client/components/Navbar.css

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
.navbar {
22
background: var(--bg-elevated);
33
border-bottom: 1px solid var(--border-default);
4-
padding: var(--space-4) var(--space-6);
4+
padding: var(--space-3) var(--space-4);
55
position: sticky;
66
top: 0;
77
z-index: 100;
88
backdrop-filter: blur(10px);
99
box-shadow: var(--shadow-sm);
1010
}
1111

12+
@media (min-width: 640px) {
13+
.navbar {
14+
padding: var(--space-4) var(--space-6);
15+
}
16+
}
17+
1218
.navbar-content {
1319
display: flex;
1420
align-items: center;
@@ -28,8 +34,11 @@
2834
display: flex;
2935
align-items: center;
3036
justify-content: center;
31-
width: 36px;
32-
height: 36px;
37+
width: 44px;
38+
height: 44px;
39+
min-width: 44px;
40+
min-height: 44px;
41+
touch-action: manipulation;
3342
}
3443

3544
.navbar-menu-btn:hover {

src/client/components/NavigationDrawer.css

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
display: flex;
178178
align-items: center;
179179
gap: var(--space-3);
180-
padding: var(--space-3) var(--space-4);
180+
padding: var(--space-4) var(--space-4);
181181
background: transparent;
182182
border: none;
183183
color: var(--text-secondary);
@@ -187,6 +187,8 @@
187187
transition: all var(--transition-fast);
188188
text-align: left;
189189
position: relative;
190+
min-height: 48px;
191+
touch-action: manipulation;
190192
}
191193

192194
.nav-drawer-item::before {
@@ -252,8 +254,8 @@
252254

253255
.nav-drawer-toggle {
254256
position: fixed;
255-
top: var(--space-4);
256-
left: var(--space-4);
257+
top: var(--space-3);
258+
left: var(--space-3);
257259
background: var(--bg-elevated);
258260
border: 1px solid var(--border-subtle);
259261
color: var(--text-primary);
@@ -264,11 +266,14 @@
264266
display: flex;
265267
align-items: center;
266268
justify-content: center;
267-
width: 40px;
268-
height: 40px;
269+
width: 44px;
270+
height: 44px;
271+
min-width: 44px;
272+
min-height: 44px;
269273
z-index: 997;
270274
border-radius: 4px;
271275
box-shadow: var(--shadow-sm);
276+
touch-action: manipulation;
272277
}
273278

274279
@media (min-width: 1024px) {

src/client/components/QueryForm.css

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22
background: var(--bg-elevated);
33
border: 1px solid var(--border-default);
44
border-radius: 4px;
5-
padding: var(--space-6);
5+
padding: var(--space-4);
66
box-shadow: var(--shadow-md);
77
}
88

9+
@media (min-width: 640px) {
10+
.query-form {
11+
padding: var(--space-6);
12+
}
13+
}
14+
915
.query-form-content {
1016
display: flex;
1117
flex-direction: column;
@@ -20,10 +26,16 @@
2026

2127
.query-form-row {
2228
display: grid;
23-
grid-template-columns: 1fr 1fr;
29+
grid-template-columns: 1fr;
2430
gap: var(--space-4);
2531
}
2632

33+
@media (min-width: 640px) {
34+
.query-form-row {
35+
grid-template-columns: 1fr 1fr;
36+
}
37+
}
38+
2739
.query-form-label {
2840
font-family: var(--font-mono);
2941
font-size: 0.75rem;
@@ -107,11 +119,17 @@
107119

108120
.query-form-date-inputs {
109121
display: grid;
110-
grid-template-columns: 1fr 1fr;
122+
grid-template-columns: 1fr;
111123
gap: var(--space-4);
112124
margin-top: var(--space-3);
113125
}
114126

127+
@media (min-width: 640px) {
128+
.query-form-date-inputs {
129+
grid-template-columns: 1fr 1fr;
130+
}
131+
}
132+
115133
.query-form-date-field {
116134
display: flex;
117135
flex-direction: column;
@@ -127,15 +145,22 @@
127145

128146
.query-form-actions {
129147
display: flex;
148+
flex-direction: column;
130149
gap: var(--space-3);
131150
margin-top: var(--space-2);
132151
}
133152

153+
@media (min-width: 640px) {
154+
.query-form-actions {
155+
flex-direction: row;
156+
}
157+
}
158+
134159
.btn-primary {
135160
background: var(--color-primary);
136161
border: 1px solid var(--color-primary);
137162
color: var(--text-primary);
138-
padding: var(--space-3) var(--space-6);
163+
padding: var(--space-4) var(--space-6);
139164
font-family: var(--font-mono);
140165
font-size: 0.875rem;
141166
font-weight: 600;
@@ -144,6 +169,8 @@
144169
border-radius: 4px;
145170
transition: all var(--transition-fast);
146171
text-transform: uppercase;
172+
min-height: 44px;
173+
touch-action: manipulation;
147174
}
148175

149176
.btn-primary:hover:not(:disabled) {

0 commit comments

Comments
 (0)