# Backport
This will backport the following commits from `main` to `8.9`:
- [Changing where CodeEditor fields get useDarkMode value
(#159638)](https://github.com/elastic/kibana/pull/159638)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT
[{"author":{"name":"Kurt","email":"kc13greiner@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-07-11T18:02:42Z","message":"Changing
where CodeEditor fields get useDarkMode value (#159638)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/157203\r\nCloseshttps://github.com/elastic/kibana/issues/158051\r\nCloseshttps://github.com/elastic/kibana/issues/158049\r\n\r\nWith the addition
of Per User Dark Mode, components can no longer rely\r\non `uiSettings`
as the source of truth for theme.\r\n\r\nCodeEditor fields used to call
`uiSettings` to determine if Dark Mode\r\nwas enabled, which had been
provided in each callers Kibana React\r\nContext.\r\n\r\nThe new source
of truth for theme is the `CoreStart
>\r\nThemeServiceStart`.\r\n\r\nCurrently, not all callers of CodeEditor
provide the `theme` service in\r\ntheir Kibana Context in a similar way
and some callers don't provide it\r\nat all.\r\n\r\nThis PR updates
CodeEditor to get theme values from the Kibana Context\r\nusing a new
`useKibanaTheme` react hook.\r\n\r\nIt also attempts audit the callers
of CodeEditor to see if their Kibana\r\nContext contains the theme
service at the top level (Where I could add\r\ntheme to a caller's
Context without major changes, I did. Some cases\r\nwill require
CodeOwner guidance).\r\n\r\nThe new `useKibanaTheme` react hook will
throw a TypeError if theme\r\nisn't found in the top level of the Kibana
Context, this will help with\r\ntesting as the component will not
render. I will remove this after\r\ntesting so as not to introduce
breaking changes.\r\n\r\n## Testing\r\n\r\nPlease review files for which
you are CODEOWNER.\r\n\r\nI've attempted to tag all usages of
`CodeEditor`/`CodeEditorFIeld` with\r\na TODO comment with one of the
following scenarios:\r\n\r\n1) a note where theme was provided
already/where I made changes to\r\nprovide it in the appropriate
context\r\n2) I've asked for CODEOWNER guidance\r\n\r\nFor scenario 1,
please pull and test that CodeEditor locally:\r\n\r\n1. Enable Dark Mode
from Edit User Profiles by clicking on the Profile\r\nIcon on the top
right, and updating your profile.\r\n2. Navigate to the CodeEditors in
the plugins you own. If they render\r\nand display in Dark Mode - add a
green check to the table below - and\r\nyou're done!\r\n3. If it is not
rendering, please help me figure out where the theme\r\nservice should
be provided in the context.\r\n\r\nFor scenario 2, we will need to
figure out where to make changes so your\r\ncontext is providing theme.
Some of the more complex usages may need to\r\naddressed in separate
issues.\r\n\r\n\r\n## Tracking\r\n| Team | Plugin | Theme in Context ? |
Verified Working |\r\n| - | - | - | - |\r\n| apm-ui | apm | APM
Storybook broken | ? |\r\n| kibana-presentation | presentation_util |
Yes. | Yes |\r\n| response-ops | trigger_actions_ui | Yes | Yes |\r\n|
response-ops | stack_alerts | Yes | Yes |\r\n| kibana-security |
security | Yes | Yes |\r\n| security-defend-workflows | osquery | Yes |
Yes |\r\n| kibana-app-services | examples/expression_explorer | Yes |
Yes |\r\n| ml-ui | transform | Yes | Yes |\r\n| ml-ui | ml | Yes | Yes
|\r\n| uptime | synthetics | Yes | Yes |\r\n| kibana-gis | maps | Yes |
Yes |\r\n| kibana-gis | file_upload | Yes | Yes |\r\n|
platform-deployment-management | watcher | Yes | [AG] Yes |\r\n|
platform-deployment-management | snapshot_restore | Yes | [AG] Yes
|\r\n| platform-deployment-management | runtime_fields | Yes | [AG] Yes
|\r\n| platform-deployment-management | painless_lab | Yes | [AG] Yes
|\r\n| platform-deployment-management | ingest_pipelines | Yes | [AG]
Yes |\r\n| platform-deployment-management | index_management | Yes |
[AG] Yes |\r\n| platform-deployment-management | grokdebugger | Yes |
[AG] Yes |\r\n| platform-deployment-management | es_ui_shared | Yes |
[AG] Yes |\r\n| fleet | fleet | Yes | Yes |\r\n|
enterprise-search-frontend | enterprise_search | Yes | [AG] Yes |\r\n|
kibana-cloud-security-posture | cloud-security-posture | Yes | yes
|\r\n| sec-cloudnative-integrations | cloud_defend | Yes | Yes |\r\n|
kibana-visualizations/kibana-data-discovery | data | Yes | Yes |\r\n|
kibana-visualizations | examples/testing_embedded_lens | Yes | Yes
|\r\n| kibana-visualizations | vis_types | Yes | Yes |\r\n|
kibana-visualizations | vis_default_editor | Yes | Yes |\r\n|
kibana-visualizations | unified_search | Yes | Yes |\r\n|
kibana-visualizations | packages/kbn-text-based-editor | Yes | Yes
|\r\n| kibana-visualizatons | lens | Yes | Yes|\r\n| kibana-core |
saved_objects_management | Yes | Yes |\r\n| kibana-presentation |
inspector | Yes | Yes |\r\n| kibana-presentation | canvas | Yes | Yes
|\r\n| kibana-data-discovery | discover | Yes | Yes |\r\n|
kibana-data-discovery | data_view_management | Yes | Yes |\r\n|
kibana-data-discovery | data_view_field_editor | Yes | Yes |\r\n|
appex-sharedux | advanced_settings | Yes | Yes |\r\n|
enterprise-search-frontend | serverless_search | Yes | [AG] Yes |\r\n| -
| - | - | - |\r\n\r\n## Unit tests\r\n\r\nCurrently, many tests are
failing since they are probably not providing\r\n`theme` in the context.
Once CODEOWNERs have weighed in on CodeEditors\r\nusages that require
discussion, I will update the accompanying tests.\r\n\r\n## Release
note\r\n- Fixes theming of
CodeEditors\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Alison Goryachev <alisonmllr20@gmail.com>\r\nCo-authored-by: Dima
Arnautov <dmitrii.arnautov@elastic.co>\r\nCo-authored-by: Dima Arnautov
<arnautov.dima@gmail.com>","sha":"323b0477e35cb3e49cc01b56b23969fb72c7111e","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:APM","Team:Security","Team:uptime","Feature:Drilldowns","Team:Fleet","Feature:Security/User
Profile","backport:prev-minor","v8.10.0"],"number":159638,"url":"https://github.com/elastic/kibana/pull/159638","mergeCommit":{"message":"Changing
where CodeEditor fields get useDarkMode value (#159638)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/157203\r\nCloseshttps://github.com/elastic/kibana/issues/158051\r\nCloseshttps://github.com/elastic/kibana/issues/158049\r\n\r\nWith the addition
of Per User Dark Mode, components can no longer rely\r\non `uiSettings`
as the source of truth for theme.\r\n\r\nCodeEditor fields used to call
`uiSettings` to determine if Dark Mode\r\nwas enabled, which had been
provided in each callers Kibana React\r\nContext.\r\n\r\nThe new source
of truth for theme is the `CoreStart
>\r\nThemeServiceStart`.\r\n\r\nCurrently, not all callers of CodeEditor
provide the `theme` service in\r\ntheir Kibana Context in a similar way
and some callers don't provide it\r\nat all.\r\n\r\nThis PR updates
CodeEditor to get theme values from the Kibana Context\r\nusing a new
`useKibanaTheme` react hook.\r\n\r\nIt also attempts audit the callers
of CodeEditor to see if their Kibana\r\nContext contains the theme
service at the top level (Where I could add\r\ntheme to a caller's
Context without major changes, I did. Some cases\r\nwill require
CodeOwner guidance).\r\n\r\nThe new `useKibanaTheme` react hook will
throw a TypeError if theme\r\nisn't found in the top level of the Kibana
Context, this will help with\r\ntesting as the component will not
render. I will remove this after\r\ntesting so as not to introduce
breaking changes.\r\n\r\n## Testing\r\n\r\nPlease review files for which
you are CODEOWNER.\r\n\r\nI've attempted to tag all usages of
`CodeEditor`/`CodeEditorFIeld` with\r\na TODO comment with one of the
following scenarios:\r\n\r\n1) a note where theme was provided
already/where I made changes to\r\nprovide it in the appropriate
context\r\n2) I've asked for CODEOWNER guidance\r\n\r\nFor scenario 1,
please pull and test that CodeEditor locally:\r\n\r\n1. Enable Dark Mode
from Edit User Profiles by clicking on the Profile\r\nIcon on the top
right, and updating your profile.\r\n2. Navigate to the CodeEditors in
the plugins you own. If they render\r\nand display in Dark Mode - add a
green check to the table below - and\r\nyou're done!\r\n3. If it is not
rendering, please help me figure out where the theme\r\nservice should
be provided in the context.\r\n\r\nFor scenario 2, we will need to
figure out where to make changes so your\r\ncontext is providing theme.
Some of the more complex usages may need to\r\naddressed in separate
issues.\r\n\r\n\r\n## Tracking\r\n| Team | Plugin | Theme in Context ? |
Verified Working |\r\n| - | - | - | - |\r\n| apm-ui | apm | APM
Storybook broken | ? |\r\n| kibana-presentation | presentation_util |
Yes. | Yes |\r\n| response-ops | trigger_actions_ui | Yes | Yes |\r\n|
response-ops | stack_alerts | Yes | Yes |\r\n| kibana-security |
security | Yes | Yes |\r\n| security-defend-workflows | osquery | Yes |
Yes |\r\n| kibana-app-services | examples/expression_explorer | Yes |
Yes |\r\n| ml-ui | transform | Yes | Yes |\r\n| ml-ui | ml | Yes | Yes
|\r\n| uptime | synthetics | Yes | Yes |\r\n| kibana-gis | maps | Yes |
Yes |\r\n| kibana-gis | file_upload | Yes | Yes |\r\n|
platform-deployment-management | watcher | Yes | [AG] Yes |\r\n|
platform-deployment-management | snapshot_restore | Yes | [AG] Yes
|\r\n| platform-deployment-management | runtime_fields | Yes | [AG] Yes
|\r\n| platform-deployment-management | painless_lab | Yes | [AG] Yes
|\r\n| platform-deployment-management | ingest_pipelines | Yes | [AG]
Yes |\r\n| platform-deployment-management | index_management | Yes |
[AG] Yes |\r\n| platform-deployment-management | grokdebugger | Yes |
[AG] Yes |\r\n| platform-deployment-management | es_ui_shared | Yes |
[AG] Yes |\r\n| fleet | fleet | Yes | Yes |\r\n|
enterprise-search-frontend | enterprise_search | Yes | [AG] Yes |\r\n|
kibana-cloud-security-posture | cloud-security-posture | Yes | yes
|\r\n| sec-cloudnative-integrations | cloud_defend | Yes | Yes |\r\n|
kibana-visualizations/kibana-data-discovery | data | Yes | Yes |\r\n|
kibana-visualizations | examples/testing_embedded_lens | Yes | Yes
|\r\n| kibana-visualizations | vis_types | Yes | Yes |\r\n|
kibana-visualizations | vis_default_editor | Yes | Yes |\r\n|
kibana-visualizations | unified_search | Yes | Yes |\r\n|
kibana-visualizations | packages/kbn-text-based-editor | Yes | Yes
|\r\n| kibana-visualizatons | lens | Yes | Yes|\r\n| kibana-core |
saved_objects_management | Yes | Yes |\r\n| kibana-presentation |
inspector | Yes | Yes |\r\n| kibana-presentation | canvas | Yes | Yes
|\r\n| kibana-data-discovery | discover | Yes | Yes |\r\n|
kibana-data-discovery | data_view_management | Yes | Yes |\r\n|
kibana-data-discovery | data_view_field_editor | Yes | Yes |\r\n|
appex-sharedux | advanced_settings | Yes | Yes |\r\n|
enterprise-search-frontend | serverless_search | Yes | [AG] Yes |\r\n| -
| - | - | - |\r\n\r\n## Unit tests\r\n\r\nCurrently, many tests are
failing since they are probably not providing\r\n`theme` in the context.
Once CODEOWNERs have weighed in on CodeEditors\r\nusages that require
discussion, I will update the accompanying tests.\r\n\r\n## Release
note\r\n- Fixes theming of
CodeEditors\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Alison Goryachev <alisonmllr20@gmail.com>\r\nCo-authored-by: Dima
Arnautov <dmitrii.arnautov@elastic.co>\r\nCo-authored-by: Dima Arnautov
<arnautov.dima@gmail.com>","sha":"323b0477e35cb3e49cc01b56b23969fb72c7111e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159638","number":159638,"mergeCommit":{"message":"Changing
where CodeEditor fields get useDarkMode value (#159638)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/157203\r\nCloseshttps://github.com/elastic/kibana/issues/158051\r\nCloseshttps://github.com/elastic/kibana/issues/158049\r\n\r\nWith the addition
of Per User Dark Mode, components can no longer rely\r\non `uiSettings`
as the source of truth for theme.\r\n\r\nCodeEditor fields used to call
`uiSettings` to determine if Dark Mode\r\nwas enabled, which had been
provided in each callers Kibana React\r\nContext.\r\n\r\nThe new source
of truth for theme is the `CoreStart
>\r\nThemeServiceStart`.\r\n\r\nCurrently, not all callers of CodeEditor
provide the `theme` service in\r\ntheir Kibana Context in a similar way
and some callers don't provide it\r\nat all.\r\n\r\nThis PR updates
CodeEditor to get theme values from the Kibana Context\r\nusing a new
`useKibanaTheme` react hook.\r\n\r\nIt also attempts audit the callers
of CodeEditor to see if their Kibana\r\nContext contains the theme
service at the top level (Where I could add\r\ntheme to a caller's
Context without major changes, I did. Some cases\r\nwill require
CodeOwner guidance).\r\n\r\nThe new `useKibanaTheme` react hook will
throw a TypeError if theme\r\nisn't found in the top level of the Kibana
Context, this will help with\r\ntesting as the component will not
render. I will remove this after\r\ntesting so as not to introduce
breaking changes.\r\n\r\n## Testing\r\n\r\nPlease review files for which
you are CODEOWNER.\r\n\r\nI've attempted to tag all usages of
`CodeEditor`/`CodeEditorFIeld` with\r\na TODO comment with one of the
following scenarios:\r\n\r\n1) a note where theme was provided
already/where I made changes to\r\nprovide it in the appropriate
context\r\n2) I've asked for CODEOWNER guidance\r\n\r\nFor scenario 1,
please pull and test that CodeEditor locally:\r\n\r\n1. Enable Dark Mode
from Edit User Profiles by clicking on the Profile\r\nIcon on the top
right, and updating your profile.\r\n2. Navigate to the CodeEditors in
the plugins you own. If they render\r\nand display in Dark Mode - add a
green check to the table below - and\r\nyou're done!\r\n3. If it is not
rendering, please help me figure out where the theme\r\nservice should
be provided in the context.\r\n\r\nFor scenario 2, we will need to
figure out where to make changes so your\r\ncontext is providing theme.
Some of the more complex usages may need to\r\naddressed in separate
issues.\r\n\r\n\r\n## Tracking\r\n| Team | Plugin | Theme in Context ? |
Verified Working |\r\n| - | - | - | - |\r\n| apm-ui | apm | APM
Storybook broken | ? |\r\n| kibana-presentation | presentation_util |
Yes. | Yes |\r\n| response-ops | trigger_actions_ui | Yes | Yes |\r\n|
response-ops | stack_alerts | Yes | Yes |\r\n| kibana-security |
security | Yes | Yes |\r\n| security-defend-workflows | osquery | Yes |
Yes |\r\n| kibana-app-services | examples/expression_explorer | Yes |
Yes |\r\n| ml-ui | transform | Yes | Yes |\r\n| ml-ui | ml | Yes | Yes
|\r\n| uptime | synthetics | Yes | Yes |\r\n| kibana-gis | maps | Yes |
Yes |\r\n| kibana-gis | file_upload | Yes | Yes |\r\n|
platform-deployment-management | watcher | Yes | [AG] Yes |\r\n|
platform-deployment-management | snapshot_restore | Yes | [AG] Yes
|\r\n| platform-deployment-management | runtime_fields | Yes | [AG] Yes
|\r\n| platform-deployment-management | painless_lab | Yes | [AG] Yes
|\r\n| platform-deployment-management | ingest_pipelines | Yes | [AG]
Yes |\r\n| platform-deployment-management | index_management | Yes |
[AG] Yes |\r\n| platform-deployment-management | grokdebugger | Yes |
[AG] Yes |\r\n| platform-deployment-management | es_ui_shared | Yes |
[AG] Yes |\r\n| fleet | fleet | Yes | Yes |\r\n|
enterprise-search-frontend | enterprise_search | Yes | [AG] Yes |\r\n|
kibana-cloud-security-posture | cloud-security-posture | Yes | yes
|\r\n| sec-cloudnative-integrations | cloud_defend | Yes | Yes |\r\n|
kibana-visualizations/kibana-data-discovery | data | Yes | Yes |\r\n|
kibana-visualizations | examples/testing_embedded_lens | Yes | Yes
|\r\n| kibana-visualizations | vis_types | Yes | Yes |\r\n|
kibana-visualizations | vis_default_editor | Yes | Yes |\r\n|
kibana-visualizations | unified_search | Yes | Yes |\r\n|
kibana-visualizations | packages/kbn-text-based-editor | Yes | Yes
|\r\n| kibana-visualizatons | lens | Yes | Yes|\r\n| kibana-core |
saved_objects_management | Yes | Yes |\r\n| kibana-presentation |
inspector | Yes | Yes |\r\n| kibana-presentation | canvas | Yes | Yes
|\r\n| kibana-data-discovery | discover | Yes | Yes |\r\n|
kibana-data-discovery | data_view_management | Yes | Yes |\r\n|
kibana-data-discovery | data_view_field_editor | Yes | Yes |\r\n|
appex-sharedux | advanced_settings | Yes | Yes |\r\n|
enterprise-search-frontend | serverless_search | Yes | [AG] Yes |\r\n| -
| - | - | - |\r\n\r\n## Unit tests\r\n\r\nCurrently, many tests are
failing since they are probably not providing\r\n`theme` in the context.
Once CODEOWNERs have weighed in on CodeEditors\r\nusages that require
discussion, I will update the accompanying tests.\r\n\r\n## Release
note\r\n- Fixes theming of
CodeEditors\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Alison Goryachev <alisonmllr20@gmail.com>\r\nCo-authored-by: Dima
Arnautov <dmitrii.arnautov@elastic.co>\r\nCo-authored-by: Dima Arnautov
<arnautov.dima@gmail.com>","sha":"323b0477e35cb3e49cc01b56b23969fb72c7111e"}}]}]
BACKPORT-->
Co-authored-by: Kurt <kc13greiner@users.noreply.github.com>
Fixes https://github.com/elastic/kibana/issues/149344
This PR migrates all plugins to packages automatically. It does this
using `node scripts/lint_packages` to automatically migrate
`kibana.json` files to `kibana.jsonc` files. By doing this automatically
we can simplify many build and testing procedures to only support
packages, and not both "packages" and "synthetic packages" (basically
pointers to plugins).
The majority of changes are in operations related code, so we'll be
having operations review this before marking it ready for review. The
vast majority of the code owners are simply pinged because we deleted
all `kibana.json` files and replaced them with `kibana.jsonc` files, so
we plan on leaving the PR ready-for-review for about 24 hours before
merging (after feature freeze), assuming we don't have any blockers
(especially from @elastic/kibana-core since there are a few core
specific changes, though the majority were handled in #149370).
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Dearest Reviewers 👋
I've been working on this branch with @mistic and @tylersmalley and
we're really confident in these changes. Additionally, this changes code
in nearly every package in the repo so we don't plan to wait for reviews
to get in before merging this. If you'd like to have a concern
addressed, please feel free to leave a review, but assuming that nobody
raises a blocker in the next 24 hours we plan to merge this EOD pacific
tomorrow, 12/22.
We'll be paying close attention to any issues this causes after merging
and work on getting those fixed ASAP. 🚀
---
The operations team is not confident that we'll have the time to achieve
what we originally set out to accomplish by moving to Bazel with the
time and resources we have available. We have also bought ourselves some
headroom with improvements to babel-register, optimizer caching, and
typescript project structure.
In order to make sure we deliver packages as quickly as possible (many
teams really want them), with a usable and familiar developer
experience, this PR removes Bazel for building packages in favor of
using the same JIT transpilation we use for plugins.
Additionally, packages now use `kbn_references` (again, just copying the
dx from plugins to packages).
Because of the complex relationships between packages/plugins and in
order to prepare ourselves for automatic dependency detection tools we
plan to use in the future, this PR also introduces a "TS Project Linter"
which will validate that every tsconfig.json file meets a few
requirements:
1. the chain of base config files extended by each config includes
`tsconfig.base.json` and not `tsconfig.json`
1. the `include` config is used, and not `files`
2. the `exclude` config includes `target/**/*`
3. the `outDir` compiler option is specified as `target/types`
1. none of these compiler options are specified: `declaration`,
`declarationMap`, `emitDeclarationOnly`, `skipLibCheck`, `target`,
`paths`
4. all references to other packages/plugins use their pkg id, ie:
```js
// valid
{
"kbn_references": ["@kbn/core"]
}
// not valid
{
"kbn_references": [{ "path": "../../../src/core/tsconfig.json" }]
}
```
5. only packages/plugins which are imported somewhere in the ts code are
listed in `kbn_references`
This linter is not only validating all of the tsconfig.json files, but
it also will fix these config files to deal with just about any
violation that can be produced. Just run `node scripts/ts_project_linter
--fix` locally to apply these fixes, or let CI take care of
automatically fixing things and pushing the changes to your PR.
> **Example:** [`64e93e5`
(#146212)](64e93e5806)
When I merged main into my PR it included a change which removed the
`@kbn/core-injected-metadata-browser` package. After resolving the
conflicts I missed a few tsconfig files which included references to the
now removed package. The TS Project Linter identified that these
references were removed from the code and pushed a change to the PR to
remove them from the tsconfig.json files.
## No bazel? Does that mean no packages??
Nope! We're still doing packages but we're pretty sure now that we won't
be using Bazel to accomplish the 'distributed caching' and 'change-based
tasks' portions of the packages project.
This PR actually makes packages much easier to work with and will be
followed up with the bundling benefits described by the original
packages RFC. Then we'll work on documentation and advocacy for using
packages for any and all new code.
We're pretty confident that implementing distributed caching and
change-based tasks will be necessary in the future, but because of
recent improvements in the repo we think we can live without them for
**at least** a year.
## Wait, there are still BUILD.bazel files in the repo
Yes, there are still three webpack bundles which are built by Bazel: the
`@kbn/ui-shared-deps-npm` DLL, `@kbn/ui-shared-deps-src` externals, and
the `@kbn/monaco` workers. These three webpack bundles are still created
during bootstrap and remotely cached using bazel. The next phase of this
project is to figure out how to get the package bundling features
described in the RFC with the current optimizer, and we expect these
bundles to go away then. Until then any package that is used in those
three bundles still needs to have a BUILD.bazel file so that they can be
referenced by the remaining webpack builds.
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* Update all usages of EuiPageTemplate to EuiPageTemplate_Deprecated
* EuiPageContent_Deprecated as EuiPageContent
* EuiPageContentBody_Deprecated as EuiPageContentBody
* EuiPageContentHeader_Deprecated as EuiPageContentHeader
* EuiPageContentHeaderSection_Deprecated as EuiPageContentHeaderSection
* EuiPageSideBar_Deprecated as EuiPageSideBar
* EuiPageContent__Deprecated to EuiPageContent_Deprecated
* Fix rogue semi-colons
* WIP: NoDataConfigPage & NoDataPage converted to new template
- `withSolutionNav` not yet handled
* WIP: KibanaPageTemplateInner converted to use new template
- Pushes existing `pageHeader` prompts onto created EuiPageTemplate.PageHeader
- Uses `isEmptyState` to push `pageHeader` props to EuiPageTemplate.EmptyPrompt instead (if `children` are not supplied)
* WIP: `withSolutionNav` now renders the sidebar content properly
- Collapsing isn’t working (minWidth isn’t updating)
* Fixing stickiness of sidebar
* [Security] Fixed SecuritySolutionTemplateWrapper’s usage
- Moved `bottomBar` to EuiPageTemplate.BottomBar (now contained in just the page contents)
- Change EuiPanel children wrapper with EuiPageTemplate.Section
* [O11y] Wrap `children` with EuiPageTemplate.Section
* Fix getting_started usage
* WIP: Fixing types
* Removing `template` pass through
* Set EUI to 63.0.0
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* More import fixes
* Sidebar component update
* Expand `KibanaPageTemplate` to all namespaced EUI counterparts
- Updated `docs/tutorials` mdx page
- Fixed SolutionNav prop types
* Updated the tutorial mdx page
* [Stack Management] Updated app layout to new template
- Some temporary props applied for BWC until all other pages can be converted
- Converted `API Keys` page’s layout (and especially prompt usags) to new paradigm
* Fix circular dep
* Fix new circular dependency
- copying and pasting types from KibanaPageTemplateProps, but ah well
* [Security Solution] Remove `template` prop - no longer a prop on Kibana/EuiPageTemplate
* [O11y] Allow customizing EuiPageTemplate.Section wrapper
- converts pageBodyProps
- fixes non-centered loading template
* [Enterprise Search] Update page templates
- fix layouts by auto-wrapping an EuiPageSection for padding, while adding a `customPageSections` prop for more custom sections/layouts
- re-center 404 errors
- update tests
* Update KibanaPageTemplate tests
* Update snapshots
* Fix FTR test with removed EUI classNames
* Fix FTR tests with changed kbn classNames
* Update failing dashboard snapshots
- drop shadow changed slightly in EUI
* Fix failing Security Cypress test
* [O11y] Fix Inventory page using deprecated CSS hooks
* [O11y][Uptime] Fix missing bottom bars
- Modifies ObservabilityPageTemplate to accept a `bottomBar` prop (a la the old EuiPageTemplate behavior)
NOTE: This opinionated page layout structure is starting to feel like it could be potentially limiting / have all the same pitfalls the previous EuiPageTemplate did. If so, consider something closer to the Enterprise Search page template conversion (`customPageSections`).
- Misc cleanup: Use `KibanaPageTemplate` over `EuiPageTemplate`
* [O11y] Fix route template typing
- Since theObservabilityPageTemplate is using the new Eui/KibanaPageTemplate, its child templates and types need to be updated accordingly
* Fix broken minWidth behavior
- was an EUI issue that required a patch release
+ update snapshots
* [Security Solution] Type fixes, restore empty state
- Fix empty state logic removed in a previous commit
- bogarts KibanaPageTemplate's `isEmptyState` prop instead of using `template="noData"`
- extend template wrappers to past ...rest to underlying Kibana/EuiPageTemplate
+ replace EuiPageTemplate with KibanaPageTemplate for consistency
* Fix failing synthetics selector
* Grab EUI v63.0.6
- for deprecation tags and section tag support
* Fix Kibana Overview plugin layout
- needs to use KibanaPageTemplate.Section to get padding back
- use `bottomBorder` prop over horizontal rules
- restore previous page color via panelled=false
* Convert Home plugin to new KibanaPageTemplate
- use KibanaPageTemplate.Section instead to preserve page width/paddings
- use `bottomBorder` instead of `EuiHorizontalRule`
- NOTE: This causes margins to decrease slightly from xxl to xl (largest padding available for EuiPageSection) - this can be restored by CSS overrides if desired
- update CSS to preserve previous looks, + convert to logical properties
* [O11y] Fix non-centered empty/loading states
* [O11y] Restore subdued background on various empty state prompts
* [O11y] Fix all instances of views that require a scrollable full-height child
+ restore comment for inventory view
* [O11y][ux] Fix broken sidebar
- The entire app was missing a wrapping EuiProvider, and as such breakpoint utils were not working, and the sidebar was missing
+ misc cleanup
- remove unnecessary fragment
- remove role="main" attr - now that EuiPageTemplate sets a `main` tag, they'll conflict
- add isEmptyState to center loading component
* [APM Cypress tests] harden flaky test
* [APM Cypress tests] Fix failing Cypress test, again
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): auto creation of the package.json for the new types pkg rule
* chore(NA): first alpha api extractor working version
* chore(NA): support kbn-analytics
* chore(NA): correctly read tsconfig files and deps from ts_config rule
* chore(NA): layed out pkg_npm_types tree artifact custom rule
* chore(NA): missing todos
* chore(NA): node modules link mapping
* chore(NA): fully working pkg_npm_types rule
* chore(NA): fix changes on new packages using elastic datemath pkgs
* docs(NA): remove todo
* docs(NA): last todo text correction
* chore(NA): removed commented lines
* fix(NA): include missing package version
* chore(NA): include license keys
* chore(NA): change mock types package into private
* chore(NA): disable validator on ts_project rule
* chore(NA): use the wrapper for ts_project
* commit using @elastic.co
* chore(NA): commit using @elastic.co
* chore(NA): split types from code on @kbn/i18n
* chore(NA): update yarn.lock file
* chore(NA): split @kbn/i18n and @kbn/i18n-react
* chore(NA): missing import fix
* chore(NA): fix jest project configs
* chore(NA): change imports on kbn i18n
* chore(NA): change imports on kbn i18n
* chore(NA): correct loader imports
* chore(NA): missnig i18nLoader export key
* chore(NA): fix type exports
* chore(NA): export type only
* chore(NA): export type only
* fix(NA): type exports
* chore(NA): missing @Kbn/i18n/react imports
* chore(NA): missing skip path for kbn-i18n-react
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* eui to v41.0.0
* update eui i18n tokens
* sass tokens
* EuiLoadingKibana
* EuiCodeEditor
* subdued
* betaBadgeProps
* EuiCodeEditor null-loader
* src secondary -> success
* [enterprise_search] Deprecate 'secondary' color prop
* [apm] Deprecate 'secondary' color prop
* [canvas] Deprecate 'secondary' color prop
* [cases] Deprecate 'secondary' color prop
* [cross_cluster_replication] Deprecate 'secondary' color prop
* [data_enhanced] Deprecate 'secondary' color prop
* [data_visualizer] Deprecate 'secondary' color prop
* [fleet] Deprecate 'secondary' color prop
* [index_management] Deprecate 'secondary' color prop
* [infra] Deprecate 'secondary' color prop
* [ingest_pipelines] Deprecate 'secondary' color prop
* [maps] Deprecate 'secondary' color prop
* [ml] Deprecate 'secondary' color prop
* [monitoring] Deprecate 'secondary' color prop
* [observability] Deprecate 'secondary' color prop
NB: conditional became `type === 'success' ? 'success' : type` after find&replace, which felt fairly redundant, so I simplified it
* [osquery] Deprecate 'secondary' color prop
* [painless_lab] Deprecate 'secondary' color prop
* [remote_clusters] Deprecate 'secondary' color prop
* [rollup] Deprecate 'secondary' color prop
* [security] Deprecate 'secondary' color prop
* [security_solution] Deprecate 'secondary' color prop
NB: several conditional became `type === 'success' ? 'success' : type` after find&replace, which felt fairly redundant, so I simplified them
* [snapshot_restore] Deprecate 'secondary' color prop
* [spaces] Deprecate 'secondary' color prop
* [transform] Deprecate 'secondary' color prop
* [triggers_actions_ui] Deprecate 'secondary' color prop
* [uptime] Deprecate 'secondary' color prop
* [watcher] Deprecate 'secondary' color prop
* [infra] replace ambiguous 'secondary' color
- GaugesSectionVis doesn't appear to use the color property but it's required by the SeriesOverrides types, so changing it just in case
* [examples] Deprecate 'secondary' color prop
* [uptime] deprecate 'subdued' prop on EuiButtonIcon
* revert EuiKeyPadMenuItem betaBadge props
* mobileOptions
* examples/ updates
* fix brace import
* fix type exports
* update expressions_explorer requiredBundles
* remove make_id mocks
* snapshot updates
* fix import 🤦
* Fix `ReferenceError: ace is not defined` Jest failures
* Remove unused brace import (?)
- Assuming here, as no code editor is actually being used in this file
* Fix failing Jest test due to EuiCodeEditor moving to es_ui_shared plugin
+ minor cleanup of `jest.mock()`s
* Fix failing Jest test due to snapshot update
* Fix failing `TypeError: Cannot read properties of undefined (reading 'euiBorderRadius')` Jest test
- since this is being mount()'d, EuiThemeProvider as a wrapper is needed to prevent the failure
* access uiSettings
* Move react-ace dependency into kbn-ui-shared-deps-npm
* Revert App Search shenanigans
- caused local unsaved changes shenanigans, somehow
* secondary -> success
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen@elastic.co>
* Update ESLint config to disallow usage of the any type
* Remove the any type usages from the expressions plugin
* Update plugins using expressions according to the updated public API
* [build_ts_refs] improve caches, allow building a subset of projects
* cleanup project def script and update refs in type check script
* rename browser_bazel config to avoid kebab-case
* remove execInProjects() helper
* list references for tsconfig.types.json for api-extractor workload
* disable composite features of tsconfig.types.json for api-extractor
* set declaration: true to avoid weird debug error
* fix jest tests
Co-authored-by: spalger <spalger@users.noreply.github.com>
* Add more information on kibana.json properties, update example plugin kibana.jsons
* fix auto save fix
* Update anatomy_of_a_plugin.mdx
* Update anatomy_of_a_plugin.mdx
* update based on review comments
* Update anatomy_of_a_plugin.mdx
* Put kibanaVersion back and adjust the explanations of the fields
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add partial result flag to the execution result
* Update expressions plugin run method to return observable
* Update data getter in the execution contract to return observable
* Update the expression loader to take into account the partial results flag