Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SharedUX/React render] prevent double-nested EuiProvider #182005

Merged
merged 13 commits into from Apr 30, 2024

Conversation

tsullivan
Copy link
Member

Summary

Addresses extraneous errors discovered in #180819

@tsullivan tsullivan requested a review from a team as a code owner April 29, 2024 16:05
@tsullivan tsullivan added release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Apr 29, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

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.

Great work. Might wait for @cee-chen to weigh in, but I think it's ok to address later/async.

import type { I18nStart } from '@kbn/core-i18n-browser';

// @ts-expect-error EUI exports this component internally, but Kibana isn't picking it up its types
import { useIsNestedEuiProvider } from '@elastic/eui/lib/components/provider/nested';
Copy link
Contributor

Choose a reason for hiding this comment

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

@cee-chen Can this be something addressed in a future EUI release? Or is this a mistake somehow, (I don't see how).

Copy link
Member

@cee-chen cee-chen Apr 29, 2024

Choose a reason for hiding this comment

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

Not a mistake, this has been done other places in Kibana as well (whenever devs reach into @elastic/eui/lib). TBH I'm not 100% sure it's solvable on just the EUI level - I think it's a weird factor of how Kibana optimizes shared dependencies and its bazel pipeline. We might need to loop in KibanaOps for this as I'm not too sure why this happens either - I do believe it used to work at some point.

packages/react/kibana_context/root/root_provider.tsx Outdated Show resolved Hide resolved
@@ -11,9 +11,9 @@ import useObservable from 'react-use/lib/useObservable';

import { EuiThemeProvider, EuiThemeProviderProps } from '@elastic/eui';

// @ts-ignore EUI exports this component internally, but Kibana isn't picking it up its types
// @ts-expect-error EUI exports this component internally, but Kibana isn't picking it up its types
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch.

@tsullivan tsullivan requested a review from cee-chen April 29, 2024 16:46
tsullivan and others added 3 commits April 29, 2024 09:47
@tsullivan tsullivan requested a review from a team as a code owner April 29, 2024 19:22
@tsullivan tsullivan enabled auto-merge (squash) April 29, 2024 19:22
// @ts-expect-error EUI exports this component internally, but Kibana isn't picking it up its types
import { useIsNestedEuiProvider } from '@elastic/eui/lib/components/provider/nested';
// @ts-expect-error EUI exports this component internally, but Kibana isn't picking it up its types
import { emitEuiProviderWarning } from '@elastic/eui/lib/services/theme/warning';
Copy link
Member

Choose a reason for hiding this comment

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

Did we look into adding this to kbn-ui-shared-deps?

Copy link
Member Author

@tsullivan tsullivan Apr 29, 2024

Choose a reason for hiding this comment

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

Thanks for the suggestion. I am looking into it now: dd3f12a

Copy link
Member

Choose a reason for hiding this comment

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

TIL this is an option - going to bookmark this for future reference 👀

@tsullivan tsullivan disabled auto-merge April 29, 2024 19:28
@tsullivan
Copy link
Member Author

tsullivan commented Apr 30, 2024

Broken by dd3f12a... still working on this.

image

@tsullivan tsullivan enabled auto-merge (squash) April 30, 2024 14:59
@tsullivan
Copy link
Member Author

/ci

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
advancedSettings 109 110 +1
aiops 493 491 -2
alerting 175 176 +1
banners 32 33 +1
canvas 1227 1228 +1
cases 752 753 +1
cloudChat 34 35 +1
cloudDataMigration 21 22 +1
cloudLinks 74 75 +1
console 248 246 -2
controls 158 159 +1
core 516 514 -2
crossClusterReplication 133 134 +1
dashboard 459 460 +1
dashboardEnhanced 89 90 +1
data 509 510 +1
dataViewEditor 80 81 +1
dataViewFieldEditor 161 162 +1
dataViewManagement 224 225 +1
dataVisualizer 671 669 -2
discover 794 795 +1
embeddable 136 137 +1
enterpriseSearch 2270 2268 -2
eventAnnotationListing 534 535 +1
exploratoryView 180 181 +1
expressionGauge 102 103 +1
expressionHeatmap 172 173 +1
expressionLegacyMetricVis 46 47 +1
expressionMetricVis 110 111 +1
expressionPartitionVis 187 188 +1
expressionTagcloud 161 162 +1
expressionXY 247 248 +1
filesManagement 164 165 +1
globalSearchBar 47 48 +1
graph 272 273 +1
guidedOnboarding 41 42 +1
home 265 266 +1
imageEmbeddable 134 135 +1
indexLifecycleManagement 218 219 +1
indexManagement 652 653 +1
ingestPipelines 311 312 +1
inspector 77 78 +1
interactiveSetup 57 58 +1
kibanaOverview 135 136 +1
kibanaReact 268 266 -2
kibanaUtils 180 178 -2
lens 1412 1413 +1
licenseManagement 124 125 +1
licensing 28 29 +1
links 128 129 +1
logstash 74 75 +1
management 127 128 +1
ml 2031 2032 +1
mockIdpPlugin 40 38 -2
monitoring 493 494 +1
navigation 87 88 +1
newsfeed 26 27 +1
observability 512 510 -2
observabilityAIAssistantApp 236 234 -2
observabilityLogsExplorer 213 214 +1
presentationPanel 98 99 +1
profiling 301 302 +1
remoteClusters 123 124 +1
reporting 119 120 +1
rollup 137 138 +1
savedObjects 51 52 +1
savedObjectsManagement 113 114 +1
savedObjectsTagging 110 111 +1
searchNotebooks 47 45 -2
searchPlayground 174 175 +1
security 511 512 +1
securitySolution 5464 5465 +1
serverless 71 72 +1
serverlessSearch 315 316 +1
share 96 94 -2
slo 745 743 -2
snapshotRestore 209 210 +1
spaces 268 269 +1
synthetics 980 978 -2
telemetry 52 53 +1
transform 440 441 +1
triggersActionsUi 733 734 +1
uiActions 38 39 +1
unifiedSearch 251 252 +1
upgradeAssistant 168 169 +1
uptime 583 581 -2
ux 200 198 -2
visDefaultEditor 203 204 +1
visTypeTable 49 50 +1
visTypeTimelion 61 62 +1
visTypeTimeseries 457 458 +1
visTypeVislib 177 178 +1
visualizations 426 427 +1
watcher 188 189 +1
total +46

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
@kbn/ui-shared-deps-src 46 47 +1

Async chunks

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

id before after diff
aiops 414.6KB 414.4KB -242.0B
alerting 91.5KB 92.4KB +821.0B
apm 3.2MB 3.2MB -1.0B
canvas 1.1MB 1.1MB +829.0B
cases 476.1KB 476.1KB +2.0B
cloudDataMigration 5.0KB 5.8KB +821.0B
console 441.1KB 440.1KB -1.0KB
controls 213.2KB 215.6KB +2.4KB
crossClusterReplication 147.9KB 148.7KB +825.0B
dashboard 407.3KB 408.9KB +1.6KB
dataViewFieldEditor 175.3KB 175.3KB +2.0B
dataViewManagement 139.2KB 140.1KB +880.0B
dataVisualizer 659.5KB 658.4KB -1.0KB
discover 636.4KB 637.2KB +833.0B
enterpriseSearch 2.7MB 2.7MB -1.4KB
eventAnnotationListing 209.4KB 210.3KB +826.0B
exploratoryView 181.2KB 182.0KB +821.0B
filesManagement 101.4KB 102.2KB +822.0B
graph 397.2KB 398.0KB +824.0B
home 147.2KB 148.0KB +824.0B
imageEmbeddable 64.9KB 66.5KB +1.6KB
indexLifecycleManagement 147.9KB 148.8KB +923.0B
indexManagement 656.2KB 656.2KB +5.0B
ingestPipelines 367.8KB 367.8KB +2.0B
kibanaOverview 52.8KB 53.6KB +835.0B
kibanaReact 165.6KB 165.6KB -2.0B
kibanaUtils 60.8KB 60.8KB -1.0B
licenseManagement 45.7KB 46.5KB +837.0B
links 22.2KB 23.0KB +821.0B
logstash 32.5KB 33.3KB +825.0B
management 44.5KB 45.3KB +822.0B
maps 3.0MB 3.0MB +409.0B
ml 4.2MB 4.2MB +2.4KB
monitoring 532.5KB 533.3KB +825.0B
observability 287.7KB 286.7KB -1.0KB
observabilityAIAssistantApp 151.0KB 151.0KB +2.0B
observabilityLogsExplorer 154.3KB 155.1KB +826.0B
profiling 407.9KB 408.7KB +828.0B
remoteClusters 78.1KB 78.8KB +799.0B
rollup 113.5KB 114.4KB +824.0B
savedObjectsManagement 83.5KB 84.3KB +821.0B
searchNotebooks 13.2KB 11.8KB -1.4KB
searchPlayground 153.9KB 154.7KB +822.0B
security 575.1KB 575.1KB +8.0B
securitySolution 13.7MB 13.7MB +3.2KB
serverlessSearch 464.1KB 465.7KB +1.6KB
slo 726.3KB 726.0KB -244.0B
snapshotRestore 261.2KB 262.0KB +825.0B
spaces 175.0KB 175.0KB +2.0B
synthetics 1.0MB 1.0MB -1.0KB
transform 393.1KB 393.9KB +821.0B
triggersActionsUi 1.6MB 1.6MB +5.6KB
unifiedSearch 224.5KB 224.5KB +4.0B
uptime 468.1KB 467.1KB -1.0KB
ux 169.9KB 168.8KB -1.0KB
visTypeTimeseries 512.6KB 512.6KB +7.0B
visTypeVega 1.8MB 1.8MB -420.0B
visTypeVislib 339.9KB 339.9KB +2.0B
visualizations 283.3KB 283.3KB +4.0B
watcher 165.1KB 165.9KB +825.0B
total +30.8KB

Page load bundle

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

id before after diff
advancedSettings 6.5KB 7.3KB +907.0B
aiops 7.2KB 7.3KB +89.0B
alerting 23.6KB 23.7KB +89.0B
banners 9.5KB 10.4KB +907.0B
canvas 14.0KB 14.0KB +89.0B
cases 153.1KB 154.0KB +909.0B
cloudChat 13.2KB 14.0KB +907.0B
cloudDataMigration 4.6KB 4.7KB +89.0B
cloudLinks 24.4KB 25.3KB +913.0B
console 33.0KB 33.1KB +89.0B
controls 42.3KB 42.4KB +89.0B
core 408.0KB 407.0KB -983.0B
crossClusterReplication 12.2KB 12.3KB +89.0B
dashboard 37.1KB 37.2KB +89.0B
dashboardEnhanced 16.8KB 17.7KB +912.0B
data 417.5KB 418.4KB +909.0B
dataViewEditor 12.6KB 13.4KB +907.0B
dataViewFieldEditor 25.4KB 26.3KB +909.0B
dataViewManagement 5.0KB 5.1KB +89.0B
dataVisualizer 23.9KB 24.0KB +89.0B
discover 34.9KB 35.0KB +89.0B
embeddable 69.2KB 70.1KB +907.0B
enterpriseSearch 48.4KB 48.5KB +89.0B
eventAnnotationListing 10.7KB 10.8KB +89.0B
exploratoryView 43.8KB 43.9KB +89.0B
expressionGauge 15.3KB 16.2KB +907.0B
expressionHeatmap 16.2KB 17.1KB +907.0B
expressionLegacyMetricVis 11.6KB 12.5KB +907.0B
expressionMetricVis 15.2KB 16.1KB +907.0B
expressionPartitionVis 28.0KB 28.9KB +907.0B
expressionTagcloud 12.1KB 13.0KB +907.0B
expressionXY 40.3KB 41.2KB +913.0B
filesManagement 3.8KB 3.9KB +89.0B
globalSearchBar 27.4KB 28.3KB +908.0B
graph 7.9KB 8.0KB +89.0B
guidedOnboarding 28.6KB 29.5KB +911.0B
home 11.5KB 11.6KB +89.0B
imageEmbeddable 5.8KB 5.9KB +89.0B
indexLifecycleManagement 27.2KB 27.3KB +89.0B
indexManagement 42.3KB 43.2KB +907.0B
ingestPipelines 15.7KB 16.6KB +907.0B
inspector 24.0KB 24.9KB +907.0B
interactiveSetup 58.7KB 59.5KB +911.0B
kbnUiSharedDeps-npmDll 6.3MB 6.3MB +289.0B
kbnUiSharedDeps-srcJs 3.1MB 3.1MB +128.0B
kibanaOverview 15.0KB 15.1KB +89.0B
kibanaReact 40.3KB 39.3KB -994.0B
kibanaUtils 73.0KB 71.6KB -1.3KB
lens 49.1KB 50.0KB +907.0B
licenseManagement 11.2KB 11.3KB +89.0B
licensing 10.7KB 11.6KB +907.0B
links 33.7KB 33.7KB +89.0B
logstash 13.9KB 14.0KB +89.0B
management 10.6KB 10.7KB +89.0B
maps 50.6KB 50.7KB +89.0B
ml 77.1KB 77.2KB +90.0B
mockIdpPlugin 11.5KB 10.6KB -968.0B
monitoring 24.2KB 24.3KB +89.0B
navigation 30.2KB 31.1KB +912.0B
newsfeed 11.6KB 12.5KB +907.0B
observability 151.1KB 151.1KB +89.0B
observabilityAIAssistantApp 13.7KB 12.4KB -1.3KB
observabilityLogsExplorer 16.2KB 16.3KB +89.0B
presentationPanel 42.3KB 43.1KB +907.0B
profiling 18.3KB 18.4KB +89.0B
remoteClusters 9.0KB 9.1KB +89.0B
reporting 55.2KB 56.1KB +907.0B
rollup 12.0KB 12.1KB +89.0B
savedObjects 24.4KB 25.3KB +907.0B
savedObjectsManagement 19.7KB 19.8KB +89.0B
savedObjectsTagging 21.5KB 22.4KB +907.0B
searchNotebooks 5.1KB 5.2KB +89.0B
searchPlayground 6.2KB 6.3KB +89.0B
security 67.8KB 68.7KB +907.0B
securitySolution 82.7KB 82.7KB +89.0B
serverless 12.7KB 13.6KB +907.0B
serverlessSearch 19.1KB 19.2KB +89.0B
share 72.1KB 71.1KB -968.0B
slo 22.4KB 22.5KB +89.0B
snapshotRestore 27.5KB 27.6KB +89.0B
spaces 25.6KB 26.5KB +907.0B
synthetics 19.4KB 19.5KB +89.0B
telemetry 21.3KB 22.1KB +907.0B
transform 18.7KB 18.7KB +89.0B
triggersActionsUi 120.8KB 120.9KB +89.0B
uiActions 22.0KB 22.9KB +916.0B
unifiedSearch 37.9KB 38.8KB +907.0B
upgradeAssistant 23.8KB 24.7KB +907.0B
uptime 22.4KB 22.5KB +89.0B
ux 6.8KB 6.9KB +89.0B
visDefaultEditor 23.0KB 23.9KB +907.0B
visTypeTable 18.3KB 19.2KB +907.0B
visTypeTimelion 12.5KB 13.4KB +907.0B
visTypeTimeseries 19.7KB 20.5KB +907.0B
visTypeVega 35.2KB 36.1KB +911.0B
visTypeVislib 14.4KB 15.3KB +907.0B
visualizations 61.1KB 62.0KB +907.0B
watcher 13.6KB 13.7KB +89.0B
total +37.7KB
Unknown metric groups

API count

id before after diff
@kbn/ui-shared-deps-src 55 56 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@tsullivan tsullivan merged commit 2766ec0 into elastic:main Apr 30, 2024
19 checks passed
@kibanamachine kibanamachine added v8.15.0 backport:skip This commit does not require backporting labels Apr 30, 2024
@tsullivan tsullivan deleted the sharedux/use-is_nested_eui_provider branch April 30, 2024 21:41
yuliacech pushed a commit to yuliacech/kibana that referenced this pull request May 3, 2024
…2005)

## Summary

Addresses extraneous errors discovered in
elastic#180819

---------

Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants