Commit 25545e9
authored
* refactor(terminal): redesign profile settings UI with unified dropdown (#119) (#321)
Modified files:
- TerminalSettings.tsx: reorder layout, radio→dropdown, shadcn/ui Button
- TerminalSettings.profile.spec.tsx: rewrite tests for new dropdown UI
- settings.json (en + 16 locales): add followVscode, remove default/overrideLabel,
refine label, description, and (recommended) suffix
* docs: add terminal settings before/after screenshots
* fix(terminal): restore lost refinements — button stretch, Terminal icon, (recommended), i18n alignment
- TerminalSettings.tsx: flex flex-col wrapper for auto-stretch, Terminal icon
- TerminalSettings.profile.spec.tsx: add 4 tests for icon and i18n keys
- en/settings.json: followVscode (recommended), refined description
- zh-CN/settings.json: label, followVscode, description aligned with en
- de/it/settings.json: label changed from override to Shell
- All 16 locales: (recommended) suffix on followVscode
* fix(terminal): add isProfilesLoaded guard, harden sentinel, sync i18n (#119) (#321)
TerminalSettings.tsx:
- Guard no-profiles hint render with isProfilesLoaded to prevent the hint
from flashing before async profiles load.
- Harden DEFAULT_PROFILE_VALUE sentinel from "__default__" to
"__zoo_code_follow_vscode_sentinel__" to eliminate theoretical collision
with a user-named VS Code profile.
TerminalSettings.profile.spec.tsx:
- Extend the empty-profiles test to assert the hint is absent before
profiles load and present only after the empty list arrives.
- Update sentinel references to match the new constant.
i18n (ca/de/es/fr/hi/id/it/ja/ko/nl/pl/pt-BR/ru/tr/vi/zh-TW):
- Replace outdated "override toggle" wording in label and description
with unified single-dropdown profile selection language, aligning
with the en/zh-CN baseline.
* fix(terminal): correct data-testid placement, use nullish coalescing, and harden test patterns (#119)
- TerminalSettings.tsx: move data-testid from Radix <Select> root
(no DOM node) to <SelectTrigger> button so the attribute survives
in production; replace || with ?? for the terminalProfile sentinel
fallback so empty string is not incorrectly replaced; export
DEFAULT_PROFILE_VALUE for reuse in tests.
- TerminalSettings.profile.spec.tsx: import DEFAULT_PROFILE_VALUE,
replace hardcoded sentinel strings; adopt rerender() over
cleanup()+render() so onTerminalProfilePickerOpened is preserved
across re-renders; remove unused cleanup import.
- Remove PR screenshots from docs/ (after1.png, after2.png,
before.png).
1 parent ccd37d1 commit 25545e9
20 files changed
Lines changed: 238 additions & 284 deletions
File tree
- webview-ui/src
- components/settings
- __tests__
- i18n/locales
- ca
- de
- en
- es
- fr
- hi
- id
- it
- ja
- ko
- nl
- pl
- pt-BR
- ru
- tr
- vi
- zh-CN
- zh-TW
Lines changed: 76 additions & 113 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 71 | | |
75 | 72 | | |
76 | 73 | | |
| |||
166 | 163 | | |
167 | 164 | | |
168 | 165 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
| 166 | + | |
274 | 167 | | |
275 | 168 | | |
276 | 169 | | |
| |||
300 | 193 | | |
301 | 194 | | |
302 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
303 | 266 | | |
304 | 267 | | |
305 | 268 | | |
| |||
0 commit comments