Skip to content
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

[UnifiedSearch] Add query DSL docs link to filters UI #156543

Merged
merged 17 commits into from
May 26, 2023

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented May 3, 2023

Summary

This PR adds a link to "Query DSL" syntax docs.

Screenshot 2023-05-03 at 15 40 22

@jughosta jughosta added release_note:enhancement Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Feature:Unified search Unified search related tasks labels May 3, 2023
@jughosta jughosta self-assigned this May 3, 2023
@jughosta jughosta added the backport:skip This commit does not require backporting label May 3, 2023
@jughosta jughosta marked this pull request as ready for review May 4, 2023 09:02
@jughosta jughosta requested review from a team as code owners May 4, 2023 09:02
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

services: { uiSettings },
} = useKibana();
services: { uiSettings, docLinks },
} = useKibana<ObservabilityAppServices>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uptime team, could you please please test these changes with your data set?
Btw, is it expected that components are duplicated under exploratory_view and observability plugins?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there @jughosta! We just merged a PR last week that cleans up these duplicates (#157970). Could you pull in main? If there's more duplicates please file an issue with us (Actionable Observability).

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My review wasn't requested here, but I'm nosy and just wanted to leave a quick comment about some copy 😅 Otherwise LGTM, seems like a useful link to include here 👍

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice addition Julia, LGTM!

@shahzad31 shahzad31 requested a review from a team as a code owner May 17, 2023 07:56
Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uptime changes LGTM !!

image

Copy link
Contributor

@CoenWarmer CoenWarmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Just some comments related to a change we made just as you were working on your PR.

@@ -11,6 +11,7 @@ import { Filter, buildPhrasesFilter, buildPhraseFilter } from '@kbn/es-query';
import { FilterItem } from '@kbn/unified-search-plugin/public';
import type { DataView } from '@kbn/data-views-plugin/common';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { ObservabilityAppServices } from '../../../application/types';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please use ObservabilityPluginStart instead? This type is a duplicate and we want to remove it with #158144.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CoenWarmer Looks like there is no ObservabilityPluginStart in x-pack/plugins/exploratory_view. Would it be okay to keep ObservabilityAppServices for this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jughosta I mean ObservabilityPublicPluginsStart: x-pack/plugins/observability/public/plugin.ts (line 90).

I'm approving now as I am on paternity leave and don't want to block. But I would prefer if you could apply the change requested.

Copy link
Contributor Author

@jughosta jughosta May 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @elastic/actionable-observability,

Could you please help me understand your code setup so I can improve the PR changes.

From my observation there are 2 ObservabilityAppServices types: in observability and in exploratory_view plugins. They include different services btw. And there is also ObservabilityPublicPluginsStart which might replace ObservabilityAppServices in observability via #158144

My change is in the second exploratory_view plugin. I am not familiar with how your code is organized in plugins and from the high level it does not seem to fit using a Kibana services type from one plugin inside another plugin (as suggested ObservabilityPublicPluginsStart from observability in exploratory_view). Also ObservabilityPublicPluginsStart does not include docLinks as it comes from core.

How would you suggest to proceed with adding docLinks for useKibana call in exploratory_view plugin?

jughosta added 2 commits May 22, 2023 09:32
# Conflicts:
#	x-pack/plugins/observability/public/components/shared/index.tsx
#	x-pack/plugins/observability/public/index.ts
@jughosta jughosta requested a review from CoenWarmer May 22, 2023 08:52
Copy link
Contributor

@CoenWarmer CoenWarmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve to unblock PR, but change requested. Otherwise LGTM

# Conflicts:
#	src/plugins/unified_search/tsconfig.json
@jughosta jughosta requested a review from a team May 23, 2023 09:00
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
exploratoryView 216.9KB 217.0KB +44.0B
unifiedSearch 210.9KB 211.2KB +329.0B
total +373.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 400 404 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 480 484 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jughosta

@jughosta jughosta merged commit ad85cc0 into elastic:main May 26, 2023
@jughosta jughosta deleted the query-dsl-docs-link branch May 26, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Unified search Unified search related tasks release_note:enhancement Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants