forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Search] Onboarding ux improvements (elastic#196726)
Acceptance Criteria - [x] Update Use in Playground to be a filled button and labelled “Search in Playground” (not empty button) - [x] Include View in Discover as a default button in page header - [x] Hide 'Add reference' in context menu when documents not presented in index to avoid duplication of this button - [x] Add Spacer in settings <img width="1212" alt="image" src="https://github.com/user-attachments/assets/bcdfca68-b30f-4597-9e80-b0f27fcf6c9b"> <img width="1212" alt="image" src="https://github.com/user-attachments/assets/48d78874-806f-4ba1-bca6-ba5516e4fcfa">
- Loading branch information
1 parent
2173af7
commit 01d32b0
Showing
6 changed files
with
116 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
x-pack/plugins/search_indices/public/hooks/use_navigate_to_discover.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { useCallback } from 'react'; | ||
import { useKibana } from './use_kibana'; | ||
|
||
const DISCOVER_LOCATOR_ID = 'DISCOVER_APP_LOCATOR'; | ||
|
||
export const useNavigateToDiscover = (indexName: string) => { | ||
const { share } = useKibana().services; | ||
|
||
return useCallback(async () => { | ||
const discoverLocator = share.url.locators.get(DISCOVER_LOCATOR_ID); | ||
if (discoverLocator && indexName) { | ||
await discoverLocator.navigate({ dataViewSpec: { title: indexName } }); | ||
} | ||
}, [share, indexName]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters