added togle feature, and fix text#162
added togle feature, and fix text#162DinaLaptii wants to merge 1 commit intoNVIDIA-AI-Blueprints:developfrom
Conversation
Greptile SummaryThis PR adds a "New UI" feature toggle to the settings panel. When enabled, the welcome screen in
Confidence Score: 5/5Safe to merge — no functional defects introduced; only minor style issues remain. All findings are P2 (stale JSDoc comment and indentation inconsistency in SettingsPanel.tsx). The core logic, store integration, and test coverage are all correct and consistent with existing patterns.
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens Settings Panel] --> B[Clicks New UI Switch]
B --> C[setNewUiEnabled called\nLayoutStore updated]
C --> D{newUiEnabled?}
D -- true --> E[WelcomeState renders\nDeep Research copy\ntext-primary style]
D -- false --> F[WelcomeState renders\noriginal research copy\ntext-subtle style]
|
| <Text kind="label/semibold/xs" className="text-subtle uppercase"> | ||
| New UI | ||
| </Text> | ||
| <Switch | ||
| size="small" | ||
| checked={newUiEnabled} | ||
| onCheckedChange={setNewUiEnabled} | ||
| attributes={{ | ||
| SwitchTrack: { 'aria-label': 'Enable new UI' }, | ||
| }} | ||
| /> |
There was a problem hiding this comment.
Inconsistent indentation and missing section wrapper
The <Text> and <Switch> elements are indented with 10 spaces while their siblings (<Text kind="label/semibold/xs"> for "UI Theme Options" and <Select>) use 8 spaces. More importantly, wrapping the "New UI" label and switch in their own <Flex> would give the toggle a visually distinct section matching the theme section above it, and make future additions easier.
| <Text kind="label/semibold/xs" className="text-subtle uppercase"> | |
| New UI | |
| </Text> | |
| <Switch | |
| size="small" | |
| checked={newUiEnabled} | |
| onCheckedChange={setNewUiEnabled} | |
| attributes={{ | |
| SwitchTrack: { 'aria-label': 'Enable new UI' }, | |
| }} | |
| /> | |
| <Flex direction="col" gap="3"> | |
| <Text kind="label/semibold/xs" className="text-subtle uppercase"> | |
| New UI | |
| </Text> | |
| <Switch | |
| size="small" | |
| checked={newUiEnabled} | |
| onCheckedChange={setNewUiEnabled} | |
| attributes={{ | |
| SwitchTrack: { 'aria-label': 'Enable new UI' }, | |
| }} | |
| /> | |
| </Flex> |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
No description provided.