forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Context Log highlighting and UI. (#1)
* Move ContextLoadingButtons out of header into Context view. * Add kuiButton--iconText modifier to ContextLoadingButtons. * Use style guide color for highlighted Context Log row. * Add Bar component. Use Bar to surface entry-pagination controls in Context Log. Refactor ContextSizePicker directive to surface a single input without surrounding text. * Use Panel component to present loading feedback and table within Context app. * Remove fading effect from truncated doc table rows, because it doesn't work with highlighted backgrounds. It also looks weird. * Move bar component to match elastic#9803 * Update ui framework css bundle * Move getter/setter into the size-picker * Remove superfluous loading-button styling
- Loading branch information
1 parent
02440e8
commit cb4d95f
Showing
25 changed files
with
326 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,91 @@ | ||
<div class="app-container"> | ||
<div class="kuiLocalNav"> | ||
<div class="kuiLocalNavRow"> | ||
<div class="kuiLocalNavRow__section"> | ||
<div class="kuiLocalBreadcrumbs"> | ||
<div class="kuiLocalBreadcrumb"> | ||
<a class="kuiLocalBreadcrumb__link" href="#/discover">Discover</a> | ||
</div> | ||
<div class="kuiLocalBreadcrumb" ng-bind="contextApp.state.queryParameters.indexPattern.id"></div> | ||
<div class="kuiLocalNav"> | ||
<div class="kuiLocalNavRow"> | ||
<div class="kuiLocalNavRow__section"> | ||
<div class="kuiLocalBreadcrumbs"> | ||
<div class="kuiLocalBreadcrumb"> | ||
<a class="kuiLocalBreadcrumb__link" href="#/discover">Discover</a> | ||
</div> | ||
</div> | ||
<div class="kuiLocalNavRow__section"> | ||
<context-size-picker | ||
predecessor-count="contextApp.state.queryParameters.predecessorCount" | ||
successor-count="contextApp.state.queryParameters.successorCount" | ||
set-predecessor-count="contextApp.actions.fetchGivenPredecessorRows" | ||
set-successor-count="contextApp.actions.fetchGivenSuccessorRows" | ||
/> | ||
<div class="kuiLocalBreadcrumb" ng-bind="contextApp.state.queryParameters.indexPattern.id"></div> | ||
</div> | ||
</div> | ||
<div class="kuiLocalNavRow kuiLocalNavRow--secondary"> | ||
<div class="kuiLocalTabs"> | ||
<div class="kuiLocalTab kuiLocalTab-isSelected" ng-bind-template="Context of {{ contextApp.state.queryParameters.anchorUid }}"></div> | ||
</div> | ||
</div> | ||
<div class="kuiLocalNavRow kuiLocalNavRow--secondary"> | ||
<div class="kuiLocalTabs"> | ||
<div class="kuiLocalTab kuiLocalTab-isSelected" ng-bind-template="Context of {{ contextApp.state.queryParameters.anchorUid }}"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="container-fluid" role="main"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<context-loading-button | ||
disabled="contextApp.derivedState.isLoadingPredecessorRows()" | ||
icon="'fa-chevron-up'" | ||
ng-click="contextApp.actions.fetchMorePredecessorRows()" | ||
ng-if="!contextApp.derivedState.isLoadingAnchorRow()" | ||
> | ||
Load newer entries | ||
</context-loading-button> | ||
</div> | ||
<div class="kuiViewContent kuiViewContentItem" role="main"> | ||
<!-- Controls --> | ||
<div class="kuiBar kuiVerticalRhythm"> | ||
<div class="kuiBarSection"> | ||
<context-loading-button | ||
disabled="contextApp.derivedState.isLoadingPredecessorRows()" | ||
icon="'fa-chevron-up'" | ||
ng-click="contextApp.actions.fetchMorePredecessorRows()" | ||
ng-if="!contextApp.derivedState.isLoadingAnchorRow()" | ||
> | ||
Load newer entries | ||
</context-loading-button> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="discover-overlay" ng-if="contextApp.derivedState.isLoadingAnchorRow()"> | ||
<h2>Loading...</h2> | ||
</div> | ||
<div class="discover-table" ng-if="!contextApp.derivedState.isLoadingAnchorRow()" fixed-scroll> | ||
<doc-table | ||
hits="contextApp.derivedState.rows()" | ||
index-pattern="contextApp.state.queryParameters.indexPattern" | ||
sorting="contextApp.state.queryParameters.sort" | ||
columns="contextApp.state.queryParameters.columns" | ||
infinite-scroll="true" | ||
> | ||
</doc-table> | ||
</div> | ||
</div> | ||
|
||
<div class="kuiBarSection"> | ||
<div>Limit to</div> | ||
<context-size-picker | ||
count="contextApp.state.queryParameters.predecessorCount" | ||
set-count="contextApp.actions.fetchGivenPredecessorRows" | ||
></context-size-picker> | ||
<div>newer entries</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<context-loading-button | ||
disabled="contextApp.derivedState.isLoadingSuccessorRows()" | ||
icon="'fa-chevron-down'" | ||
ng-click="contextApp.actions.fetchMoreSuccessorRows()" | ||
ng-if="!contextApp.derivedState.isLoadingAnchorRow()" | ||
> | ||
Load older entries | ||
</context-loading-button> | ||
</div> | ||
</div> | ||
|
||
<!-- Loading feedback --> | ||
<div | ||
ng-if="contextApp.derivedState.isLoadingAnchorRow()" | ||
class="kuiPanel kuiPanel--centered kuiVerticalRhythm" | ||
> | ||
<div class="kuiLoadingItems"> | ||
Loading… | ||
</div> | ||
</div> | ||
|
||
<!-- Table --> | ||
<div | ||
ng-if="!contextApp.derivedState.isLoadingAnchorRow()" | ||
class="kuiPanel kuiVerticalRhythm" | ||
> | ||
<div class="discover-table" fixed-scroll> | ||
<doc-table | ||
hits="contextApp.derivedState.rows()" | ||
index-pattern="contextApp.state.queryParameters.indexPattern" | ||
sorting="contextApp.state.queryParameters.sort" | ||
columns="contextApp.state.queryParameters.columns" | ||
infinite-scroll="true" | ||
></doc-table> | ||
</div> | ||
</div> | ||
|
||
<!-- Controls --> | ||
<div class="kuiBar kuiVerticalRhythm"> | ||
<div class="kuiBarSection"> | ||
<context-loading-button | ||
disabled="contextApp.derivedState.isLoadingSuccessorRows()" | ||
icon="'fa-chevron-down'" | ||
ng-click="contextApp.actions.fetchMoreSuccessorRows()" | ||
ng-if="!contextApp.derivedState.isLoadingAnchorRow()" | ||
> | ||
Load older entries | ||
</context-loading-button> | ||
</div> | ||
|
||
<div class="kuiBarSection"> | ||
<div>Limit to</div> | ||
<context-size-picker | ||
count="contextApp.state.queryParameters.successorCount" | ||
set-count="contextApp.actions.fetchGivenSuccessorRows" | ||
></context-size-picker> | ||
<div>older entries</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/core_plugins/kibana/public/context/components/loading_button/loading_button.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/core_plugins/kibana/public/context/components/loading_button/loading_button.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
src/core_plugins/kibana/public/context/components/loading_button/loading_button.less
This file was deleted.
Oops, something went wrong.
22 changes: 6 additions & 16 deletions
22
src/core_plugins/kibana/public/context/components/size_picker/size_picker.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,6 @@ | ||
<div class="contextSizePicker"> | ||
<input | ||
class="kuiTextInput contextSizePicker__item contextSizePicker__sizeInput" | ||
ng-model-options="{updateOn: 'change', getterSetter: true, debounce: 200}" | ||
ng-model="vm.getOrSetPredecessorCount" | ||
type="number" | ||
/> | ||
<div class="contextSizePicker__item">newer and</div> | ||
<input | ||
class="kuiTextInput contextSizePicker__item contextSizePicker__sizeInput" | ||
ng-model-options="{updateOn: 'change', getterSetter: true, debounce: 200}" | ||
ng-model="vm.getOrSetSuccessorCount" | ||
type="number" | ||
/> | ||
<div class="contextSizePicker__item">older entries</div> | ||
</div> | ||
<input | ||
class="kuiTextInput contextSizePicker" | ||
ng-model-options="{updateOn: 'change', getterSetter: true, debounce: 200}" | ||
ng-model="vm.getOrSetCount" | ||
type="number" | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 11 additions & 17 deletions
28
src/core_plugins/kibana/public/context/components/size_picker/size_picker.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
/** | ||
* 1. Hide increment and decrement buttons for type="number" input. | ||
*/ | ||
.contextSizePicker { | ||
padding-right: 10px; | ||
height: 100%; | ||
} | ||
appearance: textfield; | ||
text-align: center; | ||
width: 3em; | ||
|
||
.contextSizePicker__item { | ||
display: inline-block; | ||
} | ||
|
||
.contextSizePicker__sizeInput { | ||
appearance: textfield; | ||
text-align: center; | ||
width: 3em; | ||
|
||
&::-webkit-outer-spin-button, | ||
&::-webkit-inner-spin-button { | ||
appearance: none; | ||
margin: 0; | ||
} | ||
&::-webkit-outer-spin-button, | ||
&::-webkit-inner-spin-button { | ||
appearance: none; /* 1 */ | ||
margin: 0; /* 1 */ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,3 @@ | ||
@import (reference) "~ui/styles/variables"; | ||
|
||
@truncate1: fade(@truncate-color, 0%); | ||
@truncate2: fade(@truncate-color, 1%); | ||
@truncate3: fade(@truncate-color, 99%); | ||
@truncate4: fade(@truncate-color, 100%); | ||
|
||
.truncate-by-height { | ||
position: relative; | ||
overflow: hidden; | ||
|
||
&:before { | ||
content: " "; | ||
width: 100%; | ||
height: 15px; // copied into index.html! | ||
position: absolute; | ||
left: 0; | ||
|
||
// FF3.6+ | ||
background: -moz-linear-gradient(top, @truncate1 0%, @truncate2 1%, @truncate3 99%, @truncate4 100%); | ||
|
||
// Chrome,Safari4+ | ||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @truncate1), color-stop(1%, @truncate2), color-stop(99%, @truncate3), color-stop(100%, @truncate4)); | ||
|
||
// Chrome10+,Safari5.1+ | ||
background: -webkit-linear-gradient(top, @truncate1 0%, @truncate2 1%, @truncate3 99%, @truncate4 100%); | ||
|
||
// Opera 11.10+ | ||
background: -o-linear-gradient(top, @truncate1 0%, @truncate2 1%, @truncate3 99%, @truncate4 100%); | ||
|
||
// IE10+ | ||
background: -ms-linear-gradient(top, @truncate1 0%, @truncate2 1%, @truncate3 99%, @truncate4 100%); | ||
|
||
// W3C | ||
background: linear-gradient(to bottom, @truncate1 0%, @truncate2 1%, @truncate3 99%, @truncate4 100%); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.kuiBar { | ||
@include bar; | ||
} | ||
|
||
.kuiBarSection { | ||
@include barSection; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "bar"; |
Oops, something went wrong.