Skip to content

Commit 44a8907

Browse files
authored
fix(styles): UI/UX micro-interaction polish (#552)
1 parent f4e3117 commit 44a8907

File tree

15 files changed

+150
-26
lines changed

15 files changed

+150
-26
lines changed

src/features/settings/components/sections/SettingsComposerSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function SettingsComposerSection({
3232
>
3333
<div className="settings-field">
3434
<div className="settings-field-label">Follow-up behavior</div>
35-
<div className="settings-segmented" aria-label="Follow-up behavior">
35+
<div className={`settings-segmented${appSettings.followUpMessageBehavior === "steer" ? " is-second-active" : ""}`} aria-label="Follow-up behavior">
3636
<label
3737
className={`settings-segmented-option${
3838
appSettings.followUpMessageBehavior === "queue" ? " is-active" : ""

src/styles/base.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,30 @@ button.window-caption-control:focus-visible,
229229
display: none;
230230
}
231231
}
232+
233+
@media (prefers-reduced-motion: reduce) {
234+
*,
235+
*::before,
236+
*::after {
237+
animation-duration: 0.01ms !important;
238+
animation-iteration-count: 1 !important;
239+
transition-duration: 0.01ms !important;
240+
scroll-behavior: auto !important;
241+
}
242+
243+
/* Restore functional spinners — these communicate loading state */
244+
.working-spinner,
245+
.git-panel-spinner,
246+
.commit-message-loader,
247+
.commit-button-spinner,
248+
.sidebar-refresh-icon.spinning,
249+
.worktree-deleting-spinner,
250+
.sidebar-account-spinner,
251+
.settings-agents-generate-loader,
252+
.composer-action-spinner,
253+
.compact-codex-refresh-icon.spinning,
254+
.home-usage-refresh-icon.spinning {
255+
animation-duration: var(--ds-spinner-dur) !important;
256+
animation-iteration-count: infinite !important;
257+
}
258+
}

src/styles/buttons.css

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ button {
1010
font-size: 13px;
1111
font-weight: 600;
1212
cursor: pointer;
13-
transition: transform 0.15s ease, box-shadow 0.15s ease;
13+
transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, filter 0.15s ease;
1414
-webkit-app-region: no-drag;
1515
}
1616

@@ -52,3 +52,21 @@ button:hover:not(:disabled) {
5252
transform: translateY(-1px);
5353
box-shadow: 0 12px 18px rgba(0, 0, 0, 0.2);
5454
}
55+
56+
button:active:not(:disabled) {
57+
transform: scale(var(--ds-active-scale));
58+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
59+
transition-duration: 50ms;
60+
}
61+
62+
.icon-button:active:not(:disabled) {
63+
transform: scale(var(--ds-active-scale-sm));
64+
}
65+
66+
.primary:active:not(:disabled) {
67+
filter: brightness(0.92);
68+
}
69+
70+
.ghost:active:not(:disabled) {
71+
background: rgba(255, 255, 255, 0.06);
72+
}

src/styles/compact-tablet.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
flex-direction: column;
3939
align-items: center;
4040
gap: 6px;
41-
transition: all 0.15s ease;
41+
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
4242
}
4343

4444
.tablet-nav-item:hover {

src/styles/composer.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
border-radius: 999px;
487487
border: 2px solid rgba(255, 120, 120, 0.35);
488488
border-top-color: rgba(255, 120, 120, 0.9);
489-
animation: composer-action-spin 0.8s linear infinite;
489+
animation: composer-action-spin var(--ds-spinner-dur) linear infinite;
490490
}
491491

492492

src/styles/diff.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@
997997
border-radius: 50%;
998998
border: 2px solid var(--border-subtle);
999999
border-top-color: var(--text-strong);
1000-
animation: spin 0.9s linear infinite;
1000+
animation: spin var(--ds-spinner-dur) linear infinite;
10011001
}
10021002

10031003
@keyframes spin {
@@ -1102,7 +1102,7 @@
11021102
.commit-message-loader {
11031103
width: 14px;
11041104
height: 14px;
1105-
animation: spin 1s linear infinite;
1105+
animation: spin var(--ds-spinner-dur) linear infinite;
11061106
}
11071107

11081108
.commit-message-error {
@@ -1150,7 +1150,7 @@
11501150
border-radius: 50%;
11511151
border: 2px solid var(--border-subtle);
11521152
border-top-color: var(--text-emphasis);
1153-
animation: spin 0.9s linear infinite;
1153+
animation: spin var(--ds-spinner-dur) linear infinite;
11541154
}
11551155

11561156
/* Push section */

src/styles/ds-modal.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
background: var(--ds-modal-backdrop);
1111
backdrop-filter: blur(8px);
1212
-webkit-backdrop-filter: blur(8px);
13+
animation: ds-modal-backdrop-in var(--ds-dur-entrance) var(--ds-ease-out) both;
1314
}
1415

1516
.app.reduced-transparency .ds-modal-backdrop {
@@ -30,6 +31,7 @@
3031
top: 50%;
3132
left: 50%;
3233
transform: translate(-50%, -50%);
34+
animation: ds-modal-card-in var(--ds-dur-slow) var(--ds-ease-out) both;
3335
}
3436

3537
.ds-modal :where(input, textarea, select):focus-visible {
@@ -62,6 +64,8 @@
6264
padding: 10px 12px;
6365
font-size: 13px;
6466
width: 100%;
67+
transition: border-color var(--ds-dur-normal) var(--ds-ease-out-soft),
68+
box-shadow var(--ds-dur-normal) var(--ds-ease-out-soft);
6569
}
6670

6771
.ds-modal-textarea {
@@ -97,3 +101,19 @@
97101
padding: 6px 12px;
98102
border-radius: 10px;
99103
}
104+
105+
@keyframes ds-modal-backdrop-in {
106+
from { opacity: 0; }
107+
to { opacity: 1; }
108+
}
109+
110+
@keyframes ds-modal-card-in {
111+
from {
112+
opacity: 0;
113+
transform: translate(-50%, -48%) scale(0.98);
114+
}
115+
to {
116+
opacity: 1;
117+
transform: translate(-50%, -50%) scale(1);
118+
}
119+
}

src/styles/ds-popover.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
border: 1px solid var(--ds-popover-border, var(--border-muted));
44
box-shadow: var(--ds-popover-shadow, 0 14px 34px rgba(0, 0, 0, 0.3));
55
border-radius: 10px;
6+
animation: ds-popover-in var(--ds-dur-fast) var(--ds-ease-out) both;
67
}
78

89
.ds-popover-item {
@@ -19,6 +20,8 @@
1920
font-size: 12px;
2021
text-align: left;
2122
cursor: pointer;
23+
transition: background-color var(--ds-dur-fast) var(--ds-ease-out-soft),
24+
color var(--ds-dur-fast) var(--ds-ease-out-soft);
2225
}
2326

2427
.ds-popover-item:disabled {
@@ -55,3 +58,16 @@
5558
min-width: 0;
5659
flex: 1;
5760
}
61+
62+
@keyframes ds-popover-in {
63+
from {
64+
opacity: 0;
65+
translate: 0 -4px;
66+
scale: 0.98;
67+
}
68+
to {
69+
opacity: 1;
70+
translate: 0 0;
71+
scale: 1;
72+
}
73+
}

src/styles/ds-tokens.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,18 @@
4141
/* Global layer scale (keep numeric so it works with z-index + calc()). */
4242
--ds-layer-modal: 10000;
4343
--ds-layer-toast: 11000;
44+
45+
/* ── Motion ── */
46+
--ds-dur-fast: 120ms;
47+
--ds-dur-normal: 160ms;
48+
--ds-dur-slow: 220ms;
49+
--ds-dur-entrance: 200ms;
50+
51+
--ds-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
52+
--ds-ease-out-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
53+
--ds-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
54+
55+
--ds-spinner-dur: 0.7s;
56+
--ds-active-scale: 0.97;
57+
--ds-active-scale-sm: 0.92;
4458
}

src/styles/home.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
}
214214

215215
.home-usage-refresh-icon.spinning {
216-
animation: home-spin 0.8s linear infinite;
216+
animation: home-spin var(--ds-spinner-dur) linear infinite;
217217
}
218218

219219
.home-usage-grid {

0 commit comments

Comments
 (0)