Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

feat(ui): adjust roo font size#8457

Closed
elianiva wants to merge 13 commits into
RooCodeInc:mainfrom
elianiva:feat/adjust-font-size
Closed

feat(ui): adjust roo font size#8457
elianiva wants to merge 13 commits into
RooCodeInc:mainfrom
elianiva:feat/adjust-font-size

Conversation

@elianiva

@elianiva elianiva commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

Related GitHub Issue

Closes: #8100

Roo Code Task Context (Optional)

Description

This PR adds the ability to scale the font size inside Roo's window. I didn't go with small, medium, large and instead went with multiplier because it gives the user more flexibility.
I didn't add mouse wheel binding or keyboard binding by default because it's already used by the editor and I prefer to leave that choice to the users.

We now have these two new commands:

image

Along with a configurable setting using roo-cline.fontSizeMultiplier that the users can configure themselves.

As a side effect, I've also replaced a few components due to them being a web components, which prevents me from updating the font-size because they're using shadow DOM. This change shouldn't matter that much, it only adds consistency to the UI.

Test Procedure

Change the settings or use the provided command from the command palette and observe the change. The only part that changes is the font size.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Normal size:

image

Smol size:

image

Comically large size:

image

Documentation Updates

Additional Notes

While working on this I also found that we used different ways of stylings. Might worth to revisit that in the future for consistencies.

Also, the issue didn't explain the scope on which section should have the size changed. I'm not sure if we only want to change the font in the chat? I think that's what we want because the rest can be changed using vscode settings, but for now I went with changing everything for consistency.

Let me know which one is the correct one and I'll update this PR :)

Get in Touch

@elianiva


Important

Adds font size adjustment feature using a multiplier in Roo UI, with new commands and updates across components and styles.

  • Behavior:
    • Introduces font size adjustment using roo-cline.fontSizeMultiplier in registerCommands.ts.
    • Adds commands increaseFontSize and decreaseFontSize in vscode.ts.
    • Updates ClineProvider.ts to handle font size changes.
  • UI Components:
    • Modifies font size calculations in App.tsx, BrowserSessionRow.tsx, ChatRow.tsx, and other components to use --roo-font-size-multiplier.
    • Replaces VSCodeCheckbox with Checkbox in multiple settings components.
  • Styles:
    • Updates index.css and preflight.css to incorporate --roo-font-size-multiplier for consistent font scaling.
  • Misc:
    • Adjusts button.tsx and styles.ts for consistent UI appearance with new font size settings.
    • Updates ExtensionStateContext.tsx to include fontSizeMultiplier in state.

This description was created by Ellipsis for a9da56d. You can customize this summary. It will automatically update as commits are pushed.

@elianiva elianiva requested review from cte, jr and mrubens as code owners October 2, 2025 10:55
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused labels Oct 2, 2025
Comment thread webview-ui/src/components/chat/ChatView.tsx Outdated
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 2, 2025

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention. See inline comments.

Comment thread src/core/webview/ClineProvider.ts
Comment thread src/activate/registerCommands.ts Outdated
Comment thread src/activate/registerCommands.ts Outdated
Comment thread webview-ui/src/components/settings/UISettings.tsx

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention. See inline comments.

Comment thread webview-ui/src/preflight.css Outdated
Comment thread webview-ui/src/preflight.css Outdated
Comment thread webview-ui/src/preflight.css Outdated
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Oct 2, 2025
@adamhill

adamhill commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

Very nice @elianiva . My old eyes thank you for this!

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention. See inline comments.

Comment thread src/activate/registerCommands.ts Outdated
Comment thread src/activate/registerCommands.ts Outdated

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention. See inline comments.

Comment thread src/activate/registerCommands.ts Outdated
elianiva and others added 3 commits October 2, 2025 20:05
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention. See inline comments.

Comment thread src/activate/registerCommands.ts Outdated

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention. See inline comments.

word-break: ${({ wordwrap }) => (wordwrap === "false" ? "normal" : "normal")};
overflow-wrap: ${({ wordwrap }) => (wordwrap === "false" ? "normal" : "break-word")};
font-size: 0.95em;
font-size: calc(0.95em * var(--roo-font-size-multiplier, 1));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Double-applied font scaling for code blocks. Styled containers already scale text via --roo-font-size-multiplier; multiplying an em-based size by the multiplier here applies it twice when nested (e.g., inside MarkdownBlock). Use a single scale source.

Suggested change
font-size: calc(0.95em * var(--roo-font-size-multiplier, 1));
font-size: 0.95em;

