mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Discover] Redesign for the grid, panels and sidebar v1 (#165866)
## Summary
### Part 1
- Resolves https://github.com/elastic/kibana/issues/164287
- Closes https://github.com/elastic/kibana/issues/146339
- Previously separate PR https://github.com/elastic/kibana/pull/164187
Changes:
- ~~swaps checkbox and row selection~~
- removes vertical borders
- adds rows highlight
- increases cell padding
- adds row stripes
- updates header background
- removes grey background from field name and makes it bolder (part of
https://github.com/elastic/kibana/issues/164634)
- updates Surrounding Documents side paddings
### Part 2
- Resolves https://github.com/elastic/kibana/issues/164661
- Previously separate PR https://github.com/elastic/kibana/pull/165687
Changes:
- removes background from panels, tabs and sidebar
- updates "Add a field" button style
- removes shadow from field list items
- makes field search compact
### Part 3
- Resolves https://github.com/elastic/kibana/issues/164662
Changes:
- wraps "Add a field" button in its own container with a top border
- ~~adds a drag handle to sidebar items~~
- ~~adds new Show/Hide buttons to toggle sidebar~~ moves sidebar toggle
button from discover plugin to unified field list
- reduces spaces between sidebar items from 4px to 2px
- reduces padding on Single Document page
- removes border above grid tabs
<img width="600" alt="Screenshot 2023-09-07 at 14 39 48"
src="976db247
-fd70-4c9b-8634-552ece45b522">
Please note that "auto" row height is in a separate PR which is also
ready for review https://github.com/elastic/kibana/pull/164218
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
This commit is contained in:
parent
6eea595153
commit
6cb937a37a
49 changed files with 807 additions and 280 deletions
|
@ -15,6 +15,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const PageObjects = getPageObjects(['common', 'timePicker', 'discover']);
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const security = getService('security');
|
||||
const browser = getService('browser');
|
||||
const from = 'Jan 1, 2019 @ 00:00:00.000';
|
||||
const to = 'Jan 1, 2019 @ 23:59:59.999';
|
||||
|
||||
|
@ -25,7 +26,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await kibanaServer.importExport.load(
|
||||
'test/functional/fixtures/kbn_archiver/date_nanos_mixed'
|
||||
);
|
||||
await kibanaServer.uiSettings.replace({ defaultIndex: 'timestamp-*' });
|
||||
await kibanaServer.uiSettings.replace({
|
||||
defaultIndex: 'timestamp-*',
|
||||
hideAnnouncements: true, // should be enough vertical space to render rows
|
||||
});
|
||||
await browser.setWindowSize(1200, 900);
|
||||
await security.testUser.setRoles(['kibana_admin', 'kibana_date_nanos_mixed']);
|
||||
await PageObjects.common.setTime({ from, to });
|
||||
await PageObjects.common.navigateToApp('discover');
|
||||
|
|
|
@ -88,7 +88,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
return actualCount <= expectedCount;
|
||||
});
|
||||
const newDurationHours = await PageObjects.timePicker.getTimeDurationInHours();
|
||||
expect(Math.round(newDurationHours)).to.be(26);
|
||||
expect(Math.round(newDurationHours)).to.be(24); // might fail if histogram's width changes
|
||||
|
||||
await retry.waitFor('doc table containing the documents of the brushed range', async () => {
|
||||
const rowData = await PageObjects.discover.getDocTableField(1);
|
||||
|
|
|
@ -214,16 +214,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
describe('collapse expand', function () {
|
||||
it('should initially be expanded', async function () {
|
||||
await testSubjects.existOrFail('discover-sidebar');
|
||||
await testSubjects.existOrFail('fieldList');
|
||||
});
|
||||
|
||||
it('should collapse when clicked', async function () {
|
||||
await PageObjects.discover.toggleSidebarCollapse();
|
||||
await testSubjects.missingOrFail('discover-sidebar');
|
||||
await testSubjects.existOrFail('discover-sidebar');
|
||||
await testSubjects.missingOrFail('fieldList');
|
||||
});
|
||||
|
||||
it('should expand when clicked', async function () {
|
||||
await PageObjects.discover.toggleSidebarCollapse();
|
||||
await testSubjects.existOrFail('discover-sidebar');
|
||||
await testSubjects.existOrFail('fieldList');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -370,13 +370,14 @@ export class DiscoverPageObject extends FtrService {
|
|||
}
|
||||
|
||||
public async toggleSidebarCollapse() {
|
||||
return await this.testSubjects.click('collapseSideBarButton');
|
||||
return await this.testSubjects.click('unifiedFieldListSidebar__toggle');
|
||||
}
|
||||
|
||||
public async closeSidebar() {
|
||||
await this.retry.tryForTime(2 * 1000, async () => {
|
||||
await this.toggleSidebarCollapse();
|
||||
await this.testSubjects.missingOrFail('discover-sidebar');
|
||||
await this.testSubjects.click('unifiedFieldListSidebar__toggle-collapse');
|
||||
await this.testSubjects.missingOrFail('unifiedFieldListSidebar__toggle-collapse');
|
||||
await this.testSubjects.missingOrFail('fieldList');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue