Skip to content

[SharedUX] Replace KibanaRenderContextProvider usage#220170

Merged
tsullivan merged 6 commits intoelastic:mainfrom
tsullivan:rendering-service/for-sharedux
Jun 12, 2025
Merged

[SharedUX] Replace KibanaRenderContextProvider usage#220170
tsullivan merged 6 commits intoelastic:mainfrom
tsullivan:rendering-service/for-sharedux

Conversation

@tsullivan
Copy link
Member

@tsullivan tsullivan commented May 5, 2025

Summary

Closes #220175

@tsullivan tsullivan force-pushed the rendering-service/for-sharedux branch 8 times, most recently from 1a30a8f to bd002f6 Compare May 8, 2025 14:20
@tsullivan tsullivan force-pushed the rendering-service/for-sharedux branch from bd002f6 to 4b98a6c Compare May 19, 2025 14:53
@tsullivan tsullivan force-pushed the rendering-service/for-sharedux branch from 4b98a6c to 03edf68 Compare May 27, 2025 23:17
@tsullivan tsullivan force-pushed the rendering-service/for-sharedux branch from 03edf68 to 750910d Compare May 30, 2025 15:03
@elastic elastic deleted a comment from elasticmachine May 30, 2025
@tsullivan tsullivan force-pushed the rendering-service/for-sharedux branch from d934a18 to 86f7fe2 Compare May 30, 2025 18:05
@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 30, 2025
@tsullivan tsullivan marked this pull request as ready for review May 30, 2025 22:56
@tsullivan tsullivan requested review from a team as code owners May 30, 2025 22:56
@elastic elastic deleted a comment from elasticmachine May 30, 2025
Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

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

Advanced settings changes lgtm

tsullivan added a commit that referenced this pull request Jun 4, 2025
…21714)

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

- [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 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>
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #57 / alerting api integration security and spaces enabled - Group 2 Alerts alert deletion schedule alert deletion superuser at space1 should delete the correct of alerts - security inactive alerts
  • [job] [logs] FTR Configs #49 / Cloud Security Posture Test adding Cloud Security Posture Integrations CSPM AWS CIS_AWS Single Manual Shared Access CIS_AWS Single Manual Shared Access Workflow

Metrics [docs]

Async chunks

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

id before after diff
dashboard 627.4KB 627.4KB +9.0B
eventAnnotationListing 204.0KB 204.0KB +9.0B
filesManagement 102.8KB 102.7KB -22.0B
graph 370.1KB 370.1KB +9.0B
home 105.1KB 105.1KB -9.0B
imageEmbeddable 109.9KB 109.9KB +14.0B
kibanaOverview 38.0KB 38.0KB -28.0B
maps 3.0MB 3.0MB +9.0B
savedObjectsTagging 32.7KB 32.7KB -21.0B
visualizations 373.2KB 373.2KB +9.0B
total -21.0B

Page load bundle

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

id before after diff
advancedSettings 5.6KB 5.5KB -77.0B
banners 3.6KB 3.6KB +7.0B
filesManagement 4.8KB 4.7KB -78.0B
globalSearchBar 23.6KB 23.5KB -79.0B
guidedOnboarding 24.0KB 24.0KB -56.0B
kibanaOverview 5.7KB 5.6KB -78.0B
savedObjects 10.5KB 10.4KB -94.0B
savedObjectsTagging 20.1KB 20.1KB -76.0B
serverless 9.5KB 9.5KB -6.0B
total -537.0B

History

Copy link
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 review only. All looks consistent. Great work!

@tsullivan tsullivan merged commit 68174f8 into elastic:main Jun 12, 2025
11 checks passed
@tsullivan tsullivan deleted the rendering-service/for-sharedux branch June 12, 2025 15:40
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

@kibanamachine
Copy link
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 220170

Questions ?

Please refer to the Backport tool documentation

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>
iblancof pushed a commit to iblancof/kibana that referenced this pull request Jun 16, 2025
## Summary

Closes elastic#220175

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 16, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 220170 locally
cc: @tsullivan

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 220170 locally
cc: @tsullivan

@tsullivan
Copy link
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 18, 2025
## Summary

Closes elastic#220175

---------

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

# Conflicts:
#	examples/developer_examples/public/app.tsx
#	src/platform/packages/shared/content-management/content_editor/src/services.tsx
#	src/platform/packages/shared/content-management/table_list_view_table/src/services.tsx
#	src/platform/plugins/shared/home/public/application/application.tsx
#	src/platform/plugins/shared/home/tsconfig.json
#	x-pack/platform/plugins/shared/saved_objects_tagging/tsconfig.json
#	x-pack/platform/plugins/shared/serverless/public/plugin.tsx
tsullivan added a commit to tsullivan/kibana that referenced this pull request Jun 18, 2025
Closes elastic#220175

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 68174f8)
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @tsullivan

2 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @tsullivan

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @tsullivan

tsullivan added a commit that referenced this pull request Jun 23, 2025
…#224470)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[SharedUX] Replace KibanaRenderContextProvider usage
(#220170)](#220170)

<!--- Backport version: 10.0.1 -->

### 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-12T15:39:59Z","message":"[SharedUX]
Replace KibanaRenderContextProvider usage (#220170)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/220175\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"68174f87058edc807fbd1a479469094d11128249","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","backport:version","v9.1.0","v8.19.0"],"title":"[SharedUX]
Replace KibanaRenderContextProvider
usage","number":220170,"url":"https://github.com/elastic/kibana/pull/220170","mergeCommit":{"message":"[SharedUX]
Replace KibanaRenderContextProvider usage (#220170)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/220175\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"68174f87058edc807fbd1a479469094d11128249"}},"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/220170","number":220170,"mergeCommit":{"message":"[SharedUX]
Replace KibanaRenderContextProvider usage (#220170)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/220175\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"68174f87058edc807fbd1a479469094d11128249"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 23, 2025
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.

[SharedUX] Replace KibanaRenderContextProvider with core.rendering.addContext

5 participants