Skip to content

Conversation

@juliasilge
Copy link
Contributor

Addresses #3136

With this PR, we now ensure that code elements in the Help pane inherit their font size from their parent element.

The particular ?rlang::.data page now looks like this:

Screenshot 2025-12-06 at 4 22 34 PM

@:help

Release Notes

New Features

  • N/A

Bug Fixes

  • Fixed styling of code elements in the Help pane

QA Notes

A Help page like ?rlang::.data that has code elements in headers should render those code elements in the same size as the header. We should also spot check some other use of the Help pane to ensure things still look good.

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:help

readme  valid tags

@juliasilge juliasilge marked this pull request as ready for review December 7, 2025 00:01
@juliasilge
Copy link
Contributor Author

juliasilge commented Dec 8, 2025

This fix also addresses #7039 in that we no longer end up with mixed-up sizes together in the Help pane:

Screenshot 2025-12-07 at 5 06 13 PM

However, it does not yet let a user configure the font size in the Help pane, like what I think may be part of what is requested in #7039. We could do something like this, I suppose:

font-size: var(--vscode-editor-font-size) !important;

Is that a good idea? I am thinking maybe not, because other UI components do not tend to inherit the font size in that way. Instead, different components (terminal, editor, chat, etc) offer their own font size to set. Maybe we should call that issue fixed and then look for feature requests from users to make the size in the Help pane configurable, if that's important to folks. You can use zoom to make the whole UI together change its relative sizing.

dhruvisompura
dhruvisompura previously approved these changes Dec 8, 2025
Copy link
Contributor

@dhruvisompura dhruvisompura left a comment

Choose a reason for hiding this comment

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

Overall looks good based off my testing. I had one comment about the css. This can be merged once that is resolved!

This fix also addresses #7039 in that we no longer end up with mixed-up sizes together in the Help pane:

Screenshot 2025-12-07 at 5 06 13 PM However, it does not yet let a user configure the font size in the Help pane, like what I think may be part of what is requested in #7039. We could do something like this, I suppose:
font-size: var(--vscode-editor-font-size) !important;

Is that a good idea? I am thinking maybe not, because other UI components do not tend to inherit the font size in that way. Instead, different components (terminal, editor, chat, etc) offer their own font size to set. Maybe we should call that issue fixed and then look for feature requests from users to make the size in the Help pane configurable, if that's important to folks. You can use zoom to make the whole UI together change its relative sizing.

I would personally vote for having a help pane specific font size configuration option! I would want to be able to control both independently. I think creating an issue for help pane configuration options makes sense.

color: var(--vscode-textLink-foreground) !important;
}

code, pre, tt {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do the docs actually contain tt elements? This is a deprecated element and if we don't use them, we shouldn't need to target it for this style.

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for pointing this out! I looked into how both R's help system and Python's pydoc make these HTML pages, and I don't believe anybody involved is using any deprecated tt elements.

@juliasilge juliasilge merged commit 4fc0a87 into main Dec 9, 2025
12 checks passed
@juliasilge juliasilge deleted the fix-help-code-styling branch December 9, 2025 03:02
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants