feat(Font style for SerialConsole): allow customized font styling for the SerialConsole component - #356
Conversation
… the SerialConsole component affects: @patternfly/react-console Default font family and size can be changed for the SerialConsole. Underlying xterm component uses html canvas to render text and seems not to support font style change via CSS.
4004769 to
41dd1fb
Compare
Pull Request Test Coverage Report for Build 1366
💛 - Coveralls |
| cols: PropTypes.number, | ||
|
|
||
| /** Font for text rendered to xterm canvas */ | ||
| fontFamily: PropTypes.string, |
There was a problem hiding this comment.
Should we depend on the xterm default here?
There will be Menlo, Monaco, Consolas, monospace of size 12 used in Cockpit.
Would be great to do this styling via CSS but recent xterm seems to enforce this property.
There was a problem hiding this comment.
@patternfly/patternfly-react-ux thoughts?
There was a problem hiding this comment.
Perhaps this could be good to encourage better readability?
There was a problem hiding this comment.
Actually it's in a JS comment bellow for the defaultProps.
I just positioned this comment on GitHub incorrectly.
serenamarie125
left a comment
There was a problem hiding this comment.
I'm fine with allowing the font change. It's not for the UI itself, so it's not going against any PatternFly guidelines.
|
@jeff-phillips-18 do we need an additional JS review, or can this be merged? |
|
I believe the question is about setting the default font. Should we set a specific default that is not the xterm default? |
|
@jeff-phillips-18 I think if this is optional behavior, it is fine. This is a valid use case in some cases. |
|
@mareklibra In addition to allowing someone to change the default font, should PF set the default font to something more reasonable than the current xterm default? |
|
Discussed with @serenamarie125 offline. Agreed that we can use the xterm defaults for now and revisit if/when we feel it should be changed. |
|
FYI - captured @jeff-phillips-18 request re: default font here #361 |
affects: @patternfly/react-console
Default font family and size can be changed for the SerialConsole.
Underlying xterm component uses html canvas to render text and seems not to support font style change via CSS.