code:not(pre > code) {
font-family: var(--vscode-editor-font-family, monospace);
font-size: 0.85em;
font-size: calc(0.85em * var(--roo-font-size-multiplier, 1));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Double-applied font scaling for inline code. This element sits under a container that already sets font-size from var(--vscode-font-size) * --roo-font-size-multiplier, so multiplying the em size again compounds the factor. Remove the extra multiplier.

Suggested change
font-size: calc(0.85em * var(--roo-font-size-multiplier, 1));
font-size: 0.85em;

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention. See inline comments.

code:not(pre > code) {
font-family: var(--vscode-editor-font-family, monospace);
font-size: 0.85em;
font-size: calc(0.85em * var(--roo-font-size-multiplier, 1));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Double-applied font scaling. Inline code uses em relative to its parent which already includes --roo-font-size-multiplier via StyledMarkdown. Multiplying by the multiplier again compounds scaling. Remove the extra multiplier so it scales once consistently.

Suggested change
font-size: calc(0.85em * var(--roo-font-size-multiplier, 1));
font-size: 0.85em;

/* KaTeX styling */
.katex {
font-size: 1.1em;
font-size: calc(1.1em * var(--roo-font-size-multiplier, 1));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Double-applied font scaling for KaTeX. This uses em (relative to parent that already applies the multiplier) and multiplies again. Keep it proportional to parent without the extra multiplier.

Suggested change
font-size: calc(1.1em * var(--roo-font-size-multiplier, 1));
font-size: 1.1em;

word-break: ${({ wordwrap }) => (wordwrap === "false" ? "normal" : "normal")};
overflow-wrap: ${({ wordwrap }) => (wordwrap === "false" ? "normal" : "break-word")};
font-size: 0.95em;
font-size: calc(0.95em * var(--roo-font-size-multiplier, 1));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Double-applied font scaling in code/pre. The parent text already reflects --roo-font-size-multiplier. Using em here and multiplying by the multiplier again compounds scaling. Remove the multiplier to avoid double scaling.

Suggested change
font-size: calc(0.95em * var(--roo-font-size-multiplier, 1));
font-size: 0.95em;

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention. See inline comments.

Comment thread webview-ui/src/components/ui/button.tsx
@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Oct 3, 2025
@hannesrudolph

Copy link
Copy Markdown
Contributor

@brunobergher

@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Oct 3, 2025
@elianiva

elianiva commented Oct 4, 2025

Copy link
Copy Markdown
Contributor Author

I just realised that I need to replace literally all reference to VSCodeCheckbox because it didn't get affected, I only changed the one in provider settings page. Although, I'll wait for approval whether or not we want to change the whole appearance or just changing the chat UI before doing that.

@hannesrudolph

Copy link
Copy Markdown
Contributor

@brunobergher thoughts?

@brunobergher

Copy link
Copy Markdown
Collaborator

Sorry for the delay, @elianiva, this is awesome! I agree we need to be more consistent in using font-size as a basis for scale everywhere, but this already improves things a lot.

My only 3 comments are:

  • Selfishly, as the designer on the team, I'd love if we could scope this to only the chat view, because it can be very challenging to make the UI look good across sizes in specific elements like the auto-approve dropdown, settings, onboarding, etc. Plus, as you said, users can simply increase/decrease the global VSCode font size to target the UI in conjunction with the chat view area. So if you don't mind, I'd leave it to ChatView for now and expand later if needed.
  • Since we now have a UI Settings section, I think this deserves to go there. The display should probably be a text input with the value of the multipler (maybe with sensible bounds, like min 0.5 and max 2), plus a button to reset back to 1.
  • Less important, but I missed being able to use a command to also reset the size to the default, along with increase/decrease

This is create work in any case, I really appreciate it.

@github-project-automation github-project-automation Bot moved this from New to Done in Roo Code Roadmap Jan 6, 2026
@github-project-automation github-project-automation Bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Jan 6, 2026
ghost pushed a commit that referenced this pull request Jan 6, 2026
- Add chatFontSizeMultiplier to global settings with min 0.5 max 2 bounds
- Add commands: increaseChatFontSize, decreaseChatFontSize, resetChatFontSize
- Add UI Settings control with number input and reset button
- Apply font size multiplier only to ChatView container (scoped per Bruno feedback)
- Add English translations for the new setting
- Update UISettings tests

Addresses issue #8100 per feedback from Bruno in PR #8457
@ghost ghost mentioned this pull request Jan 6, 2026
8 tasks
ghost pushed a commit that referenced this pull request Feb 20, 2026
- Add chatFontSizeMultiplier to global settings with min 0.5 max 2 bounds
- Add commands: increaseChatFontSize, decreaseChatFontSize, resetChatFontSize
- Add UI Settings control with number input and reset button
- Apply font size multiplier only to ChatView container (scoped per Bruno feedback)
- Add English translations for the new setting
- Update UISettings tests

Addresses issue #8100 per feedback from Bruno in PR #8457
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

PR - Needs Preliminary Review size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Text size setting for Roo UI (Small/Medium/Large, no VS Code zoom)

4 participants