-
Notifications
You must be signed in to change notification settings - Fork 8.5k
App Search - Polishing Analytics Views #92939
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
Merged
daveyholler
merged 14 commits into
elastic:master
from
daveyholler:daveyholler/as-analytics-polish
Mar 3, 2021
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d54f566
WIP analytics polish
daveyholler ea28e03
Working on tests.
daveyholler 00cdaf5
Finishing up tests.
daveyholler 9ae5a3d
Updating the engine overview page.
daveyholler 79b8923
Merge branch 'master' into daveyholler/as-analytics-polish
kibanamachine 32f2b06
eslint fixes
cee-chen b3a8b4f
i18n fixes
cee-chen f9fa1ac
Icons feedback
cee-chen 71a5d66
linting - unnecessary ternaries
cee-chen 450ac23
Merge branch 'master' into daveyholler/as-analytics-polish
cee-chen 9782526
EnginesOverview feedback
cee-chen a98160c
DataPanel feedback
cee-chen 5e1fc00
Analytics tags - updates & responsive tweaks
cee-chen 833476b
AnalyticsSection fixes
cee-chen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
41 changes: 0 additions & 41 deletions
41
...ons/app_search/components/analytics/components/analytics_tables/inline_tags_list.test.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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
3 changes: 3 additions & 0 deletions
3
...public/applications/app_search/components/analytics/components/analytics_tables/tags.scss
This file contains hidden or 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,3 @@ | ||
| .tagsList .euiBadge { | ||
| max-width: $euiSize * 9; | ||
| } |
67 changes: 67 additions & 0 deletions
67
...ic/applications/app_search/components/analytics/components/analytics_tables/tags.test.tsx
This file contains hidden or 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,67 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
|
|
||
| import { shallow } from 'enzyme'; | ||
|
|
||
| import { EuiBadge, EuiToolTip } from '@elastic/eui'; | ||
|
|
||
| import { TagsList, TagsCount } from './tags'; | ||
|
|
||
| describe('TagsList', () => { | ||
| it('renders', () => { | ||
| const wrapper = shallow(<TagsList tags={['test']} />); | ||
|
|
||
| expect(wrapper.find(EuiBadge)).toHaveLength(1); | ||
| expect(wrapper.find(EuiBadge).prop('children')).toEqual('test'); | ||
| }); | ||
|
|
||
| it('renders >2 badges in a tooltip list', () => { | ||
| const wrapper = shallow(<TagsList tags={['1', '2', '3', '4', '5']} />); | ||
|
|
||
| expect(wrapper.find(EuiBadge)).toHaveLength(3); | ||
| expect(wrapper.find(EuiToolTip)).toHaveLength(1); | ||
|
|
||
| expect(wrapper.find(EuiBadge).at(0).prop('children')).toEqual('1'); | ||
| expect(wrapper.find(EuiBadge).at(1).prop('children')).toEqual('2'); | ||
| expect(wrapper.find(EuiBadge).at(2).prop('children')).toEqual('and 3 more'); | ||
| expect(wrapper.find(EuiToolTip).prop('content')).toEqual('3, 4, 5'); | ||
| }); | ||
|
|
||
| it('does not render if missing tags', () => { | ||
| const wrapper = shallow(<TagsList tags={[]} />); | ||
|
|
||
| expect(wrapper.isEmptyRender()).toBe(true); | ||
| }); | ||
| }); | ||
|
|
||
| describe('TagsCount', () => { | ||
| it('renders a count and all tags in a tooltip', () => { | ||
| const wrapper = shallow(<TagsCount tags={['1', '2', '3']} />); | ||
|
|
||
| expect(wrapper.find(EuiToolTip)).toHaveLength(1); | ||
| expect(wrapper.find(EuiBadge)).toHaveLength(1); | ||
| expect(wrapper.find(EuiBadge).prop('children')).toEqual('3 tags'); | ||
| expect(wrapper.find(EuiToolTip).prop('content')).toEqual('1, 2, 3'); | ||
| }); | ||
|
|
||
| it('handles pluralization correctly', () => { | ||
| const wrapper = shallow(<TagsCount tags={['1']} />); | ||
|
|
||
| expect(wrapper.find(EuiToolTip)).toHaveLength(1); | ||
| expect(wrapper.find(EuiBadge)).toHaveLength(1); | ||
| expect(wrapper.find(EuiBadge).prop('children')).toEqual('1 tag'); | ||
| expect(wrapper.find(EuiToolTip).prop('content')).toEqual('1'); | ||
| }); | ||
|
|
||
| it('does not render if missing tags', () => { | ||
| const wrapper = shallow(<TagsCount tags={[]} />); | ||
|
|
||
| expect(wrapper.isEmptyRender()).toBe(true); | ||
| }); | ||
| }); |
This file contains hidden or 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
5 changes: 5 additions & 0 deletions
5
...nterprise_search/public/applications/app_search/components/analytics/views/analytics.scss
This file contains hidden or 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,5 @@ | ||
| .analyticsOverviewTables { | ||
| @include euiBreakpoint('xs', 's', 'm', 'l') { | ||
| flex-direction: column; // Force full width on table panels earlier to ensure content stays legible | ||
| } | ||
| } | ||
|
Comment on lines
+1
to
+5
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before (no

responsive={false}):After:
