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
StatPanel: Add padding between horizontal name and value #55299
Conversation
const styles: CSSProperties = { | ||
fontSize: `${this.titleFontSize}px`, | ||
lineHeight: LINE_HEIGHT, | ||
}; | ||
|
||
if (this.props.parentOrientation === VizOrientation.Horizontal && this.justifyCenter) { | ||
styles.paddingRight = this.props.theme.spacing(1); |
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.
what would something font-dependant look like, like 1ch
(or maybe like 0.75ch
) instead?
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.
Put differently, is using fixed pixels, where the gap will remain constant size regardless of the surrounding font size, the right approach?
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.
Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/33812 |
Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/33823 |
Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/33848 |
What this PR does / why we need it:
The Stat Panel has an option to set the data horizontally and they currently have no space between the name and the value. This PR adds some padding there.
Which issue(s) this PR fixes:
Fixes #54160