Skip to content

feat(Font style for SerialConsole): allow customized font styling for the SerialConsole component - #356

Merged
jeff-phillips-18 merged 1 commit into
patternfly:masterfrom
mareklibra:serialConsole.fontFamily
May 22, 2018
Merged

jeff-phillips-18 merged 1 commit into
patternfly:masterfrom
mareklibra:serialConsole.fontFamily

Conversation

@mareklibra

@mareklibra mareklibra commented May 16, 2018 •

Copy link
Copy Markdown
Contributor

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.

… 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.
@mareklibra
mareklibra force-pushed the serialConsole.fontFamily branch from 4004769 to 41dd1fb Compare May 16, 2018 11:07
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 1366

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 74.086%

Totals Coverage Status
Change from base Build 1359: 0.0%
Covered Lines: 1704
Relevant Lines: 2103

💛 - Coveralls

cols: PropTypes.number,

/** Font for text rendered to xterm canvas */
fontFamily: PropTypes.string,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@patternfly/patternfly-react-ux thoughts?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps this could be good to encourage better readability?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually it's in a JS comment bellow for the defaultProps.
I just positioned this comment on GitHub incorrectly.

@serenamarie125 serenamarie125 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm fine with allowing the font change. It's not for the UI itself, so it's not going against any PatternFly guidelines.

@serenamarie125

Copy link
Copy Markdown
Member

@jeff-phillips-18 do we need an additional JS review, or can this be merged?

@jeff-phillips-18

Copy link
Copy Markdown
Member

I believe the question is about setting the default font. Should we set a specific default that is not the xterm default?

@serenamarie125

Copy link
Copy Markdown
Member

@jeff-phillips-18 I think if this is optional behavior, it is fine. This is a valid use case in some cases.

@serenamarie125

Copy link
Copy Markdown
Member

@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?

@jeff-phillips-18

Copy link
Copy Markdown
Member

Discussed with @serenamarie125 offline. Agreed that we can use the xterm defaults for now and revisit if/when we feel it should be changed.

@serenamarie125

Copy link
Copy Markdown
Member

FYI - captured @jeff-phillips-18 request re: default font here #361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants