-
Notifications
You must be signed in to change notification settings - Fork 134
Fix styling for code in headers in the Help pane #10989
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
Conversation
|
E2E Tests 🚀 |
|
This fix also addresses #7039 in that we no longer end up with mixed-up sizes together in the Help pane:
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: 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
left a comment
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.
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:
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 { |
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.
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
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.
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.


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::.datapage now looks like this:@:help
Release Notes
New Features
Bug Fixes
QA Notes
A Help page like
?rlang::.datathat 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.