Skip to content

[8.19] Separate export menu from share (#217109)#225225

Merged
eokoneyo merged 1 commit intoelastic:8.19from
eokoneyo:backport/8.19/pr-217109
Jun 25, 2025
Merged

[8.19] Separate export menu from share (#217109)#225225
eokoneyo merged 1 commit intoelastic:8.19from
eokoneyo:backport/8.19/pr-217109

Conversation

@eokoneyo
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

@eokoneyo eokoneyo requested a review from kibanamachine as a code owner June 25, 2025 08:20
@eokoneyo eokoneyo added the backport This PR is a backport of another PR label Jun 25, 2025
@eokoneyo eokoneyo enabled auto-merge (squash) June 25, 2025 08:20
@eokoneyo eokoneyo force-pushed the backport/8.19/pr-217109 branch from 2d2b844 to 42a8639 Compare June 25, 2025 08:46
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #9 / Connector renders correctly
  • [job] [logs] Jest Tests #7 / Discover topnav component top nav customization share service available will include export menu item if there are export integrations available
  • [job] [logs] Jest Tests #7 / Discover topnav component top nav customization share service available will include export menu item if there are export integrations available
  • [job] [logs] Jest Tests #7 / Discover topnav component top nav customization share service available will include share menu item if the share service is available
  • [job] [logs] Jest Tests #7 / Discover topnav component top nav customization share service available will include share menu item if the share service is available

History

Closes elastic#205805

This PR extracts the share export functionality into a standalone
triggered UI action, and builds mostly off of the work that's been done
in elastic#211665 as such any share
integration type that's registered under the groupId `export` will show
up within the afore mentioned standalone export type.

Registering a new export type would happen like so;

```js
share.registerShareIntegration({
	groupId: 'export',
	...
	config: () => ({
		...
	}),
	prerequisiteCheck({ license, capabilities, objectType }) {
		// The prerequisiteCheck callback will get passed the license, app capabilities and the objectType
		// of the current caller, this can then be used to determine if this integration should be available,
		// returning false in here disables the integration,
	}
})
```

*P.S.* This registration can also be scoped to a particular object type
(i.e. lens, dashboard etc.) if said integration is intended to only be
available for only a particular object type.

<img width="768" alt="Screenshot 2025-04-24 at 10 53 25"
src="https://github.com/user-attachments/assets/31966ded-b1f7-417e-840e-4596b310d6bc"
/>

<img width="1720" alt="Screenshot 2025-04-25 at 09 04 50"
src="https://github.com/user-attachments/assets/8b675974-9a4b-4dcc-9aca-77cea5a25654"
/>

<img width="640" alt="Screenshot 2025-04-24 at 10 53 40"
src="https://github.com/user-attachments/assets/d16da148-3c25-4a58-a847-d4d5a3736106"
/>

button visible)_
<img width="1728" alt="Screenshot 2025-05-02 at 13 11 21"
src="https://github.com/user-attachments/assets/e47426fb-db5b-4c2a-bee5-557fefbb40ec"
/>

<img width="626" alt="Screenshot 2025-04-04 at 20 18 50"
src="https://github.com/user-attachments/assets/f4bdd2a3-2527-4334-b253-7686e4131d87"
/>
<img width="1728" alt="Screenshot 2025-05-02 at 13 11 43"
src="https://github.com/user-attachments/assets/9a6e7fa2-260d-4b68-a1ae-61c499849fb8"
/>

- Pull this PR and run it locally, or test in the provision environment
linked to this PR.
- Navigate to the dashboard, discover, and visualize app. The nav menu
should display icon buttons for sharing and export.
- Clicking the "Share" icon (up arrow) opens the familiar share modal
without export. The "Export" icon (down arrow) opens a new popover with
available options.
- Export Functionality Test;
- Single Export Option: When there's only one export option, the flyout
opens automatically.
- Disabled Reporting Features: Create a new role with reporting
subPrivileges and test it by creating a user assigned to that role. Log
in as the user, and the export popover should reflect the limited
reporting features.
- In the case where the current user has no registered integrations
available to them, the export functionality will not be displayed

<!--

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit a887cd6)
@eokoneyo eokoneyo force-pushed the backport/8.19/pr-217109 branch from 1ccfaf4 to 146d5e0 Compare June 25, 2025 10:50
@eokoneyo eokoneyo merged commit 0d71486 into elastic:8.19 Jun 25, 2025
8 checks passed
@eokoneyo eokoneyo deleted the backport/8.19/pr-217109 branch June 25, 2025 12:34
@eokoneyo
Copy link
Copy Markdown
Contributor Author

eokoneyo commented Jun 25, 2025

For posterity sake, this PR did build successfully here

@eokoneyo eokoneyo self-assigned this Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants