diff --git a/src/legacy/core_plugins/kibana/public/discover/__tests__/directives/field_chooser.js b/src/legacy/core_plugins/kibana/public/discover/__tests__/directives/field_chooser.js index f74e14586547..0489de0e8e1e 100644 --- a/src/legacy/core_plugins/kibana/public/discover/__tests__/directives/field_chooser.js +++ b/src/legacy/core_plugins/kibana/public/discover/__tests__/directives/field_chooser.js @@ -138,7 +138,7 @@ describe('discover field chooser directives', function() { describe('Field listing', function() { it('should have Selected Fields, Fields and Popular Fields sections', function() { - const headers = $elem.find('.sidebar-list-header'); + const headers = $elem.find('[data-test-subj="discover-sidebar-list-header"]'); expect(headers.length).to.be(3); }); @@ -168,7 +168,9 @@ describe('discover field chooser directives', function() { it('should show the popular fields header if there are popular fields', function() { const section = getSections($elem); expect(section.popular.hasClass('ng-hide')).to.be(false); - expect(section.popular.find('li:not(.sidebar-list-header)').length).to.be.above(0); + expect( + section.popular.find('li:not([data-test-subj="discover-sidebar-list-header"])').length + ).to.be.above(0); }); it('should not show the popular fields if there are not any', function() { @@ -190,7 +192,9 @@ describe('discover field chooser directives', function() { $scope.$digest(); expect(section.popular.hasClass('ng-hide')).to.be(true); - expect(section.popular.find('li:not(.sidebar-list-header)').length).to.be(0); + expect( + section.popular.find('li:not([data-test-subj="discover-sidebar-list-header"])').length + ).to.be(0); }); it('should move the field into selected when it is added to the columns array', function() { diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/_discover.scss b/src/legacy/core_plugins/kibana/public/discover/np_ready/_discover.scss index 764dd4d2280d..07f598dce377 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/_discover.scss +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/_discover.scss @@ -8,10 +8,6 @@ flex-direction: column; height: 100%; overflow: hidden; - - .sidebar-container { - background-color: transparent; - } } .dscApp__header { diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/_index.scss b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/_index.scss index 2bfc74ffa027..d4b365547b40 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/_index.scss +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/_index.scss @@ -1,3 +1,2 @@ @import 'no_results'; @import 'histogram'; -@import './collapsible_sidebar/index'; diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/collapsible_sidebar/_collapsible_sidebar.scss b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/collapsible_sidebar/_collapsible_sidebar.scss deleted file mode 100644 index 5840ebc92578..000000000000 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/collapsible_sidebar/_collapsible_sidebar.scss +++ /dev/null @@ -1,45 +0,0 @@ -// SASSTODO: Can't rename main class -// because it's also the name of the angular directive -.collapsible-sidebar { - .kbnCollapsibleSidebar__collapseButton { - position: absolute; - top: 0; - right: -21px; - cursor: pointer; - z-index: 1; - } - - &.closed { - width: 0 !important; - border-right-width: 0; - border-left-width: 0; - - > * { - visibility: hidden; - } - - .kbnCollapsibleSidebar__collapseButton { - visibility: visible; - - .chevron-cont:before { - content: '\F138'; - } - } - } -} - -.visEditor__content .collapsible-sidebar { - position: relative; -} - -@include euiBreakpoint('xs', 's', 'm') { - .collapsible-sidebar { - &.closed { - display: none; - } - - .kbnCollapsibleSidebar__collapseButton { - display: none; - } - } -} diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/collapsible_sidebar/_index.scss b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/collapsible_sidebar/_index.scss index 1409920d11aa..c408c8750111 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/collapsible_sidebar/_index.scss +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/collapsible_sidebar/_index.scss @@ -1,2 +1 @@ @import 'depth'; -@import 'collapsible_sidebar'; diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/components/discover_grid/discover_grid.tsx b/src/legacy/core_plugins/kibana/public/discover/np_ready/components/discover_grid/discover_grid.tsx index f1210cc2382f..cb2b9c0e441b 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/components/discover_grid/discover_grid.tsx +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/components/discover_grid/discover_grid.tsx @@ -137,7 +137,7 @@ export const DiscoverGrid = React.memo(function DiscoverGridInner({ onAddColumn, }: Props) { const actionColumnId = 'uniqueString'; // TODO should be guaranteed unique... - const lowestPageSize = 50; + const lowestPageSize = 500; const timeString = i18n.translate('kbn.discover.timeLabel', { defaultMessage: 'Time', }); @@ -338,7 +338,7 @@ export const DiscoverGrid = React.memo(function DiscoverGridInner({ ...pagination, onChangeItemsPerPage, onChangePage, - pageSizeOptions: [lowestPageSize, 100, 500], + pageSizeOptions: [lowestPageSize], }} toolbarVisibility={{ showColumnSelector: false, diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/components/field_chooser/field_chooser.html b/src/legacy/core_plugins/kibana/public/discover/np_ready/components/field_chooser/field_chooser.html index 1c7435ad794a..e406f17d682e 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/components/field_chooser/field_chooser.html +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/components/field_chooser/field_chooser.html @@ -1,6 +1,8 @@ -
+
-
- +
@@ -25,6 +23,7 @@ tabindex="0" i18n-id="kbn.discover.fieldChooser.filter.selectedFieldsTitle" i18n-default-message="Selected fields" + data-test-subj="discover-sidebar-list-header" > -
diff --git a/test/functional/page_objects/discover_page.js b/test/functional/page_objects/discover_page.js index 5ccc5625849d..9724395e57d4 100644 --- a/test/functional/page_objects/discover_page.js +++ b/test/functional/page_objects/discover_page.js @@ -247,12 +247,12 @@ export function DiscoverPageProvider({ getService, getPageObjects }) { } async getAllFieldNames() { - const items = await find.allByCssSelector('.sidebar-item'); + const items = await find.allByCssSelector('.dscSidebarItem'); return await Promise.all(items.map(item => item.getVisibleText())); } async getSidebarWidth() { - const sidebar = await find.byCssSelector('.sidebar-list'); + const sidebar = await find.byCssSelector('.dscFieldChooser__section'); return await sidebar.getAttribute('clientWidth'); } diff --git a/x-pack/legacy/plugins/reporting/export_types/common/layouts/preserve_layout.css b/x-pack/legacy/plugins/reporting/export_types/common/layouts/preserve_layout.css index 2c203e507260..fce2f7fd6a05 100644 --- a/x-pack/legacy/plugins/reporting/export_types/common/layouts/preserve_layout.css +++ b/x-pack/legacy/plugins/reporting/export_types/common/layouts/preserve_layout.css @@ -34,7 +34,6 @@ filter-bar, /* hide unusable controls */ discover-app .dscTimechart, -discover-app .sidebar-container, discover-app .kbnCollapsibleSidebar__collapseButton, discover-app navbar[name=discover-search], discover-app .discover-table-footer { diff --git a/x-pack/legacy/plugins/reporting/export_types/common/layouts/print.css b/x-pack/legacy/plugins/reporting/export_types/common/layouts/print.css index b5c9861208b7..813c6eeae0b5 100644 --- a/x-pack/legacy/plugins/reporting/export_types/common/layouts/print.css +++ b/x-pack/legacy/plugins/reporting/export_types/common/layouts/print.css @@ -33,7 +33,6 @@ filter-bar, /* hide unusable controls */ discover-app .dscTimechart, -discover-app .sidebar-container, discover-app .kbnCollapsibleSidebar__collapseButton, discover-app navbar[name="discover-search"], discover-app .discover-table-footer {