kibana/examples/discover_customization_examples
Julia Rechkunova 811a23830b
[OneDiscover] Contextual App Menu Extension Point (#195448)
- Closes https://github.com/elastic/kibana/issues/194269

## Summary

This PR introduces a new extension point `getAppMenu` which allows to:
- add custom App Menu items (as a button or a submenu with more actions)
- extend Alerts menu item with more custom actions

Additionally, this PR rearranges the existing Discover menu items. The
primary actions are rendered as an icon only now.

![Oct-16-2024
17-43-29](https://github.com/user-attachments/assets/dbb67513-05bb-43a4-bd7b-cf958c58a167)


The example usage of the new extension point can be found in
e7964f08e3/src/plugins/discover/public/context_awareness/profile_providers/example/example_data_source_profile/profile.tsx (L81-L168)

### For testing with the example profile

1. Add `discover.experimental.enabledProfiles: ['example-root-profile',
'example-data-source-profile', 'example-document-profile']` to
`kibana.dev.yml`
2. Run the following in DevTools
```
POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "kibana_sample_data_logs",
        "alias": "my-example-logs"
      }
    }
  ]
}
```
3. Create and use Data View with `my-custom-logs` index pattern

### Checklist

- [x] [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
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
2024-10-30 13:35:15 +01:00
..
public [OneDiscover] Contextual App Menu Extension Point (#195448) 2024-10-30 13:35:15 +01:00
kibana.jsonc [Discover] Remove Discover customization profiles (#181259) 2024-04-23 12:39:32 -03:00
tsconfig.json [OneDiscover] Contextual App Menu Extension Point (#195448) 2024-10-30 13:35:15 +01:00