Skip to content

[SharedUX] use core.rendering service for Share plugin interfaces#221714

Merged
tsullivan merged 9 commits intoelastic:mainfrom
tsullivan:rendering-service/share_context_menu
Jun 4, 2025
Merged

[SharedUX] use core.rendering service for Share plugin interfaces#221714
tsullivan merged 9 commits intoelastic:mainfrom
tsullivan:rendering-service/share_context_menu

Conversation

@tsullivan
Copy link
Copy Markdown
Member

@tsullivan tsullivan commented May 27, 2025

Summary

Split out from #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

@tsullivan tsullivan changed the title [SharedUX] use core.rendering service for Reporting menus, clean up share modal API [SharedUX] use core.rendering service for Share plugin interfaces May 28, 2025
@tsullivan tsullivan force-pushed the rendering-service/share_context_menu branch from db8eb5e to 7d39c8a Compare May 28, 2025 21:21
@elastic elastic deleted a comment from elasticmachine May 28, 2025
@tsullivan tsullivan marked this pull request as ready for review May 29, 2025 06:38
@tsullivan tsullivan requested review from a team as code owners May 29, 2025 06:38
@tsullivan tsullivan added backport:version Backport to applied version labels v9.1.0 v8.19.0 release_note:skip Skip the PR/issue when compiling release notes labels May 29, 2025
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.

SharedUX changes LGTM

Copy link
Copy Markdown
Contributor

@clintandrewhall clintandrewhall left a comment

Choose a reason for hiding this comment

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

Code looks consistent. Relying on CI for testing, (as it is a top-level change that will fail if flawed).

Copy link
Copy Markdown
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Changes LGTM! Code review only

Copy link
Copy Markdown
Contributor

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

DataDiscovery changes LGTM (code review only)

@tsullivan tsullivan enabled auto-merge (squash) June 3, 2025 20:25
@tsullivan tsullivan merged commit 395844f into elastic:main Jun 4, 2025
11 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15430628486

@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 54 53 -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 620.6KB 620.6KB -33.0B
discover 1.1MB 1.1MB -32.0B
lens 1.5MB 1.5MB -54.0B
reporting 110.5KB 110.5KB +14.0B
visualizations 373.6KB 373.6KB -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
share 50.5KB 50.5KB -1.0B
Unknown metric groups

API count

id before after diff
share 120 119 -1

History

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 221714

Questions ?

Please refer to the Backport tool documentation

@tsullivan
Copy link
Copy Markdown
Member Author

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

tsullivan added a commit to tsullivan/kibana that referenced this pull request Jun 4, 2025
…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
zacharyparikh pushed a commit to zacharyparikh/kibana that referenced this pull request Jun 4, 2025
…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>
tsullivan added a commit that referenced this pull request Jun 5, 2025
…ces (#221714) (#222613)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[SharedUX] use core.rendering service for Share plugin interfaces
(#221714)](#221714)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Tim
Sullivan","email":"tsullivan@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-04T00:24:21Z","message":"[SharedUX]
use core.rendering service for Share plugin interfaces (#221714)\n\n##
Summary\n\nSplit out from
https://github.com/elastic/kibana/pull/220170\n\nThis pull request
refactors the `Reporting` and `Share` modules to\nstreamline usage of
services required for rendering React components. It\nreplaces the
deprecated `KibanaRenderContextProvider`-related services\n(`analytics`,
`i18n`, `theme`, `userProfile`) with the new rendering\nservice.\n\n###
Reporting Module Updates:\n* Updated Reporting modals and actions to use
the `rendering` service\ninstead of the deprecated services.\n* All
usages of `toMountPoint` now receive the `rendering` service as
a\nparameter, aligning with the new rendering context.\n\n### Share
Module Updates:\n* Refactored `share_menu_manager.tsx` to remove
dependencies on\ndeprecated services for rendering the share menu.\n*
Updated the `toggleShareContextMenu` method:\n * Removed `toasts` from
the `ShareContext` interface object.\n* Now accepts `rendering` as a
parameter and passes it to\n`toMountPoint`.\n\n### Checklist\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"395844f96f34a4098daaaf115ea9b552064ee961","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0"],"title":"[SharedUX]
use core.rendering service for Share plugin
interfaces","number":221714,"url":"https://github.com/elastic/kibana/pull/221714","mergeCommit":{"message":"[SharedUX]
use core.rendering service for Share plugin interfaces (#221714)\n\n##
Summary\n\nSplit out from
https://github.com/elastic/kibana/pull/220170\n\nThis pull request
refactors the `Reporting` and `Share` modules to\nstreamline usage of
services required for rendering React components. It\nreplaces the
deprecated `KibanaRenderContextProvider`-related services\n(`analytics`,
`i18n`, `theme`, `userProfile`) with the new rendering\nservice.\n\n###
Reporting Module Updates:\n* Updated Reporting modals and actions to use
the `rendering` service\ninstead of the deprecated services.\n* All
usages of `toMountPoint` now receive the `rendering` service as
a\nparameter, aligning with the new rendering context.\n\n### Share
Module Updates:\n* Refactored `share_menu_manager.tsx` to remove
dependencies on\ndeprecated services for rendering the share menu.\n*
Updated the `toggleShareContextMenu` method:\n * Removed `toasts` from
the `ShareContext` interface object.\n* Now accepts `rendering` as a
parameter and passes it to\n`toMountPoint`.\n\n### Checklist\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"395844f96f34a4098daaaf115ea9b552064ee961"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221714","number":221714,"mergeCommit":{"message":"[SharedUX]
use core.rendering service for Share plugin interfaces (#221714)\n\n##
Summary\n\nSplit out from
https://github.com/elastic/kibana/pull/220170\n\nThis pull request
refactors the `Reporting` and `Share` modules to\nstreamline usage of
services required for rendering React components. It\nreplaces the
deprecated `KibanaRenderContextProvider`-related services\n(`analytics`,
`i18n`, `theme`, `userProfile`) with the new rendering\nservice.\n\n###
Reporting Module Updates:\n* Updated Reporting modals and actions to use
the `rendering` service\ninstead of the deprecated services.\n* All
usages of `toMountPoint` now receive the `rendering` service as
a\nparameter, aligning with the new rendering context.\n\n### Share
Module Updates:\n* Refactored `share_menu_manager.tsx` to remove
dependencies on\ndeprecated services for rendering the share menu.\n*
Updated the `toggleShareContextMenu` method:\n * Removed `toasts` from
the `ShareContext` interface object.\n* Now accepts `rendering` as a
parameter and passes it to\n`toMountPoint`.\n\n### Checklist\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"395844f96f34a4098daaaf115ea9b552064ee961"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants