Skip to content

Commit

Permalink
Upgrade EUI to v28.2.0 (#75700)
Browse files Browse the repository at this point in the history
* eui to v28.0.0

* eui to 28.2.0

* euiselectableoptions type update

* targeted nohoist

* src snapshot updates

* x-pack snapshot updates

* strong -> mark

* upgrade @elastic/charts to v21.0.1

* strong -> mark

* fix charts version merge

* maps -> add_field_tooltip_popover type update

* snapshot update

* Fix gridline visibility

Co-authored-by: Justin Kambic <[email protected]>

Co-authored-by: nickofthyme <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Justin Kambic <[email protected]>
  • Loading branch information
4 people authored Aug 31, 2020
1 parent 50ce634 commit ee73c59
Show file tree
Hide file tree
Showing 47 changed files with 1,004 additions and 149 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,18 @@
"**/@types/*/**",
"**/grunt-*",
"**/grunt-*/**",
"x-pack/typescript"
"x-pack/typescript",
"@elastic/eui/rehype-react",
"@elastic/eui/remark-rehype",
"@elastic/eui/remark-rehype/**"
]
},
"dependencies": {
"@babel/core": "^7.11.1",
"@babel/register": "^7.10.5",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "7.9.0-rc.2",
"@elastic/eui": "27.4.1",
"@elastic/eui": "28.2.0",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "^2.5.0",
"@elastic/request-crypto": "1.1.4",
Expand Down Expand Up @@ -227,7 +230,7 @@
"@babel/parser": "^7.11.2",
"@babel/types": "^7.11.0",
"@elastic/apm-rum": "^5.5.0",
"@elastic/charts": "19.8.1",
"@elastic/charts": "21.0.1",
"@elastic/ems-client": "7.9.3",
"@elastic/eslint-config-kibana": "0.15.0",
"@elastic/eslint-plugin-eui": "0.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-ui-shared-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"kbn:watch": "node scripts/build --dev --watch"
},
"dependencies": {
"@elastic/charts": "19.8.1",
"@elastic/eui": "27.4.1",
"@elastic/charts": "21.0.1",
"@elastic/eui": "28.2.0",
"@elastic/numeral": "^2.5.0",
"@kbn/i18n": "1.0.0",
"@kbn/monaco": "1.0.0",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function AreaSeriesDecorator({
lines,
color,
stackAccessors,
stackAsPercentage,
stackMode,
points,
xScaleType,
yScaleType,
Expand Down Expand Up @@ -60,7 +60,7 @@ export function AreaSeriesDecorator({
y1AccessorFormat,
y0AccessorFormat,
stackAccessors,
stackAsPercentage,
stackMode,
xScaleType,
yScaleType,
timeZone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('src/legacy/core_plugins/metrics/public/visualizations/views/timeseries
[1557003600000, 9],
],
hideInLegend: false,
stackAsPercentage: false,
stackMode: undefined,
seriesId: '61ca57f1-469d-11e7-af02-69e470af7417:Rome',
seriesGroupId: 'yaxis_main_group',
name: 'Rome',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function BarSeriesDecorator({
bars,
color,
stackAccessors,
stackAsPercentage,
stackMode,
xScaleType,
yScaleType,
timeZone,
Expand All @@ -59,7 +59,7 @@ export function BarSeriesDecorator({
y1AccessorFormat,
y0AccessorFormat,
stackAccessors,
stackAsPercentage,
stackMode,
xScaleType,
yScaleType,
timeZone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('src/legacy/core_plugins/metrics/public/visualizations/views/timeseries
[1557003600000, 9],
],
hideInLegend: false,
stackAsPercentage: false,
stackMode: undefined,
seriesId: '61ca57f1-469d-11e7-af02-69e470af7417:Rome',
seriesGroupId: 'yaxis_main_group',
name: 'Rome',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
AnnotationDomainTypes,
LineAnnotation,
TooltipType,
StackMode,
} from '@elastic/charts';
import { EuiIcon } from '@elastic/eui';
import { getTimezone } from '../../../lib/get_timezone';
Expand Down Expand Up @@ -197,7 +198,7 @@ export const TimeSeries = ({
bars={bars}
color={finalColor}
stackAccessors={stackAccessors}
stackAsPercentage={isPercentage}
stackMode={isPercentage ? StackMode.Percentage : undefined}
xScaleType={xScaleType}
yScaleType={yScaleType}
timeZone={timeZone}
Expand All @@ -222,7 +223,7 @@ export const TimeSeries = ({
lines={lines}
color={finalColor}
stackAccessors={stackAccessors}
stackAsPercentage={isPercentage}
stackMode={isPercentage ? StackMode.Percentage : undefined}
points={points}
xScaleType={xScaleType}
yScaleType={yScaleType}
Expand All @@ -248,8 +249,10 @@ export const TimeSeries = ({
position={position}
domain={domain}
hide={hide}
showGridLines={showGrid}
gridLineStyle={GRID_LINE_CONFIG}
gridLine={{
...GRID_LINE_CONFIG,
visible: showGrid,
}}
tickFormat={tickFormatter}
/>
))}
Expand All @@ -259,8 +262,10 @@ export const TimeSeries = ({
position={Position.Bottom}
title={xAxisLabel}
tickFormat={xAxisFormatter}
showGridLines={showGrid}
gridLineStyle={GRID_LINE_CONFIG}
gridLine={{
...GRID_LINE_CONFIG,
visible: showGrid,
}}
/>
</Chart>
);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Chart = {
data: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number)).isRequired,
hideInLegend: PropTypes.bool.isRequired,
color: PropTypes.string.isRequired,
stackAsPercentage: PropTypes.bool.isRequired,
stackMode: PropTypes.oneOf(['percentage', 'wiggle', 'silhouette']),
stackAccessors: PropTypes.arrayOf(PropTypes.number),
xScaleType: PropTypes.string,
yScaleType: PropTypes.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ describe('TSVB theme', () => {
});
it('should return a highcontrast color theme for a different background', () => {
// red use a near full-black color
expect(getBaseTheme(LIGHT_THEME, 'red').axes.axisTitleStyle.fill).toEqual('rgb(23,23,23)');
expect(getBaseTheme(LIGHT_THEME, 'red').axes.axisTitle.fill).toEqual('rgb(23,23,23)');

// violet increased the text color to full white for higer contrast
expect(getBaseTheme(LIGHT_THEME, '#ba26ff').axes.axisTitleStyle.fill).toEqual(
'rgb(255,255,255)'
);
expect(getBaseTheme(LIGHT_THEME, '#ba26ff').axes.axisTitle.fill).toEqual('rgb(255,255,255)');

// light yellow, prefer the LIGHT_THEME fill color because already with a good contrast
expect(getBaseTheme(LIGHT_THEME, '#fff49f').axes.axisTitleStyle.fill).toEqual('#333');
expect(getBaseTheme(LIGHT_THEME, '#fff49f').axes.axisTitle.fill).toEqual('#333');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -109,27 +109,27 @@ export function getBaseTheme(baseTheme: Theme, bgColor?: string | null): Theme {
const mainTheme = bgLuminosity <= 0.179 ? DARK_THEME : LIGHT_THEME;
const color = findBestContrastColor(
bgColor,
LIGHT_THEME.axes.axisTitleStyle.fill,
DARK_THEME.axes.axisTitleStyle.fill
LIGHT_THEME.axes.axisTitle.fill,
DARK_THEME.axes.axisTitle.fill
);
return {
...mainTheme,
axes: {
...mainTheme.axes,
axisTitleStyle: {
...mainTheme.axes.axisTitleStyle,
axisTitle: {
...mainTheme.axes.axisTitle,
fill: color,
},
tickLabelStyle: {
...mainTheme.axes.tickLabelStyle,
tickLabel: {
...mainTheme.axes.tickLabel,
fill: color,
},
axisLineStyle: {
...mainTheme.axes.axisLineStyle,
axisLine: {
...mainTheme.axes.axisLine,
stroke: color,
},
tickLineStyle: {
...mainTheme.axes.tickLineStyle,
tickLine: {
...mainTheme.axes.tickLine,
stroke: color,
},
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "rm -rf './target' && tsc"
},
"devDependencies": {
"@elastic/eui": "27.4.1",
"@elastic/eui": "28.2.0",
"@kbn/plugin-helpers": "1.0.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "rm -rf './target' && tsc"
},
"devDependencies": {
"@elastic/eui": "27.4.1",
"@elastic/eui": "28.2.0",
"react": "^16.12.0",
"typescript": "4.0.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "rm -rf './target' && tsc"
},
"devDependencies": {
"@elastic/eui": "27.4.1",
"@elastic/eui": "28.2.0",
"@kbn/plugin-helpers": "1.0.0",
"react": "^16.12.0",
"typescript": "4.0.2"
Expand Down
2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
"@babel/runtime": "^7.11.2",
"@elastic/datemath": "5.0.3",
"@elastic/ems-client": "7.9.3",
"@elastic/eui": "27.4.1",
"@elastic/eui": "28.2.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.0",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ee73c59

Please sign in to comment.