Skip to content

Commit

Permalink
Eui/9.2.1 + better dark mode (elastic#32728)
Browse files Browse the repository at this point in the history
Updates EUI and makes some dark mode adjustments.
  • Loading branch information
snide committed Mar 14, 2019
1 parent df37222 commit 7a8a590
Show file tree
Hide file tree
Showing 21 changed files with 435 additions and 439 deletions.
637 changes: 316 additions & 321 deletions packages/kbn-ui-framework/dist/kui_dark.css

Large diffs are not rendered by default.

165 changes: 80 additions & 85 deletions packages/kbn-ui-framework/dist/kui_light.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// We apply brute force focus states to anything not coming from Eui
// which has focus states designed at the component level.
:focus {
&:not([class^="eui"]),
{
@include focus;
&:not([class^="eui"]) {
@include euiFocusRing;
}
}

Expand Down
3 changes: 1 addition & 2 deletions packages/kbn-ui-framework/src/kui_dark.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// EUI global scope is used for KUI variables till fully deprecated
@import '../../../node_modules/@elastic/eui/src/themes/k6/k6_globals';
@import '../../../node_modules/@elastic/eui/src/themes/k6/k6_colors_dark';
@import '../../../node_modules/@elastic/eui/src/themes/eui/eui_colors_dark';
@import '../../../node_modules/@elastic/eui/src/global_styling/functions/index';
@import '../../../node_modules/@elastic/eui/src/global_styling/variables/index';
@import '../../../node_modules/@elastic/eui/src/global_styling/mixins/index';
Expand Down
3 changes: 1 addition & 2 deletions packages/kbn-ui-framework/src/kui_light.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// EUI global scope is used for KUI variables till fully deprecated
@import '../../../node_modules/@elastic/eui/src/themes/k6/k6_globals';
@import '../../../node_modules/@elastic/eui/src/themes/k6/k6_colors_light';
@import '../../../node_modules/@elastic/eui/src/themes/eui/eui_colors_light';
@import '../../../node_modules/@elastic/eui/src/global_styling/functions/index';
@import '../../../node_modules/@elastic/eui/src/global_styling/variables/index';
@import '../../../node_modules/@elastic/eui/src/global_styling/mixins/index';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@
i18n-id="kbnVislibVisTypes.controls.gaugeOptions.addRangeTitle"
i18n-default-message="Add Range"
></div>
<div class="euiSpacer euiSpacer--s"></div>
<div
class="text text-center text-info"
class="euiFormHelpText"
i18n-id="kbnVislibVisTypes.controls.gaugeOptions.howToChangeColorsDescription"
i18n-default-message="Note: colors can be changed in the legend"
></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ test('renders DashboardCloneModal', () => {

test('onClone', () => {
createComponent();
findTestSubject(component, 'cloneConfirmButton', false).simulate('click');
findTestSubject(component, 'cloneConfirmButton').simulate('click');
sinon.assert.calledWith(onClone, 'dash title');
sinon.assert.notCalled(onClose);
});

test('onClose', () => {
createComponent();
findTestSubject(component, 'cloneCancelButton', false).simulate('click');
findTestSubject(component, 'cloneCancelButton').simulate('click');
sinon.assert.calledOnce(onClose);
sinon.assert.notCalled(onClone);
});
Expand All @@ -70,6 +70,6 @@ test('title', () => {
createComponent();
const event = { target: { value: 'a' } };
component.find('input').simulate('change', event);
findTestSubject(component, 'cloneConfirmButton', false).simulate('click');
findTestSubject(component, 'cloneConfirmButton').simulate('click');
sinon.assert.calledWith(onClone, 'a');
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import '@elastic/eui/src/components/tool_tip/variables';
@import '@elastic/eui/src/components/tool_tip/mixins';

.tvbVisTimeSeries {
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/server/sass/build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ it('builds dark themed SASS', async () => {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
background: #191919 url(./images/img.png) url(ui/assets/favicons/favicon.ico); }
background: #232635 url(./images/img.png) url(ui/assets/favicons/favicon.ico); }
/*# sourceMappingURL=... */"
`);
});
Expand Down Expand Up @@ -106,7 +106,7 @@ it('rewrites url imports', async () => {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
background: #191919 url(__REPLACE_WITH_PUBLIC_PATH__foo/bar/images/img.png) url(__REPLACE_WITH_PUBLIC_PATH__ui/favicons/favicon.ico); }
background: #232635 url(__REPLACE_WITH_PUBLIC_PATH__foo/bar/images/img.png) url(__REPLACE_WITH_PUBLIC_PATH__ui/favicons/favicon.ico); }
/*# sourceMappingURL=... */"
`);

Expand Down
24 changes: 12 additions & 12 deletions src/legacy/ui/public/styles/bootstrap/_colors_dark.less
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
//== Colors
//
//## Gray and brand colors for use across Bootstrap.
@white: #000;
@blue: #4DA1C0;
@white: #1D1E24;
@blue: #1BA9F5;

@brand-primary: #F5F5F5;
@brand-success: #017D73;
@brand-primary: #F5F7FA;
@brand-success: #7DE2D1;
@brand-info: @blue;
@brand-warning: #C06C4C;
@brand-danger: #BF4D4D;
@brand-warning: #FF977A;
@brand-danger: #FF6666;

@gray-base: #FFF;
@gray-darker: #F5F5F5;
@gray-darker: #F5F7FA;
@gray-dark: #ababab;
@gray5: #8A8A8A;
@gray: #444;
@gray-light: darken(#444, 9%);
@gray-lighter: #333;
@gray-lightest: #242424;
@gray5: #D4DAE5;
@gray: #535966;
@gray-light: darken(#535966, 9%);
@gray-lighter: #343741;
@gray-lightest: #25262E;
1 change: 1 addition & 0 deletions src/legacy/ui/public/vis/components/tooltip/_tooltip.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import '@elastic/eui/src/components/tool_tip/variables';
@import '@elastic/eui/src/components/tool_tip/mixins';

.visTooltip,
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/ui/public/vis/editors/default/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
.visEditorSidebar__indexPattern {
font-weight: $euiFontWeightBold;
padding: $euiSizeXS $euiSizeS;
background-color: shade($euiColorPrimary, 60%);
color: $euiColorGhost;
background-color: shadeOrTint($euiColorPrimary, 60%, 60%);
color: $euiColorEmptyShade;
line-height: $euiSizeL;
}

Expand Down
4 changes: 2 additions & 2 deletions src/legacy/ui/public/vis/editors/default/agg_add.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div ng-show="add.form">
<div ng-show="add.form" class="form-group">
<label
i18n-id="common.ui.vis.editors.aggAdd.selectGroupTypeLabel"
i18n-default-message="Select {groupNameLabel} type"
i18n-values="{ groupNameLabel }"
>
</label>
<ul class="form-group list-group list-group-menu">
<ul class="list-group list-group-menu">
<li
tabindex="0"
id="aggSchemaListItem-{{$index}}"
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/ui/ui_render/views/ui_app.pug
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ block content
width: 100%;
height: 100%;
margin: 0;
background-color: #F5F7FA;
background-color: #{darkMode ? '#25262E' : '#F5F7FA'};
}
.kibanaWelcomeView {
background-color: #{darkMode ? '#242424' : '#F5F7FA'};
background-color: #{darkMode ? '#25262E' : '#F5F7FA'};
}

.kibanaWelcomeTitle {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/dashboard_snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function ({ getService, getPageObjects, updateBaselines }) {
describe('dashboard snapshots', function describeIndexTests() {
before(async function () {
// We use a really small window to minimize differences across os's and browsers.
await browser.setWindowSize(1000, 500);
await browser.setWindowSize(1000, 700);
});

after(async function () {
Expand Down
Binary file modified test/functional/screenshots/baseline/area_chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import '@elastic/eui/src/components/tool_tip/variables';
@import '@elastic/eui/src/components/tool_tip/mixins';

.tooltipAnnotation {
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1060,10 +1060,17 @@
tabbable "^1.1.0"
uuid "^3.1.0"

<<<<<<< HEAD
"@elastic/[email protected]":
version "9.4.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-9.4.0.tgz#e5f83c612674fc6f59e990f557e563be1409d25e"
integrity sha512-cQnsU3UeQ1s6F427vY53lzlh7mvNoPmIvPL24B5jH3JYaWULhIL1xSJXJgDSOSdrdHCxkXDD9Q8Y7256x4Xf4Q==
=======
"@elastic/[email protected]":
version "9.2.1"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-9.2.1.tgz#3860a7219f0ee8f33ec43447edb2eda3c96a00a7"
integrity sha512-U92s0nh6vBS6NBiHDCq6e+49Dam8It+Iy81b2NProf1OIRk/nB0RE781x6zgUzmOFpJ1T0xiThWiiDP776v0LQ==
>>>>>>> 3ada0259cc... Eui/9.2.1 + better dark mode (#32728)
dependencies:
"@types/lodash" "^4.14.116"
"@types/numeral" "^0.0.25"
Expand Down

0 comments on commit 7a8a590

Please sign in to comment.