Skip to content

[8.19] [SharedUX] use core.rendering service for Share plugin interfaces (#221714)#222613

Merged
tsullivan merged 2 commits intoelastic:8.19from
tsullivan:backport/8.19/pr-221714
Jun 5, 2025
Merged

[8.19] [SharedUX] use core.rendering service for Share plugin interfaces (#221714)#222613
tsullivan merged 2 commits intoelastic:8.19from
tsullivan:backport/8.19/pr-221714

Conversation

@tsullivan
Copy link
Copy Markdown
Member

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…astic#221714)

## Summary

Split out from elastic#220170

This pull request refactors the `Reporting` and `Share` modules to
streamline usage of services required for rendering React components. It
replaces the deprecated `KibanaRenderContextProvider`-related services
(`analytics`, `i18n`, `theme`, `userProfile`) with the new rendering
service.

### Reporting Module Updates:
* Updated Reporting modals and actions to use the `rendering` service
instead of the deprecated services.
* All usages of `toMountPoint` now receive the `rendering` service as a
parameter, aligning with the new rendering context.

### Share Module Updates:
* Refactored `share_menu_manager.tsx` to remove dependencies on
deprecated services for rendering the share menu.
* Updated the `toggleShareContextMenu` method:
  * Removed `toasts` from the `ShareContext` interface object.
* Now accepts `rendering` as a parameter and passes it to
`toMountPoint`.

### 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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 395844f)

# Conflicts:
#	src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_csv_modal_reporting.tsx
#	src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_pdf_png_modal_reporting.tsx
#	src/platform/plugins/shared/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx
#	src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx
#	src/platform/plugins/shared/share/public/components/context/index.tsx
#	src/platform/plugins/shared/share/public/components/export_popover/export_popover.test.tsx
#	src/platform/plugins/shared/share/public/components/share_tabs.test.tsx
#	src/platform/plugins/shared/share/public/services/share_menu_manager.tsx
#	src/platform/plugins/shared/share/public/types.ts
#	src/platform/plugins/shared/share/tsconfig.json
#	src/platform/plugins/shared/visualizations/public/visualize_app/utils/get_top_nav_config.tsx
#	x-pack/platform/plugins/shared/lens/public/app_plugin/lens_top_nav.tsx
@tsullivan tsullivan requested a review from kibanamachine as a code owner June 4, 2025 17:13
@tsullivan tsullivan added the backport This PR is a backport of another PR label Jun 4, 2025
@tsullivan tsullivan enabled auto-merge (squash) June 4, 2025 17:13
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
share 73 72 -1

Async chunks

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

id before after diff
dashboard 686.4KB 686.4KB -33.0B
discover 1.0MB 1.0MB -32.0B
lens 1.5MB 1.5MB -54.0B
reporting 119.7KB 119.7KB +14.0B
visualizations 403.8KB 403.8KB -9.0B
total -114.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
reporting 51.7KB 51.7KB -7.0B
share 51.7KB 51.7KB -49.0B
total -56.0B
Unknown metric groups

API count

id before after diff
share 136 135 -1

History

Copy link
Copy Markdown
Contributor

@eokoneyo eokoneyo left a comment

Choose a reason for hiding this comment

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

Chna

@tsullivan tsullivan merged commit 48f4d15 into elastic:8.19 Jun 5, 2025
8 checks passed
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