Skip to content
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

EUI: Reset CSS #15486

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
37a5731
Autoload eui_theme_light.css.
cjcenizal Nov 12, 2017
4903b95
Remove naked element selectors from base.less.
cjcenizal Jul 20, 2017
cb4dd16
Remove Bootstrap resets.
cjcenizal Jul 19, 2017
445c4cb
Remove UI Framework reset.
cjcenizal Nov 13, 2017
4736b6f
Remove unused reset styles from UI Framework.
cjcenizal Nov 15, 2017
ba8c345
Replace usage of sr-only with euiScreenReaderOnly.
cjcenizal Nov 23, 2017
6df7ec0
Apply euiButtonEmpty classes to the 'Add a filter' button.
cjcenizal Nov 23, 2017
d67192f
Fix Notification padding and layout.
cjcenizal Nov 23, 2017
cf5c6a2
Apply euiTabs styles to Timepicker mode tabs.
cjcenizal Nov 23, 2017
c88650e
Fix layout of Available Fields heading in Discover.
cjcenizal Nov 23, 2017
4e50801
Add padding to Popular Fields container in Discover.
cjcenizal Nov 23, 2017
c57df5b
Push down Selected Fields heading in Discover sidebar.
cjcenizal Nov 23, 2017
db9408d
Fix appearance of links in Discover sidebar.
cjcenizal Nov 23, 2017
01e5f66
Fix height of pills in Filter Bar.
cjcenizal Nov 23, 2017
180d2a4
Add support for using dark theme EUI CSS in Dashboard.
cjcenizal Dec 6, 2017
11f27ac
Remove commented-out CSS import.
cjcenizal Dec 6, 2017
f68781f
Set light theme as the default.
cjcenizal Dec 6, 2017
700017d
Fix bug with style-loader by using raw-loader and innerHTML to set th…
cjcenizal Dec 7, 2017
032368c
Remove commented-out code.
cjcenizal Dec 7, 2017
41bf847
Add comments to chrome.jade about role of theme node.
cjcenizal Dec 7, 2017
6bb72a5
Add XSS note to themes.js.
cjcenizal Dec 7, 2017
6bca9e9
EUI css reset fixes
snide Dec 12, 2017
acb6de0
Add EUI v0.0.5 as a dependency.
cjcenizal Dec 13, 2017
536e5a9
Label fix for EUI regression (#15605)
snide Dec 14, 2017
ecba3f8
Upgrade to EUI v0.0.6. Fix linting errors.
cjcenizal Dec 15, 2017
a3ce294
Add (WTFPL OR MIT) to acceptable licenses.
cjcenizal Dec 15, 2017
8c43cf4
Use cssText instead of innerHTML to set theme styles.
cjcenizal Dec 15, 2017
f91b40e
Set dark theme CSS string instead of an array containing the string.
cjcenizal Dec 15, 2017
aa6b14d
Fix linting error.
cjcenizal Dec 15, 2017
464ebc7
Remove kbn-accessible-click from timepicker buttons.
cjcenizal Dec 15, 2017
8fd6a73
Fix tests for timepicker.
cjcenizal Dec 15, 2017
e132de4
Fix tests for timepicker... again.
cjcenizal Dec 16, 2017
5c2751c
Set quiet temporarily to false.
cjcenizal Dec 16, 2017
f728530
Experiment: downgrade to 0.0.5 to see if tests pass.
cjcenizal Dec 17, 2017
407fd24
Experiment: downgrade to 0.0.3 to see if tests pass.
cjcenizal Dec 17, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
},
"dependencies": {
"@elastic/datemath": "2.3.0",
"@elastic/eui": "0.0.3",
"@elastic/filesaver": "1.1.2",
"@elastic/numeral": "2.3.1",
"@elastic/test-subj-selector": "0.2.1",
Expand All @@ -96,7 +97,7 @@
"babel-plugin-transform-async-generator-functions": "6.24.1",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-define": "1.3.0",
"babel-plugin-transform-object-rest-spread": "6.23.0",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-polyfill": "6.20.0",
"babel-preset-env": "1.4.0",
"babel-preset-react": "6.22.0",
Expand Down
66 changes: 32 additions & 34 deletions src/core_plugins/console/public/src/directives/help.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
<h2 class="kuiLocalDropdownTitle">Help</h2>
<h2 class="euiTitle">Help</h2>

<tabset>
<tab heading="Request format">
<div class="list-group-item list-group-item--noBorder">
<div class="euiSpacer euiSpacer--m"></div>

<div class="euiPanel euiPanel--paddingLarge">
<div class="euiFlexGroup euiFlexGroup--gutterExtraLarge">
<div class="euiFlexItem">
<h2 class="euiTitle">Request format</h2>
<div class="euiSpacer euiSpacer--l"></div>
You can type one or more requests in the white editor. Console understands requests in a compact format:
<sense-help-example></sense-help-example>
</div>
</tab>
<tab heading="Keyboard tips">
<div class="list-group-item list-group-item--noBorder">
<dl class="dl-horizontal">
<dt></dt>
<dd><strong>General editing</strong></dd>
<dt>Ctrl/Cmd + I</dt>
<dd>Auto indent current request</dd>
<dt>Ctrl + Space</dt>
<dd>Open Auto complete (even if not typing)</dd>
<dt>Ctrl/Cmd + Enter</dt>
<dd>Submit request</dd>
<dt>Ctrl/Cmd + Up/Down</dt>
<dd>Jump to the previous/next request start or end.</dd>
<dt>Ctrl/Cmd + Alt + L</dt>
<dd>Collapse/expand current scope.</dd>
<dt>Ctrl/Cmd + Option + 0</dt>
<dd>Collapse all scopes but the current one. Expand by adding a shift.</dd>
</dl>
<dl class="dl-horizontal">
<dt></dt>
<dd><strong>When auto-complete is visible</strong></dd>
<dt>Down arrow</dt>
<dd>Switch focus to auto-complete menu. Use arrows to further select a term</dd>
<dt>Enter/Tab</dt>
<dd>Select the currently selected or the top most term in auto-complete menu</dd>
<dt>Esc</dt>
<dd>Close auto-complete menu</dd>
<div class="euiFlexItem">
<h2 class="euiTitle">Keyboard commands</h2>
<div class="euiSpacer euiSpacer--l"></div>
<dl class="euiDescriptionList euiDescriptionList--row euiDescriptionList--compressed">
<dt class="euiDescriptionList__title">Ctrl/Cmd + I</dt>
<dd class="euiDescriptionList__description">Auto indent current request</dd>
<dt class="euiDescriptionList__title">Ctrl + Space</dt>
<dd class="euiDescriptionList__description">Open Auto complete (even if not typing)</dd>
<dt class="euiDescriptionList__title">Ctrl/Cmd + Enter</dt>
<dd class="euiDescriptionList__description">Submit request</dd>
<dt class="euiDescriptionList__title">Ctrl/Cmd + Up/Down</dt>
<dd class="euiDescriptionList__description">Jump to the previous/next request start or end.</dd>
<dt class="euiDescriptionList__title">Ctrl/Cmd + Alt + L</dt>
<dd class="euiDescriptionList__description">Collapse/expand current scope.</dd>
<dt class="euiDescriptionList__title">Ctrl/Cmd + Option + 0</dt>
<dd class="euiDescriptionList__description">Collapse all scopes but the current one. Expand by adding a shift.</dd>
<dt class="euiDescriptionList__title">Down arrow</dt>
<dd class="euiDescriptionList__description">Switch focus to auto-complete menu. Use arrows to further select a term</dd>
<dt class="euiDescriptionList__title">Enter/Tab</dt>
<dd class="euiDescriptionList__description">Select the currently selected or the top most term in auto-complete menu</dd>
<dt class="euiDescriptionList__title">Esc</dt>
<dd class="euiDescriptionList__description">Close auto-complete menu</dd>
</dl>
</div>
</tab>
</tabset>
</div>
</div>
70 changes: 37 additions & 33 deletions src/core_plugins/console/public/src/directives/welcome.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
<h2 class="kuiLocalDropdownTitle">Welcome to Console</h2>

<p><strong>Quick intro to the UI</strong></p>

<p>The Console UI is split into two panes: an editor pane (left) and a response pane (right).
Use the editor to type requests and submit them to Elasticsearch. The results will be displayed in
the response pane on the right side.
</p>

<p>Console understands requests in a compact format, similar to cURL:
<sense-help-example></sense-help-example>

<p>While typing a request, Console will make suggestions which you can then accept by hitting Enter/Tab.
These suggestions are made based on the request structure <i>as well as</i> your indices and types.
</p>

<p><strong>A few quick tips, while I have your attention</strong></p>
<ul>
<li>Submit requests to ES using the green triangle button.</li>
<li>Use the wrench menu for other useful things.</li>
<li>You can paste requests in cURL format and they will be translated to the Console syntax.</li>
<li>You can resize the editor and output panes by dragging the separator between them.</li>
<li>Study the keyboard shortcuts under the Help button. Good stuff in there!</li>
</ul>

<button
type="button"
class="kuiButton kuiButton--primary"
data-test-subj="help-close-button"
ng-click="kbnTopNav.close()"
>
Get to work
</button>
<div class="euiText">

<h2>Welcome to Console</h2>

<p><strong>Quick intro to the UI</strong></p>

<p>The Console UI is split into two panes: an editor pane (left) and a response pane (right).
Use the editor to type requests and submit them to Elasticsearch. The results will be displayed in
the response pane on the right side.
</p>

<p>Console understands requests in a compact format, similar to cURL:
<sense-help-example></sense-help-example>

<p>While typing a request, Console will make suggestions which you can then accept by hitting Enter/Tab.
These suggestions are made based on the request structure <i>as well as</i> your indices and types.
</p>

<p><strong>A few quick tips, while I have your attention</strong></p>
<ul>
<li>Submit requests to ES using the green triangle button.</li>
<li>Use the wrench menu for other useful things.</li>
<li>You can paste requests in cURL format and they will be translated to the Console syntax.</li>
<li>You can resize the editor and output panes by dragging the separator between them.</li>
<li>Study the keyboard shortcuts under the Help button. Good stuff in there!</li>
</ul>

<button
type="button"
class="kuiButton kuiButton--primary"
data-test-subj="help-close-button"
ng-click="kbnTopNav.close()"
>
Get to work
</button>

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
class="kuiButton kuiButton--primary kuiButton--fullWidth">
Add Range
</div>
<div class="euiSpacer euiSpacer--s"></div>
<div class="text text-center text-info">Note: colors can be changed in the legend</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
>
Add Range
</button>
<div class="euiSpacer euiSpacer--s"></div>
<div class="text text-center text-info">Note: colors can be changed in the legend</div>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/core_plugins/kibana/public/dashboard/dashboard_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import _ from 'lodash';
import angular from 'angular';
import { uiModules } from 'ui/modules';
import chrome from 'ui/chrome';
import { applyTheme } from 'ui/theme';

import 'ui/query_bar';

Expand Down Expand Up @@ -329,11 +330,13 @@ app.directive('dashboardApp', function ($injector) {
function setDarkTheme() {
chrome.removeApplicationClass(['theme-light']);
chrome.addApplicationClass('theme-dark');
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing this is still needed because dashboard is a combination of non-eui elements and eui elements, so for the time being we keep both dark theme applications around?

Copy link
Contributor Author

@cjcenizal cjcenizal Dec 14, 2017

Choose a reason for hiding this comment

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

Correct. KUI and EUI will live side-by-side as we gradually convert our UI to depend upon EUI.

applyTheme('dark');
}

function setLightTheme() {
chrome.removeApplicationClass(['theme-dark']);
chrome.addApplicationClass('theme-light');
applyTheme('light');
}

if ($route.current.params && $route.current.params[DashboardConstants.NEW_VISUALIZATION_ID_PARAM]) {
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/kibana/public/dashboard/styles/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
.start-screen {
margin: 20px auto;
max-width: 800px;
background: tint(@globalColorBlue, 90%);
background: #FFF;
padding: 40px;
border-radius: 4px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
></bread-crumbs>

<!-- Tabs. -->
<div data-transclude-slot="bottomRow" class="kuiLocalTabs" role="tablist">
<div data-transclude-slot="bottomRow" class="euiTabs" role="tablist">
<a
role="tab"
aria-selected="{{kbnDevToolsApp.currentPath === item.url}}"
ng-repeat="item in kbnDevToolsApp.devTools"
class="kuiLocalTab"
ng-class="{'kuiLocalTab-isSelected': kbnDevToolsApp.currentPath === item.url}"
class="euiTab"
ng-class="{'euiTab-isSelected': kbnDevToolsApp.currentPath === item.url}"
kbn-href="{{::item.url}}"
>
{{::item.display}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
</div>

<div class="sidebar-list-header">
<div class="discover-sidebar-list-header sidebar-list-header">
<h3 class="sidebar-list-header-label" id="selected_fields" tabindex="0">Selected Fields</h3>
</div>
<ul class="list-unstyled discover-selected-fields" >
Expand All @@ -40,15 +40,25 @@ <h3 class="sidebar-list-header-label" id="selected_fields" tabindex="0">Selected
</discover-field>
</ul>

<div class="sidebar-list-header sidebar-item">
<h3 class="sidebar-list-header-label" id="available_fields" tabindex="0">Available Fields
<span
ng-class="{ 'fa-chevron-right': !showFields, 'fa-chevron-down': showFields }"
<div class="sidebar-list-header sidebar-item euiFlexGroup euiFlexGroup--gutterMedium">
<h3 class="euiFlexItem sidebar-list-header-label" id="available_fields" tabindex="0">
Available Fields
</h3>

<div class="euiFlexItem euiFlexItem--flexGrowZero">
<button
ng-click="showFields = !showFields"
aria-hidden="true"
class="fa visible-xs visible-sm pull-right field-collapse-toggle"
></span>

class="kuiButton kuiButton--small visible-xs visible-sm pull-right field-collapse-toggle"
>
<span
aria-hidden="true"
class="kuiIcon"
ng-class="{ 'fa-chevron-right': !showFields, 'fa-chevron-down': showFields }"
></span>
</button>
</div>
<div class="euiFlexItem euiFlexItem--flexGrowZero">
<button
type="button"
ng-class="{ 'kuiButton--basic': !filter.active, 'kuiButton--primary': filter.active, 'hidden-xs': !showFields, 'hidden-sm': !showFields }"
Expand All @@ -60,7 +70,7 @@ <h3 class="sidebar-list-header-label" id="available_fields" tabindex="0">Availab
>
<span aria-hidden="true" class="kuiIcon fa-gear"></span>
</button>
</h3>
</div>
</div>

<div class="sidebar-item discover-field-details" ng-show="showFilter" id="discoverFieldFilter">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<div class="discover-field-details">
<div class="kuiVerticalRhythmSmall">
<p class="kuiSubduedText" ng-show="!field.details.error">
<p class="euiText euiText--extraSmall euiTextColor--subdued" ng-show="!field.details.error">
Top 5 values in
<span ng-if="!field.details.error">
<a
href=""
class="kuiLink"
kbn-accessible-click
ng-show="!field.indexPattern.metaFields.includes(field.name) && !field.scripted"
ng-click="onAddFilter('_exists_', field.name, '+')">
{{::field.details.exists}}
Expand All @@ -19,7 +20,7 @@

<div class="clearfix"></div>

<div ng-if="field.details.error" class="discover-field-details-error">{{field.details.error}}</div>
<div ng-if="field.details.error" class="euiText euiText--extraSmall euiTextColor--subdued">{{field.details.error}}</div>

<div ng-if="!field.details.error">
<div ng-repeat="bucket in ::field.details.buckets" class="discover-field-details-item">
Expand Down
5 changes: 4 additions & 1 deletion src/core_plugins/kibana/public/discover/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ <h1 tabindex="0" id="kui_local_breadcrumb" class="kuiLocalBreadcrumb">
<!-- loading -->
<div ng-show="resultState === 'loading'">
<div class="discover-overlay">
<h2>Searching</h2>
<div class="euiTitle">
<h2>Searching</h2>
</div>
<div class="euiSpacer euiSpacer--m"></div>
<div ng-show="fetchStatus">{{fetchStatus.complete}}/{{fetchStatus.total}}</div>
</div>
</div>
Expand Down
60 changes: 43 additions & 17 deletions src/core_plugins/kibana/public/discover/partials/no_results.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div>
<div class="col-md-10 col-md-offset-1" data-test-subj="discoverNoResults">
<div class="euiPage">

<div class="euiText" data-test-subj="discoverNoResults">

<h1>No results found <i aria-hidden="true" class="fa fa-meh-o"></i></h1>

Expand Down Expand Up @@ -63,21 +64,46 @@ <h3>
The search bar at the top uses Elasticsearch's support for Lucene <a class="kuiLink" documentation-href="query.luceneQuerySyntax" target="_blank" rel="noopener noreferrer">Query String syntax</a>. Let's say we're searching web server logs that have been parsed into a few fields.
</p>

<h4>Examples:</h4>
Find requests that contain the number 200, in any field:
<pre>200</pre>

Or we can search in a specific field. Find 200 in the status field:
<pre>status:200</pre>

Find all status codes between 400-499:
<pre>status:[400 TO 499]</pre>

Find status codes 400-499 with the extension php:
<pre>status:[400 TO 499] AND extension:PHP</pre>

Or HTML
<pre>status:[400 TO 499] AND (extension:php OR extension:html)</pre>
<h4>Examples</h4>

<p>Find requests that contain the number 200, in any field:</p>
<div class="euiCodeBlock euiCodeBlock--light euiCodeBlock--paddingSmall">
<code class="euiCodeBlock__code">
<pre class="euiCodeBlock__pre">200</pre>
</code>
</div>
<div class="euiSpacer euiSpacer--l"></div>

<p>Or we can search in a specific field. Find 200 in the status field:</p>
<div class="euiCodeBlock euiCodeBlock--light euiCodeBlock--paddingSmall">
<code class="euiCodeBlock__code">
<pre class="euiCodeBlock__pre">status:200</pre>
</code>
</div>
<div class="euiSpacer euiSpacer--l"></div>

<p>Find all status codes between 400-499:</p>
<div class="euiCodeBlock euiCodeBlock--light euiCodeBlock--paddingSmall">
<code class="euiCodeBlock__code">
<pre class="euiCodeBlock__pre">status:[400 TO 499]</pre>
</code>
</div>
<div class="euiSpacer euiSpacer--l"></div>

<p>Find status codes 400-499 with the extension php:</p>
<div class="euiCodeBlock euiCodeBlock--light euiCodeBlock--paddingSmall">
<code class="euiCodeBlock__code">
<pre class="euiCodeBlock__pre">status:[400 TO 499] AND extension:PHP</pre>
</code>
</div>
<div class="euiSpacer euiSpacer--l"></div>

<p>Or HTML</p>
<div class="euiCodeBlock euiCodeBlock--light euiCodeBlock--paddingSmall">
<code class="euiCodeBlock__code">
<pre class="euiCodeBlock__pre">status:[400 TO 499] AND (extension:php OR extension:html)</pre>
</code>
</div>
</div>

</div>
Expand Down
Loading