Skip to content

Commit

Permalink
feat: allow long column names in legends and tooltips (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
TCL735 authored Jan 5, 2022
1 parent eb71b9b commit 24270c7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion giraffe/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@influxdata/giraffe",
"version": "2.22.0",
"version": "2.23.0",
"main": "dist/index.js",
"module": "dist/index.js",
"license": "MIT",
Expand Down
13 changes: 0 additions & 13 deletions giraffe/src/components/LegendStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from '../constants'

const legendColumnGap = '12px'
const legendColumnMaxWidth = '200px'
const legendTablePadding = '4px'

const legendColumnOrder = (name: string): number | undefined => {
Expand Down Expand Up @@ -180,9 +179,6 @@ const tooltipColumnValueStyle = (

if (switchToVertical) {
return {
maxWidth: legendColumnMaxWidth,
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
color,
display: 'table-cell',
Expand All @@ -193,9 +189,6 @@ const tooltipColumnValueStyle = (
}

return {
maxWidth: legendColumnMaxWidth,
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
fontWeight: 600,
lineHeight: '1.125em',
Expand All @@ -219,9 +212,6 @@ const staticLegendColumnValueStyle = (

if (switchToVertical) {
return {
maxWidth: legendColumnMaxWidth,
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
color,
display: 'table-cell',
Expand All @@ -232,9 +222,6 @@ const staticLegendColumnValueStyle = (
}

return {
maxWidth: legendColumnMaxWidth,
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
fontWeight: 600,
padding: `${STATIC_LEGEND_LINE_SPACING_RATIO}em`,
Expand Down
2 changes: 1 addition & 1 deletion stories/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@influxdata/giraffe-stories",
"version": "2.22.0",
"version": "2.23.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down

0 comments on commit 24270c7

Please sign in to comment.