Skip to content

Commit 60a9b35

Browse files
committed
fix(web): align themed icon groups across themes
1 parent d3de4c1 commit 60a9b35

2 files changed

Lines changed: 52 additions & 18 deletions

File tree

packages/web/src/theme/icon-theme.test.ts

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,48 @@ describe("theme icon resolver", () => {
7979
}
8080
});
8181

82+
it("keeps mobile dock icons aligned within each built-in theme", () => {
83+
for (const themeId of [
84+
"mint-dark",
85+
"mint-light",
86+
"graphite-dark",
87+
"graphite-light",
88+
"nord-dark",
89+
"nord-light",
90+
"hc-dark",
91+
"hc-light",
92+
] as const) {
93+
const agentTone = getIconPresentation(themeId, "mobile.dock.agent").tone;
94+
const filesTone = getIconPresentation(themeId, "mobile.dock.files").tone;
95+
const terminalTone = getIconPresentation(themeId, "mobile.dock.terminal").tone;
96+
97+
expect(agentTone).toBe(filesTone);
98+
expect(filesTone).toBe(terminalTone);
99+
}
100+
});
101+
102+
it("keeps settings navigation icons aligned within each built-in theme", () => {
103+
for (const themeId of [
104+
"mint-dark",
105+
"mint-light",
106+
"graphite-dark",
107+
"graphite-light",
108+
"nord-dark",
109+
"nord-light",
110+
"hc-dark",
111+
"hc-light",
112+
] as const) {
113+
const tones = new Set([
114+
getIconPresentation(themeId, "nav.settings.general").tone,
115+
getIconPresentation(themeId, "nav.settings.providers").tone,
116+
getIconPresentation(themeId, "nav.settings.appearance").tone,
117+
getIconPresentation(themeId, "nav.settings.shortcuts").tone,
118+
]);
119+
120+
expect(tones.size).toBe(1);
121+
}
122+
});
123+
82124
it("applies richer common icon tones for mint themes", () => {
83125
for (const themeId of ["mint-dark", "mint-light"] as const) {
84126
expect(getIconPresentation(themeId, "nav.agent")).toEqual(
@@ -88,7 +130,7 @@ describe("theme icon resolver", () => {
88130
expect.objectContaining({ tone: "accent" })
89131
);
90132
expect(getIconPresentation(themeId, "mobile.dock.agent")).toEqual(
91-
expect.objectContaining({ tone: "accent" })
133+
expect.objectContaining({ tone: "info" })
92134
);
93135
expect(getIconPresentation(themeId, "mobile.dock.files")).toEqual(
94136
expect.objectContaining({ tone: "info" })
@@ -138,7 +180,7 @@ describe("theme icon resolver", () => {
138180
expect.objectContaining({ tone: "accent" })
139181
);
140182
expect(getIconPresentation(themeId, "mobile.dock.agent")).toEqual(
141-
expect.objectContaining({ tone: "accent" })
183+
expect.objectContaining({ tone: "secondary" })
142184
);
143185
expect(getIconPresentation(themeId, "mobile.dock.files")).toEqual(
144186
expect.objectContaining({ tone: "secondary" })
@@ -188,7 +230,7 @@ describe("theme icon resolver", () => {
188230
expect.objectContaining({ tone: "accent" })
189231
);
190232
expect(getIconPresentation(themeId, "mobile.dock.agent")).toEqual(
191-
expect.objectContaining({ tone: "accent" })
233+
expect.objectContaining({ tone: "info" })
192234
);
193235
expect(getIconPresentation(themeId, "mobile.dock.files")).toEqual(
194236
expect.objectContaining({ tone: "info" })
@@ -227,7 +269,7 @@ describe("theme icon resolver", () => {
227269
expect.objectContaining({ tone: "secondary" })
228270
);
229271
expect(getIconPresentation(themeId, "nav.settings.providers")).toEqual(
230-
expect.objectContaining({ tone: "info" })
272+
expect.objectContaining({ tone: "secondary" })
231273
);
232274
}
233275
});

packages/web/src/theme/registry.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const THEMES_REGISTRY: ReadonlyArray<AppThemeDefinition> = [
133133
},
134134
"mobile.dock.agent": {
135135
...BASE_ICON_THEME.icons["mobile.dock.agent"],
136-
tone: "accent",
136+
tone: "info",
137137
},
138138
"mobile.dock.files": {
139139
...BASE_ICON_THEME.icons["mobile.dock.files"],
@@ -213,7 +213,7 @@ const THEMES_REGISTRY: ReadonlyArray<AppThemeDefinition> = [
213213
},
214214
"mobile.dock.agent": {
215215
...BASE_ICON_THEME.icons["mobile.dock.agent"],
216-
tone: "accent",
216+
tone: "info",
217217
},
218218
"mobile.dock.files": {
219219
...BASE_ICON_THEME.icons["mobile.dock.files"],
@@ -308,7 +308,7 @@ const THEMES_REGISTRY: ReadonlyArray<AppThemeDefinition> = [
308308
},
309309
"mobile.dock.agent": {
310310
...BASE_ICON_THEME.icons["mobile.dock.agent"],
311-
tone: "accent",
311+
tone: "secondary",
312312
},
313313
"mobile.dock.files": {
314314
...BASE_ICON_THEME.icons["mobile.dock.files"],
@@ -395,7 +395,7 @@ const THEMES_REGISTRY: ReadonlyArray<AppThemeDefinition> = [
395395
},
396396
"mobile.dock.agent": {
397397
...BASE_ICON_THEME.icons["mobile.dock.agent"],
398-
tone: "accent",
398+
tone: "secondary",
399399
},
400400
"mobile.dock.files": {
401401
...BASE_ICON_THEME.icons["mobile.dock.files"],
@@ -482,7 +482,7 @@ const THEMES_REGISTRY: ReadonlyArray<AppThemeDefinition> = [
482482
},
483483
"mobile.dock.agent": {
484484
...BASE_ICON_THEME.icons["mobile.dock.agent"],
485-
tone: "accent",
485+
tone: "info",
486486
},
487487
"mobile.dock.files": {
488488
...BASE_ICON_THEME.icons["mobile.dock.files"],
@@ -520,10 +520,6 @@ const THEMES_REGISTRY: ReadonlyArray<AppThemeDefinition> = [
520520
...BASE_ICON_THEME.icons["git.commit"],
521521
tone: "accent",
522522
},
523-
"nav.settings.providers": {
524-
...BASE_ICON_THEME.icons["nav.settings.providers"],
525-
tone: "info",
526-
},
527523
"state.warning": {
528524
...BASE_ICON_THEME.icons["state.warning"],
529525
},
@@ -589,7 +585,7 @@ const THEMES_REGISTRY: ReadonlyArray<AppThemeDefinition> = [
589585
},
590586
"mobile.dock.agent": {
591587
...BASE_ICON_THEME.icons["mobile.dock.agent"],
592-
tone: "accent",
588+
tone: "info",
593589
},
594590
"mobile.dock.files": {
595591
...BASE_ICON_THEME.icons["mobile.dock.files"],
@@ -627,10 +623,6 @@ const THEMES_REGISTRY: ReadonlyArray<AppThemeDefinition> = [
627623
...BASE_ICON_THEME.icons["git.commit"],
628624
tone: "accent",
629625
},
630-
"nav.settings.providers": {
631-
...BASE_ICON_THEME.icons["nav.settings.providers"],
632-
tone: "info",
633-
},
634626
"state.warning": {
635627
...BASE_ICON_THEME.icons["state.warning"],
636628
},

0 commit comments

Comments
 (0)