-
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
[Discover][Lens] Removes the dataview dependency from the text based mode #158531
[Discover][Lens] Removes the dataview dependency from the text based mode #158531
Conversation
@@ -136,7 +136,7 @@ export function Chart({ | |||
!chart.hidden && | |||
dataView.id && | |||
dataView.type !== DataViewType.ROLLUP && | |||
dataView.isTimeBased() | |||
(isPlainRecord || (!isPlainRecord && dataView.isTimeBased())) |
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.
ℹ️ This was a bug, the chart in text based languages should render regardless if the dataview is timeBased or not as we don't show the histogram but the Lens suggestions
@@ -404,7 +404,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |||
await PageObjects.discover.waitUntilSidebarHasLoaded(); | |||
|
|||
expect(await PageObjects.discover.getSidebarAriaDescription()).to.be( | |||
'1 popular field. 53 available fields. 0 empty fields. 3 meta fields.' |
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.
ℹ️ this needs to change as adhoc dataviews do not store information for the popular fields
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
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.
Pulled and tested locally, and it's working well overall! I left a few comments and questions on the code, but mainly I encountered two things while testing:
After reloading the page, the back button causes a warning toast about the data view ID when going back to a query that generates a new ad hoc data view. This is probably just the standard behaviour when an ad hoc data view isn't in the history state, but I wonder if we should do anything about it here:
I suspect this one might already exist in main
, but I haven't checked yet. It seems that clicking into the text-based editor while the page is still loading will cause the text cursor to get messed up:
src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx
Show resolved
Hide resolved
src/plugins/discover/public/application/main/utils/get_data_view_by_text_based_query_lang.ts
Show resolved
Hide resolved
Yes this happens in main too, I have it on my list to see what is going wrong here |
Good catch! I fixed it, we don't need these warnings for the text based mode. We had already silenced one in the past |
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.
Thanks for the changes, looks like the warning toast is fixed! LGTM 👍
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Unknown metric groupsAPI count
ESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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.
As we are going to remove the ESQL entrypoint from Lens and the unified search changes are minimal I am approving on behalf of the visualizations team
Summary
Closes #154334
This PR:
The timepicker in the disabled state needs to have a disabled status text (All time) but this is not possible atm. I have created an issue to eui elastic/eui#6814 to add this property. This is going to be tackled before the 8.9 FF but we don't want to block this PR
Checklist