App Search - Polishing Analytics Views#92939
Conversation
| {iconType ? ( | ||
| <EuiFlexItem grow={false}> | ||
| <EuiIcon type={iconType} size="l" /> | ||
| </EuiFlexItem> | ||
| ) : null} |
There was a problem hiding this comment.
Adds the ability for an icon to be passed into the header
| .entSearch__table--noBackground { | ||
| .euiTable { | ||
| background-color: transparent; | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
A bit of a workaround right now to use the tables on the subdued panels for amsterdam. Until this is officially supported in EUI, this should suffice.
| </EuiBadgeGroup> | ||
| ); | ||
|
|
||
| return displayCountOnly ? <TagToolTip /> : <TagList />; |
There was a problem hiding this comment.
This change introduces a way to render only a tooltip with a total tag count. Works well for cases where the tables are small and compact.
There was a problem hiding this comment.
I'm a little confused by this because it looks like none of the tables are rendering a <TagList /> now, even though it feels like the RecentQueriesTable and the QueryClicksTable could:
From the code I think I see why and what we need to change, but just want to check with you first that we even still even want the <TagToolTip /> component - it would be much simpler code-wise to only have one way of displaying tags.
| <EuiSpacer /> | ||
| {children} | ||
| </EuiPanel> | ||
| ); |
There was a problem hiding this comment.
Adds a new component called DataPanel that supports rendering things like tables and charts with a title, subtitle, and action
| <DataPanel | ||
| data-test-subj="TotalQueriesChart" | ||
| title={TOTAL_QUERIES} | ||
| subtitle={LAST_7_DAYS} | ||
| action={ | ||
| <EuiButtonEmptyTo | ||
| iconType="eye" | ||
| to={generateEnginePath(ENGINE_ANALYTICS_PATH)} | ||
| size="s" | ||
| > | ||
| {VIEW_ANALYTICS} | ||
| </EuiButtonEmptyTo> | ||
| } | ||
| > | ||
| <AnalyticsChart | ||
| lines={[ | ||
| { | ||
| id: TOTAL_QUERIES, | ||
| data: convertToChartData({ startDate, data: queriesPerDay }), | ||
| }, | ||
| ]} | ||
| /> | ||
| </DataPanel> |
There was a problem hiding this comment.
Uses the new DataPanel component. Eventually (in later updates of Amsterdam) this will support 2 basic versions of panels... a subdued version and a bordered version. Charts will use the bordered version.
| <EuiFlexGroup> | ||
| <EuiFlexItem grow={1}> | ||
| <TotalStats /> | ||
| </EuiFlexItem> | ||
| <EuiFlexItem grow={3}> | ||
| <TotalCharts /> | ||
| </EuiFlexItem> | ||
| </EuiFlexGroup> |
There was a problem hiding this comment.
Renders the stats and charts in a row, rather than stacked vertically.
There was a problem hiding this comment.
Do we want to adjust/reduce the chart height the charts at all as a result? They look a little squashed on a laptop screen:
Also there's some extra space that the current height is causing on the stat cards which we could easily lose:
Example with a height={240} passed into both AnalyticsCharts in the TotalCharts component:
The above looks slightly more balanced to me - what do you think?
| @@ -0,0 +1,22 @@ | |||
| /* | |||
There was a problem hiding this comment.
Adds a new icon. This directory will also include our icons for engines and meta_engines and all other app search specific icons we'll have. (Like on the relevance tuning pages)
|
Hey @daveyholler I'm going to take a look at this tomorrow (Tuesday)! |
|
@elasticmachine merge upstream |
1 similar comment
|
@elasticmachine merge upstream |
|
@daveyholler just FYI I think there was a space in the front of your comment which caused elasticmachine to ignore you, it's very picky that way 😬 |
...s/enterprise_search/public/applications/app_search/components/data_panel/data_panel.test.tsx
Outdated
Show resolved
Hide resolved
...pplications/app_search/components/analytics/components/analytics_tables/inline_tags_list.tsx
Outdated
Show resolved
Hide resolved
...pplications/app_search/components/analytics/components/analytics_tables/inline_tags_list.tsx
Outdated
Show resolved
Hide resolved
| </EuiBadgeGroup> | ||
| ); | ||
|
|
||
| return displayCountOnly ? <TagToolTip /> : <TagList />; |
There was a problem hiding this comment.
I'm a little confused by this because it looks like none of the tables are rendering a <TagList /> now, even though it feels like the RecentQueriesTable and the QueryClicksTable could:
From the code I think I see why and what we need to change, but just want to check with you first that we even still even want the <TagToolTip /> component - it would be much simpler code-wise to only have one way of displaying tags.
..._search/public/applications/app_search/components/analytics/components/analytics_section.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/enterprise_search/public/applications/shared/icons/cursor.svg
Outdated
Show resolved
Hide resolved
x-pack/plugins/enterprise_search/public/applications/app_search/icons/cursor_icon.tsx
Show resolved
Hide resolved
x-pack/plugins/enterprise_search/public/applications/app_search/icons/cursor_icon.tsx
Show resolved
Hide resolved
x-pack/plugins/enterprise_search/public/applications/app_search/icons/index.ts
Show resolved
Hide resolved
...pplications/app_search/components/analytics/components/analytics_tables/analytics_table.scss
Outdated
Show resolved
Hide resolved
...cations/app_search/components/analytics/components/analytics_tables/analytics_table.test.tsx
Outdated
Show resolved
Hide resolved
...h/public/applications/app_search/components/engine_overview/components/total_charts.test.tsx
Outdated
Show resolved
Hide resolved
...lugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I need to stop here for the night, my brain is pretty fried, but I still have DataPanel and tables/charts to look at - I'll continue reviewing tomorrow.
I do strongly want to say that I think this PR could have been broken up into much smaller and more atomic PRs and that would have personally made reviewing significantly easier for me in terms of QA and code review. For example, InlineTagsList could have been its own PR, DataPanel could have been its own PR, icons in AnalyticsHeader could have been separate, and so on and so forth.
I'd really appreciate discussing that approach more if we're going to continue doing polish PRs throughout the migration - smaller and more contained PRs are almost always going to be way more manageable and easier for reviewers to set aside time for, and I honestly think you'll have a better experience as well (in terms of getting help/review sooner, CI issues, and not having a ton of change requests per PR).
- Remove unused svg file - Add TODO comment - Add test coverage
TotalCharts - adjust chart height - tests: simplify / convert back to shallow RecentApiLogs - switch to DataPanel
Component
- move CSS table bg override out from being an AnalyticsTable concern to a DataPanel concern
+ bem naming, todo comment
- add responsive={false} for better mobile UX
- add className and data-test-subj prop passing
- change title to pass full heading tags rather than a string
- move subtitle below title for better screen reader order
- add index.ts export
Tests
- capitalization for consistency, ordering/describe
- remove data-test-subjs on source code (simpler to grab & inspect tags directly so we can more easily call .text() on passed content)
- add new tests for props (fliled/className/data-test-subj)
Usage
- update other files using DataPanel to start passing heading tags + use index export
- fix RecentApiLogs tests
- change RecentQueries section to use a DataPanel (per Davey)
Tags - Rename to more general tags.tsx file - Add CSS limiting width of variable length tags - Break up into two separate components for easier readability & testing - Split up tags column constants so that the wider tables can use the old tags list component Tables - add isSmall flag to AnalyticsTable to use new tag count component - reduce actions column width - revert unnecessary table test changes Analytics - add custom CSS that switches tables/panels into full-width earlier
- fix responsive behavior with icon - add missing AnalyticsSection branch coverage
cee-chen
left a comment
There was a problem hiding this comment.
Various responsive before/after screencaps
| gutterSize="xs" | ||
| alignItems="center" | ||
| justifyContent="flexStart" | ||
| responsive={false} |
|
|
||
| return ( | ||
| <EuiPanel {...props} color={filled ? 'subdued' : 'plain'} className={classes} hasShadow={false}> | ||
| <EuiFlexGroup justifyContent="spaceBetween" alignItems="center" responsive={false}> |
| .analyticsOverviewTables { | ||
| @include euiBreakpoint('xs', 's', 'm', 'l') { | ||
| flex-direction: column; // Force full width on table panels earlier to ensure content stays legible | ||
| } | ||
| } |
|
@daveyholler That's the last of my changes for now! Thanks for letting me push directly to your branch - hopefully this was a faster experience for both of us :) Please do pull down the latest commits and test them out locally and let me know if everything looks good to you or if you see any issues. I've tested at various responsive widths and am fairly satisfied the new changes look functional on all of them. If any specific changes in any commits look odd to you or you're not sure why a change was made, definitely let me know and I'm happy to dive into it! |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
|
@constancecchen this stuff looks so good. Thanks a million for helping out. @byronhulcher FYI: The |
|
No problem! Let me know whenever you've pulled down and vetted/QA's all the changes and if you don't see any issues/change requests, I can approve and we can merge after if that sounds good |
cee-chen
left a comment
There was a problem hiding this comment.
This looked good just now during demos, so I'm gonna go ahead and approve ![]()
|
@daveyholler shoot, I forgot to remind you to add the |
* WIP analytics polish
* Working on tests.
* Finishing up tests.
* Updating the engine overview page.
* eslint fixes
* i18n fixes
* Icons feedback
- Remove unused svg file
- Add TODO comment
- Add test coverage
* linting - unnecessary ternaries
* EnginesOverview feedback
TotalCharts
- adjust chart height
- tests: simplify / convert back to shallow
RecentApiLogs
- switch to DataPanel
* DataPanel feedback
Component
- move CSS table bg override out from being an AnalyticsTable concern to a DataPanel concern
+ bem naming, todo comment
- add responsive={false} for better mobile UX
- add className and data-test-subj prop passing
- change title to pass full heading tags rather than a string
- move subtitle below title for better screen reader order
- add index.ts export
Tests
- capitalization for consistency, ordering/describe
- remove data-test-subjs on source code (simpler to grab & inspect tags directly so we can more easily call .text() on passed content)
- add new tests for props (fliled/className/data-test-subj)
Usage
- update other files using DataPanel to start passing heading tags + use index export
- fix RecentApiLogs tests
- change RecentQueries section to use a DataPanel (per Davey)
* Analytics tags - updates & responsive tweaks
Tags
- Rename to more general tags.tsx file
- Add CSS limiting width of variable length tags
- Break up into two separate components for easier readability & testing
- Split up tags column constants so that the wider tables can use the old tags list component
Tables
- add isSmall flag to AnalyticsTable to use new tag count component
- reduce actions column width
- revert unnecessary table test changes
Analytics
- add custom CSS that switches tables/panels into full-width earlier
* AnalyticsSection fixes
- fix responsive behavior with icon
- add missing AnalyticsSection branch coverage
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
* master: (48 commits) Fix wrong import in data plugin causing 100kB bundle increase (elastic#93448) [Fleet] Correctly track install status of an integration (elastic#93464) Reviews data frame analytics UI text (elastic#93033) Display multiple copyable fields for process.args in resolver node detail panel (elastic#93280) [Security Solution][Detections] ML Popover overflow fix (elastic#93525) chore(NA): do not use execa on bazel workspace status update script (elastic#93532) Bump dependencies (elastic#93511) [dev/build_ts_refs] support disabling the ts-refs build completely (elastic#93529) [Security Solution] fix data provider cypress test (elastic#93465) Fix service map for All environment single service (elastic#93517) [Fleet] Fix package version comparaison in the UI (elastic#93498) [alerting] adds doc on JSON-expanded action variables and task manager max_workers (elastic#92720) [dev/build_ts_refs] ignore type checking failures when building ts refs (elastic#93473) [core-new-docs] Adds a dev-doc for core documentation (elastic#92976) remove opacity from maps legacy style (elastic#93456) [Security Solution][Lists] Escape quotes in list ids and quote the id in KQL query (elastic#93176) Revert "Make tests deterministic by providing unique timestamps (elastic#93350)" [Discover] Fix link from dashboard saved search to Discover (elastic#92937) update public api docs App Search - Polishing Analytics Views (elastic#92939) ...










Summary
Makes some visual adjustments to the Analytics views.
Checklist
Delete any items that are not applicable to this PR.
If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker listFor maintainers