-
Notifications
You must be signed in to change notification settings - Fork 69
feat(settings): add configurable chat font size (#157) #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
911199b
48b680d
a046159
e94e260
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -412,6 +412,37 @@ describe("SettingsView - Sound Settings", () => { | |
| ) | ||
| }) | ||
|
|
||
| it("saves the selected chat font size and persists null on reset", () => { | ||
| const { activateTab, getSettingsContent } = renderSettingsView() | ||
|
|
||
| activateTab("ui") | ||
|
|
||
| const content = getSettingsContent() | ||
| const slider = within(content).getByTestId("chat-font-size-slider") | ||
|
|
||
| // Pick a size, then Save — the boundary should forward it to the host. | ||
| fireEvent.change(slider, { target: { value: "18" } }) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does |
||
| fireEvent.click(screen.getByTestId("save-button")) | ||
|
|
||
| expect(vscode.postMessage).toHaveBeenCalledWith( | ||
| expect.objectContaining({ | ||
| type: "updateSettings", | ||
| updatedSettings: expect.objectContaining({ chatFontSize: 18 }), | ||
| }), | ||
| ) | ||
|
|
||
| // Reset clears the override; it is persisted as null (not undefined). | ||
| fireEvent.click(within(getSettingsContent()).getByTestId("chat-font-size-reset")) | ||
| fireEvent.click(screen.getByTestId("save-button")) | ||
|
|
||
| expect(vscode.postMessage).toHaveBeenCalledWith( | ||
| expect.objectContaining({ | ||
| type: "updateSettings", | ||
| updatedSettings: expect.objectContaining({ chatFontSize: null }), | ||
| }), | ||
| ) | ||
| }) | ||
|
|
||
| it("shows tts slider when sound is enabled", () => { | ||
| // Render once and get the activateTab helper | ||
| const { activateTab, getSettingsContent } = renderSettingsView() | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other two handlers in this file both emit a telemetry event — should these do the same? Something like
ui_settings_chat_font_size_changed(withvalue) andui_settings_chat_font_size_resetwould keep the feature visible in analytics.