-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[ES|QL] Lookup join - Open in discover tab support #241317
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
Conversation
… the containing app
…ally for the containing app" This reverts commit ba4125d.
|
Pinging @elastic/kibana-esql (Team:ESQL) |
stratoula
left a comment
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.
Looks great, some small comments from my side
| disableAutoFocus, | ||
| controlsContext, | ||
| esqlVariables, | ||
| onOpenQueryInNewTab, |
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 in one component is onOpenQuery and on the other is onOpenIndex ?
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.
From the index editor point of view, it wants to open a specific index in a new tab.
From the esql editor point of view, it provides a general purpose callback to open any kind of query in a new tab.
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.
I see, makes sense
| }, [share?.url.locators]); | ||
|
|
||
| const isOpeningInNewTabEnabled = useMemo( | ||
| () => featureFlags?.getBooleanValue('discover.tabsEnabled', true) ?? true, |
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.
Are we tracking this somewhere? I understand why you didnt add the constant from here src/platform/plugins/shared/discover/public/constants.ts but we might miss it when the discovery team removes the flag.
@davismcphee is there any issue already for this to add a comment?
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 it be possible to add the check directly to the Discover codebase instead, that way we can use the const? Would be great to keep references to the flag within Discover as much as possible. Thinking we could check the flag and pass undefined for onOpenQueryInNewTab if it's disabled.
In either case though, we do have an issue for it here to reference: #235232.
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.
yes this is much better, it would be great if we can do 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.
Good idea! here it is 198d6aa
src/platform/plugins/shared/unified_search/public/query_string_input/query_bar_top_row.tsx
Show resolved
Hide resolved
src/platform/packages/private/kbn-index-editor/src/components/query_bar.tsx
Outdated
Show resolved
Hide resolved
src/platform/packages/private/kbn-index-editor/src/components/query_bar.tsx
Outdated
Show resolved
Hide resolved
stratoula
left a comment
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.
I didnt test again, thanx Sebastian, looks very nice
ThomThomson
left a comment
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.
Small Unified search changes LGTM! Code review only
davismcphee
left a comment
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.
Data Discovery changes LGTM and it works well, thanks!
| }, [share?.url.locators]); | ||
|
|
||
| const isOpeningInNewTabEnabled = useMemo( | ||
| () => featureFlags?.getBooleanValue('discover.tabsEnabled', true) ?? true, |
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 it be possible to add the check directly to the Discover codebase instead, that way we can use the const? Would be great to keep references to the flag within Discover as much as possible. Thinking we could check the flag and pass undefined for onOpenQueryInNewTab if it's disabled.
In either case though, we do have an issue for it here to reference: #235232.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
|
Part of [235730](elastic#235730) ## Summary Now "Open in Discover" button opens in a new Discover tab instead of a browser tab. * If there are unsaved changes, a confirmation modal is shown before leaving. * If there are not unsaved changes, it opens the new tab right away. * If tabs feature is disabled, it opens Discover in a new browser tab. * If Discover callback for handling tab navigation is not provided, it opens Discover in a new browser tab.  ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
Part of 235730
Summary
Now "Open in Discover" button opens in a new Discover tab instead of a browser tab.
Checklist