-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Add "no data" popover #69147
[Lens] Add "no data" popover #69147
Conversation
Talked with @lizozom and I'm going to move the specifics of the tour into the data plugin - this way it's easier to extend it later and make it a full tour. The exposed API will just become a boolean flag |
Jenkins, test this. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
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.
The descriptions says this isn't tested, but it looks like you have added unit tests and a small functional test. The behavior and code LGTM!
const args = { | ||
dateRange: { fromDate: '1900-01-01', toDate: '2000-01-01' }, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
fetchJson: fetchJson as any, |
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.
Would ts-expect-error work here instead of casting to any?
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.
Tested on FF - looks good to me!
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.
Didn't test, but code overall looks great.
Asked a couple questions on PR
src/plugins/data/public/ui/query_string_input/no_data_popover.tsx
Outdated
Show resolved
Hide resolved
}, [ | ||
setState, | ||
state.indicateNoData, | ||
state.query, |
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.
Why did you have to list attributes that are not used explicitly in the effect? Is it because of prevState? 🤔
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.
We want to show this popover only on first load - if the user starts to change the configuration, they most likely now how to get data (e.g. by changing the index pattern because the wrong one was pre-selected). Then we don't need the popover anymore.
This is just to be extra safe (as the popover is also hidden when the user interacts with the UI outside of it)
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.
Might be nice adding a comment on this as this is not trivial behavior
@elasticmachine merge upstream |
💚 Build SucceededBuild metricspage load asset sizebeta
History
To update your PR or re-run it, just comment with: |
@lizozom Can be reviewed again. |
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.
Added one minor comment
All LGTM!
title="" | ||
footerAction={ | ||
<EuiButtonEmpty | ||
size="s" |
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.
@flash1293 Minor nit, can you change/add these props:
size="xs"
flush="right"
color="text"
…-based-rbac * upstream/master: (38 commits) Move logger configuration integration test to jest (elastic#70378) Changes observability plugin codeowner (elastic#70439) update (elastic#70424) [Logs UI] Avoid CCS-incompatible index name resolution (elastic#70179) Enable "Explore underlying data" actions for Lens visualizations (elastic#70047) Initial work on uptime homepage API (elastic#70135) expressions indexPattern function (elastic#70315) [Discover] Deangularization context error message refactoring (elastic#70090) [Lens] Add "no data" popover (elastic#69147) [Lens] Move chart switcher over (elastic#70182) chore: add missing mjs extension (elastic#70326) [Lens] Multiple y axes (elastic#69911) skip flaky suite (elastic#70386) fix bug to add timeline to case (elastic#70343) [QA][Code Coverage] Drop catchError and use try / catch instead, (elastic#69198) [QA] [Code Coverage] Integrate with Team Assignment Pipeline and Add Research and Development Indexes and Cluster (elastic#69348) [Metrics UI] Add context.reason and alertOnNoData to Inventory alerts (elastic#70260) Resolver refactoring (elastic#70312) [Ingest Manager] Fix agent ack after input format change (elastic#70335) [eslint][ts] Enable prefer-ts-expect-error (elastic#70022) ...
Fixes #58276
This PR adds a popover to the time picker if the initial screen in Lens doesn't have data.
The public extension is this: https://github.com/elastic/kibana/pull/69147/files#diff-af278f7eea53f3bf5b098304f4b386dfR68
There is an optional flag that triggers the tour component (state handled by the query bar component).
Later it's planned to use the same API also in Visualize if there is no data for the current time range.