# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] replace Embeddable ViewMode with presentation-publishing
ViewMode (#211960)](https://github.com/elastic/kibana/pull/211960)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2025-03-04T16:05:23Z","message":"[embeddable]
replace Embeddable ViewMode with presentation-publishing ViewMode
(#211960)\n\nEmbeddable ViewMode is part of legacy embeddable
architecture. This PR\nremoves Embeddable ViewMode and replaces its
usage with\npresentation-publishing ViewMode. presentation-publishing
ViewMode is a\nstring literal type so an enum is no longer
needed.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"b213eb6bb296c803e6f21695a20f969af1d2e611","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Embedding","Team:Presentation","release_note:skip","Team:obs-ux-infra_services","Team:obs-ux-management","project:embeddableRebuild","backport:version","v9.1.0","v8.19.0"],"title":"[embeddable]
replace Embeddable ViewMode with presentation-publishing
ViewMode","number":211960,"url":"https://github.com/elastic/kibana/pull/211960","mergeCommit":{"message":"[embeddable]
replace Embeddable ViewMode with presentation-publishing ViewMode
(#211960)\n\nEmbeddable ViewMode is part of legacy embeddable
architecture. This PR\nremoves Embeddable ViewMode and replaces its
usage with\npresentation-publishing ViewMode. presentation-publishing
ViewMode is a\nstring literal type so an enum is no longer
needed.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"b213eb6bb296c803e6f21695a20f969af1d2e611"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211960","number":211960,"mergeCommit":{"message":"[embeddable]
replace Embeddable ViewMode with presentation-publishing ViewMode
(#211960)\n\nEmbeddable ViewMode is part of legacy embeddable
architecture. This PR\nremoves Embeddable ViewMode and replaces its
usage with\npresentation-publishing ViewMode. presentation-publishing
ViewMode is a\nstring literal type so an enum is no longer
needed.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"b213eb6bb296c803e6f21695a20f969af1d2e611"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
---------
Co-authored-by: jennypavlova <jennypavlova94@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Backport
This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Makes the clear control button optional
(#212848)](https://github.com/elastic/kibana/pull/212848)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2025-03-03T18:03:57Z","message":"[ES|QL]
Makes the clear control button optional (#212848)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/212605\n\nHere we are removing
the clear button from the ES|QL control as clearing\nwill result in
wrong charts. I also considered the reset but when there\nis no changes
should be hidden or disabled. This seems to me as a\nsmaller change and
taken under consideration that dashboard already\nallows resetting I
think it is ok to remove it.\n\nWe can always reconsider if any user
complains.\n\nAlthough by removing the clearSelections from the control
config removes\nthe button the `DefaultControlApi ` was marking it as
required. So I had\nto tweak a bit the
types.","sha":"f6978eaf7b511791039210dd9643b68ae3b6b242","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL]
Makes the clear control button
optional","number":212848,"url":"https://github.com/elastic/kibana/pull/212848","mergeCommit":{"message":"[ES|QL]
Makes the clear control button optional (#212848)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/212605\n\nHere we are removing
the clear button from the ES|QL control as clearing\nwill result in
wrong charts. I also considered the reset but when there\nis no changes
should be hidden or disabled. This seems to me as a\nsmaller change and
taken under consideration that dashboard already\nallows resetting I
think it is ok to remove it.\n\nWe can always reconsider if any user
complains.\n\nAlthough by removing the clearSelections from the control
config removes\nthe button the `DefaultControlApi ` was marking it as
required. So I had\nto tweak a bit the
types.","sha":"f6978eaf7b511791039210dd9643b68ae3b6b242"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212848","number":212848,"mergeCommit":{"message":"[ES|QL]
Makes the clear control button optional (#212848)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/212605\n\nHere we are removing
the clear button from the ES|QL control as clearing\nwill result in
wrong charts. I also considered the reset but when there\nis no changes
should be hidden or disabled. This seems to me as a\nsmaller change and
taken under consideration that dashboard already\nallows resetting I
think it is ok to remove it.\n\nWe can always reconsider if any user
complains.\n\nAlthough by removing the clearSelections from the control
config removes\nthe button the `DefaultControlApi ` was marking it as
required. So I had\nto tweak a bit the
types.","sha":"f6978eaf7b511791039210dd9643b68ae3b6b242"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
# Backport
This will backport the following commits from `main` to `8.x`:
- [[controls] add example for programmatically interacting with controls
(#212665)](https://github.com/elastic/kibana/pull/212665)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2025-03-01T00:16:07Z","message":"[controls]
add example for programmatically interacting with controls
(#212665)\n\nUpdate search control example with buttons to
programmatically interact\nwith controls\n\n<img width=\"800\"
alt=\"Screenshot 2025-02-27 at 8 41
05 AM\"\nsrc=\"https://github.com/user-attachments/assets/e936cdeb-ce51-4fca-a8bc-ec5d983e3155\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"8784e4d68d31a0ce4818f4f3fbe1ac8b273642c1","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","backport:version","v9.1.0","v8.19.0"],"title":"[controls]
add example for programmatically interacting with
controls","number":212665,"url":"https://github.com/elastic/kibana/pull/212665","mergeCommit":{"message":"[controls]
add example for programmatically interacting with controls
(#212665)\n\nUpdate search control example with buttons to
programmatically interact\nwith controls\n\n<img width=\"800\"
alt=\"Screenshot 2025-02-27 at 8 41
05 AM\"\nsrc=\"https://github.com/user-attachments/assets/e936cdeb-ce51-4fca-a8bc-ec5d983e3155\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"8784e4d68d31a0ce4818f4f3fbe1ac8b273642c1"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212665","number":212665,"mergeCommit":{"message":"[controls]
add example for programmatically interacting with controls
(#212665)\n\nUpdate search control example with buttons to
programmatically interact\nwith controls\n\n<img width=\"800\"
alt=\"Screenshot 2025-02-27 at 8 41
05 AM\"\nsrc=\"https://github.com/user-attachments/assets/e936cdeb-ce51-4fca-a8bc-ec5d983e3155\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"8784e4d68d31a0ce4818f4f3fbe1ac8b273642c1"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Co-authored-by: Nathan Reese <reese.nathan@elastic.co>
# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2025-01-22T16:46:01Z","message":"[embeddable]
make presentation interface names consistent (#205279)\n\nPR cleans up
presentation interface names for consistentency\r\n* adds `# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT suffix to all observables. For example, `dataLoading`
=>\r\n`dataLoading# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT \r\n* removes `Panel` naming convention from interface
names since an api\r\nmay not be a panel, an api may be a dashboard. For
example,\r\n`PublisesPanelTitle` => `PublishesTitle`\r\n\r\n#### Note to
Reviewers\r\nPay special attention to any place where your application
creates an\r\nuntyped API. In the example below, there is no typescript
violation when\r\nthe parent returns `dataLoading` instead of
`dataLoading# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT since the\r\nparent is not typed as `PublishesDataLoading`.
Please check for\r\ninstances like
these.\r\n\r\n```\r\n<ReactEmbeddableRenderer\r\n getParentApi={() =>
{\r\n dataLoading: new BehaviorSubject()\r\n
}}\r\n/>\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"05916056cdc84c0f59392046aa4ffc7d16e083f9","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Embedding","Team:Presentation","release_note:skip","Feature:Drilldowns","v9.0.0","Team:obs-ux-infra_services","Team:obs-ux-management","project:embeddableRebuild","backport:version","v8.18.0"],"title":"[embeddable]
make presentation interface names
consistent","number":205279,"url":"https://github.com/elastic/kibana/pull/205279","mergeCommit":{"message":"[embeddable]
make presentation interface names consistent (#205279)\n\nPR cleans up
presentation interface names for consistentency\r\n* adds `# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT suffix to all observables. For example, `dataLoading`
=>\r\n`dataLoading# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT \r\n* removes `Panel` naming convention from interface
names since an api\r\nmay not be a panel, an api may be a dashboard. For
example,\r\n`PublisesPanelTitle` => `PublishesTitle`\r\n\r\n#### Note to
Reviewers\r\nPay special attention to any place where your application
creates an\r\nuntyped API. In the example below, there is no typescript
violation when\r\nthe parent returns `dataLoading` instead of
`dataLoading# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT since the\r\nparent is not typed as `PublishesDataLoading`.
Please check for\r\ninstances like
these.\r\n\r\n```\r\n<ReactEmbeddableRenderer\r\n getParentApi={() =>
{\r\n dataLoading: new BehaviorSubject()\r\n
}}\r\n/>\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"05916056cdc84c0f59392046aa4ffc7d16e083f9"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205279","number":205279,"mergeCommit":{"message":"[embeddable]
make presentation interface names consistent (#205279)\n\nPR cleans up
presentation interface names for consistentency\r\n* adds `# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT suffix to all observables. For example, `dataLoading`
=>\r\n`dataLoading# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT \r\n* removes `Panel` naming convention from interface
names since an api\r\nmay not be a panel, an api may be a dashboard. For
example,\r\n`PublisesPanelTitle` => `PublishesTitle`\r\n\r\n#### Note to
Reviewers\r\nPay special attention to any place where your application
creates an\r\nuntyped API. In the example below, there is no typescript
violation when\r\nthe parent returns `dataLoading` instead of
`dataLoading# Backport
This will backport the following commits from `main` to `8.x`:
- [[embeddable] make presentation interface names consistent
(#205279)](https://github.com/elastic/kibana/pull/205279)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT since the\r\nparent is not typed as `PublishesDataLoading`.
Please check for\r\ninstances like
these.\r\n\r\n```\r\n<ReactEmbeddableRenderer\r\n getParentApi={() =>
{\r\n dataLoading: new BehaviorSubject()\r\n
}}\r\n/>\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"05916056cdc84c0f59392046aa4ffc7d16e083f9"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
# Backport
This will backport the following commits from `main` to `8.x`:
- [[Serialized state only] Update Library Transforms and Duplicate
(#206140)](https://github.com/elastic/kibana/pull/206140)
<!--- Backport version: 9.6.4 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Devon
Thomson","email":"devon.thomson@elastic.co"},"sourceCommit":{"committedDate":"2025-01-21T18:43:43Z","message":"[Serialized
state only] Update Library Transforms and Duplicate (#206140)\n\nUnifies
the various `LibraryTransforms` interfaces, updates all by reference
capable embeddables to use them in the same way, and migrates the clone
functionality to use only serialized
state.","sha":"3719be0144d0f5b1fc71d1c564a41446c8ef3133","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Embedding","release_note:fix","Team:Presentation","v9.0.0","backport:prev-minor","Feature:Embeddables","project:embeddableRebuild"],"title":"[Serialized
state only] Update Library Transforms and
Duplicate","number":206140,"url":"https://github.com/elastic/kibana/pull/206140","mergeCommit":{"message":"[Serialized
state only] Update Library Transforms and Duplicate (#206140)\n\nUnifies
the various `LibraryTransforms` interfaces, updates all by reference
capable embeddables to use them in the same way, and migrates the clone
functionality to use only serialized
state.","sha":"3719be0144d0f5b1fc71d1c564a41446c8ef3133"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206140","number":206140,"mergeCommit":{"message":"[Serialized
state only] Update Library Transforms and Duplicate (#206140)\n\nUnifies
the various `LibraryTransforms` interfaces, updates all by reference
capable embeddables to use them in the same way, and migrates the clone
functionality to use only serialized
state.","sha":"3719be0144d0f5b1fc71d1c564a41446c8ef3133"}}]}]
BACKPORT-->
# Backport
This will backport the following commits from `main` to `8.x`:
- [[Embeddables Rebuild] Make Serialize Function Synchronous
(#203662)](https://github.com/elastic/kibana/pull/203662)
<!--- Backport version: 9.4.3 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Devon
Thomson","email":"devon.thomson@elastic.co"},"sourceCommit":{"committedDate":"2024-12-13T02:25:03Z","message":"[Embeddables
Rebuild] Make Serialize Function Synchronous (#203662)\n\nchanges the
signature of the `serializeState` function so that\r\nit no longer
returns
MaybePromise","sha":"abfd590d4d6420da63d129757120e08278ac3211","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Embedding","Team:Presentation","loe:medium","release_note:skip","impact:high","v9.0.0","backport:prev-minor","Feature:Embeddables","project:embeddableRebuild"],"title":"[Embeddables
Rebuild] Make Serialize Function
Synchronous","number":203662,"url":"https://github.com/elastic/kibana/pull/203662","mergeCommit":{"message":"[Embeddables
Rebuild] Make Serialize Function Synchronous (#203662)\n\nchanges the
signature of the `serializeState` function so that\r\nit no longer
returns
MaybePromise","sha":"abfd590d4d6420da63d129757120e08278ac3211"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203662","number":203662,"mergeCommit":{"message":"[Embeddables
Rebuild] Make Serialize Function Synchronous (#203662)\n\nchanges the
signature of the `serializeState` function so that\r\nit no longer
returns
MaybePromise","sha":"abfd590d4d6420da63d129757120e08278ac3211"}}]}]
BACKPORT-->
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
# Backport
This will backport the following commits from `main` to `8.x`:
- [Preparation for High Contrast Mode, Analytics Experience domains
(#202608)](https://github.com/elastic/kibana/pull/202608)
<!--- Backport version: 9.4.3 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Tim
Sullivan","email":"tsullivan@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-12-12T19:16:07Z","message":"Preparation
for High Contrast Mode, Analytics Experience domains (#202608)\n\n##
Summary\r\n\r\n**Reviewers: Please test the code paths affected by this
PR. See the\r\n\"Risks\" section below.**\r\n\r\nPart of work for
enabling \"high contrast mode\" in Kibana.
See\r\nhttps://github.com/elastic/kibana/issues/176219.\r\n\r\n**Background:**\r\nKibana
will soon have a user profile setting to allow users to enable\r\n\"high
contrast mode.\" This setting will activate a flag
with\r\n`<EuiProvider>` that causes EUI components to render with
higher\r\ncontrast visual elements. Consumer plugins and packages need
to be\r\nupdated selected places where `<EuiProvider>` is wrapped, to
pass the\r\n`UserProfileService` service dependency from the CoreStart
contract.\r\n\r\n**NOTE:** **EUI currently does not yet support the
high-contrast mode\r\nflag**, but support for that is expected to come
in around 2 weeks.\r\nThese first PRs are simply preparing the code by
wiring up the\r\n`UserProvideService`.\r\n\r\n### Checklist\r\n\r\nCheck
the PR satisfies following conditions. \r\n\r\nReviewers should verify
this PR satisfies this list as well.\r\n\r\n- [X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [X] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Risks\r\n\r\nDoes this PR introduce any risks? For example, consider
risks like hard\r\nto test bugs, performance regression, potential of
data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for
each identified\r\nrisk. Invite stakeholders and evaluate how to proceed
before merging.\r\n\r\n- [ ] [medium/high] The implementor of this
change did not manually test\r\nthe affected code paths and relied on
type-checking and functional tests\r\nto drive the changes. Code owners
for this PR need to manually test the\r\naffected code paths.\r\n- [ ]
[medium] The `UserProfileService` dependency comes from the\r\nCoreStart
contract. If acquiring the service causes synchronous code to\r\nbecome
asynchronous, check for race conditions or errors in rendering\r\nReact
components. Code owners for this PR need to manually test
the\r\naffected code paths.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"99aa884fa08beafd801588c0b38194ec03039008","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","Team:Visualizations","release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor","v8.18.0"],"title":"Preparation
for High Contrast Mode, Analytics Experience
domains","number":202608,"url":"https://github.com/elastic/kibana/pull/202608","mergeCommit":{"message":"Preparation
for High Contrast Mode, Analytics Experience domains (#202608)\n\n##
Summary\r\n\r\n**Reviewers: Please test the code paths affected by this
PR. See the\r\n\"Risks\" section below.**\r\n\r\nPart of work for
enabling \"high contrast mode\" in Kibana.
See\r\nhttps://github.com/elastic/kibana/issues/176219.\r\n\r\n**Background:**\r\nKibana
will soon have a user profile setting to allow users to enable\r\n\"high
contrast mode.\" This setting will activate a flag
with\r\n`<EuiProvider>` that causes EUI components to render with
higher\r\ncontrast visual elements. Consumer plugins and packages need
to be\r\nupdated selected places where `<EuiProvider>` is wrapped, to
pass the\r\n`UserProfileService` service dependency from the CoreStart
contract.\r\n\r\n**NOTE:** **EUI currently does not yet support the
high-contrast mode\r\nflag**, but support for that is expected to come
in around 2 weeks.\r\nThese first PRs are simply preparing the code by
wiring up the\r\n`UserProvideService`.\r\n\r\n### Checklist\r\n\r\nCheck
the PR satisfies following conditions. \r\n\r\nReviewers should verify
this PR satisfies this list as well.\r\n\r\n- [X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [X] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Risks\r\n\r\nDoes this PR introduce any risks? For example, consider
risks like hard\r\nto test bugs, performance regression, potential of
data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for
each identified\r\nrisk. Invite stakeholders and evaluate how to proceed
before merging.\r\n\r\n- [ ] [medium/high] The implementor of this
change did not manually test\r\nthe affected code paths and relied on
type-checking and functional tests\r\nto drive the changes. Code owners
for this PR need to manually test the\r\naffected code paths.\r\n- [ ]
[medium] The `UserProfileService` dependency comes from the\r\nCoreStart
contract. If acquiring the service causes synchronous code to\r\nbecome
asynchronous, check for race conditions or errors in rendering\r\nReact
components. Code owners for this PR need to manually test
the\r\naffected code paths.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"99aa884fa08beafd801588c0b38194ec03039008"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202608","number":202608,"mergeCommit":{"message":"Preparation
for High Contrast Mode, Analytics Experience domains (#202608)\n\n##
Summary\r\n\r\n**Reviewers: Please test the code paths affected by this
PR. See the\r\n\"Risks\" section below.**\r\n\r\nPart of work for
enabling \"high contrast mode\" in Kibana.
See\r\nhttps://github.com/elastic/kibana/issues/176219.\r\n\r\n**Background:**\r\nKibana
will soon have a user profile setting to allow users to enable\r\n\"high
contrast mode.\" This setting will activate a flag
with\r\n`<EuiProvider>` that causes EUI components to render with
higher\r\ncontrast visual elements. Consumer plugins and packages need
to be\r\nupdated selected places where `<EuiProvider>` is wrapped, to
pass the\r\n`UserProfileService` service dependency from the CoreStart
contract.\r\n\r\n**NOTE:** **EUI currently does not yet support the
high-contrast mode\r\nflag**, but support for that is expected to come
in around 2 weeks.\r\nThese first PRs are simply preparing the code by
wiring up the\r\n`UserProvideService`.\r\n\r\n### Checklist\r\n\r\nCheck
the PR satisfies following conditions. \r\n\r\nReviewers should verify
this PR satisfies this list as well.\r\n\r\n- [X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [X] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Risks\r\n\r\nDoes this PR introduce any risks? For example, consider
risks like hard\r\nto test bugs, performance regression, potential of
data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for
each identified\r\nrisk. Invite stakeholders and evaluate how to proceed
before merging.\r\n\r\n- [ ] [medium/high] The implementor of this
change did not manually test\r\nthe affected code paths and relied on
type-checking and functional tests\r\nto drive the changes. Code owners
for this PR need to manually test the\r\naffected code paths.\r\n- [ ]
[medium] The `UserProfileService` dependency comes from the\r\nCoreStart
contract. If acquiring the service causes synchronous code to\r\nbecome
asynchronous, check for race conditions or errors in rendering\r\nReact
components. Code owners for this PR need to manually test
the\r\naffected code paths.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"99aa884fa08beafd801588c0b38194ec03039008"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
# Backport
This will backport the following commits from `main` to `8.x`:
- [[Embeddable Rebuild] [Controls] Remove non-React controls from
`controls` plugin
(#192017)](https://github.com/elastic/kibana/pull/192017)
<!--- Backport version: 9.4.3 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Hannah
Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-17T14:12:54Z","message":"[Embeddable
Rebuild] [Controls] Remove non-React controls from `controls` plugin
(#192017)\n\nPart of
https://github.com/elastic/kibana/issues/192005\r\nCloseshttps://github.com/elastic/kibana/issues/176533\r\n\r\n##
Summary\r\n\r\nThis PR represents the first major cleanup task for the
control group\r\nembeddable refactor. The tasks included in this PR can
be loosely\r\nsummarized as follows:\r\n1. This PR removes the old,
non-React version of controls \r\n- Note that the new controls are still
included under the\r\n`react_controls` folder - I will address this in a
follow up PR.\r\n2. This PR removes **all** types associated with the
old embeddable\r\nsystem; i.e. any `*input*` or `*output*` types.\r\n-
As part of cleaning up these types, some of the types included in
the\r\n`public/react_controls` folder had to be moved to `common` to
make them\r\navailable to server-side code.\r\n- This resulted in an...
unfortunate number of import changes 🫠 Hence\r\nthe rather large file
change count. I took this opportunity to organize\r\nthe imports, too -
so a significant chunk of these files are simply\r\nimport
changes.\r\n3. This PR removes the controls Storybook and all related
mocks\r\n- Since the controls storybooks have been broken for awhile,
and since\r\nwe had plans to remove them but never got around to it, I
just decided\r\nto delete them as part of this PR and
close\r\nhttps://github.com/elastic/kibana/issues/176533 rather than
spending\r\ntime to fix the types for non-operational stories\r\n\r\n###
Checklist\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"5082eef2f1df8b6d7e9bb15d2221b9f4c67b00bf","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","impact:critical","v9.0.0","backport:prev-minor","project:embeddableRebuild"],"title":"[Embeddable
Rebuild] [Controls] Remove non-React controls from `controls`
plugin","number":192017,"url":"https://github.com/elastic/kibana/pull/192017","mergeCommit":{"message":"[Embeddable
Rebuild] [Controls] Remove non-React controls from `controls` plugin
(#192017)\n\nPart of
https://github.com/elastic/kibana/issues/192005\r\nCloseshttps://github.com/elastic/kibana/issues/176533\r\n\r\n##
Summary\r\n\r\nThis PR represents the first major cleanup task for the
control group\r\nembeddable refactor. The tasks included in this PR can
be loosely\r\nsummarized as follows:\r\n1. This PR removes the old,
non-React version of controls \r\n- Note that the new controls are still
included under the\r\n`react_controls` folder - I will address this in a
follow up PR.\r\n2. This PR removes **all** types associated with the
old embeddable\r\nsystem; i.e. any `*input*` or `*output*` types.\r\n-
As part of cleaning up these types, some of the types included in
the\r\n`public/react_controls` folder had to be moved to `common` to
make them\r\navailable to server-side code.\r\n- This resulted in an...
unfortunate number of import changes 🫠 Hence\r\nthe rather large file
change count. I took this opportunity to organize\r\nthe imports, too -
so a significant chunk of these files are simply\r\nimport
changes.\r\n3. This PR removes the controls Storybook and all related
mocks\r\n- Since the controls storybooks have been broken for awhile,
and since\r\nwe had plans to remove them but never got around to it, I
just decided\r\nto delete them as part of this PR and
close\r\nhttps://github.com/elastic/kibana/issues/176533 rather than
spending\r\ntime to fix the types for non-operational stories\r\n\r\n###
Checklist\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"5082eef2f1df8b6d7e9bb15d2221b9f4c67b00bf"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192017","number":192017,"mergeCommit":{"message":"[Embeddable
Rebuild] [Controls] Remove non-React controls from `controls` plugin
(#192017)\n\nPart of
https://github.com/elastic/kibana/issues/192005\r\nCloseshttps://github.com/elastic/kibana/issues/176533\r\n\r\n##
Summary\r\n\r\nThis PR represents the first major cleanup task for the
control group\r\nembeddable refactor. The tasks included in this PR can
be loosely\r\nsummarized as follows:\r\n1. This PR removes the old,
non-React version of controls \r\n- Note that the new controls are still
included under the\r\n`react_controls` folder - I will address this in a
follow up PR.\r\n2. This PR removes **all** types associated with the
old embeddable\r\nsystem; i.e. any `*input*` or `*output*` types.\r\n-
As part of cleaning up these types, some of the types included in
the\r\n`public/react_controls` folder had to be moved to `common` to
make them\r\navailable to server-side code.\r\n- This resulted in an...
unfortunate number of import changes 🫠 Hence\r\nthe rather large file
change count. I took this opportunity to organize\r\nthe imports, too -
so a significant chunk of these files are simply\r\nimport
changes.\r\n3. This PR removes the controls Storybook and all related
mocks\r\n- Since the controls storybooks have been broken for awhile,
and since\r\nwe had plans to remove them but never got around to it, I
just decided\r\nto delete them as part of this PR and
close\r\nhttps://github.com/elastic/kibana/issues/176533 rather than
spending\r\ntime to fix the types for non-operational stories\r\n\r\n###
Checklist\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"5082eef2f1df8b6d7e9bb15d2221b9f4c67b00bf"}}]}]
BACKPORT-->
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/189820
### Summary
This PR converts the `ControlGroupRenderer` to use the new control group
embeddable, which is built on the new React embeddable framework. With
this conversion, there should not be **any** changes in user-facing
behaviour - therefore, testing of this PR should be focused on ensuring
that no behaviour is changed and/or broken with this refactor.
**Notes to Solution Reviewers:**
- There should be minimal changes to your uses of `ControlGroupRenderer`
- our goal here was to keep the exposed API more-or-less consistent with
this refactor. Therefore, most changes are simply renames + changes of
imports.
- That being said, `updateInput` and `getInput$` are **very much** tied
to the old embeddable infrastructure - so while they will continue to
work for now, they have been deprecated in favour of adding
setters/getters for the parts of the control group state that you need
to update / respond to.
**Notes to Presentation Reviewer:**
- The bundle size was originally being increased by this PR, so I
decided to remove a bunch of the public exports that are no longer
necessary as a final cleanup - this resulted in changes to imports in a
few files, but it was worth doing in this PR IMO so that we didn't have
to increase the Controls bundle limit. Now, this PR shrinks the bundle
size 🎉
- I fixed a small bug with the default value of `showApplySelections` in
this PR - since it was a one-line change, if felt like overkill to
separate it out. See
https://github.com/elastic/kibana/pull/190561/files#r1733253015
### 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
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
PR replaces legacy embeddable control group implementation with react
control group implementation in DashboardContainer.
#### background
Work originally done in https://github.com/elastic/kibana/pull/190273.
https://github.com/elastic/kibana/pull/190273 was reverted by
https://github.com/elastic/kibana/pull/191993 because of dashboard
performance degradation. It was determined that degradation was because
new react embeddable controls fixed a regression where dashboard panels
are loading before control filters are created. This regression was
introduced by https://github.com/elastic/kibana/pull/187509.
The work around is that this PR keeps the currently broken behavior in
main and loads panels before control filters are ready. The thinking is
that the migration would replace like for like and not introduce any
performance changes. Then, at a later time, the regression could be
resolved.
#### reviewing
These are the same changes from
https://github.com/elastic/kibana/pull/190273 minus some work to
introduce a current regression in main. A full re-review is not needed.
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <hannah.wright@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
#190273 introduced a performance regression. Reverting to move metrics to baseline again and create some time to identify root cause.
Co-authored-by: Thomas Neirynck <thomas@elastic.co>
closes https://github.com/elastic/kibana/issues/191137,
https://github.com/elastic/kibana/issues/190988,
https://github.com/elastic/kibana/issues/191155
PR replaces legacy embeddable control group implementation with react
control group implementation in DashboardContainer.
### Test instructions
1. Open dashboard via dashboard application or portable dashboard
2. Mess around with controls. There should be no changes in behavior
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
PR added `lastUsedDataViewId$` to `ControlGroupApi`.
`lastUsedDataViewId$` is implemented in `initializeControlsManager`.
PR also cleaned up typings by removing `DataControlEditorState`.
`DataControlEditorState` was a weird smooshing together of
DefaultDataControlState and stuff used by the editor. Instead of
`DataControlEditorState`, values used by the editor are just passed in
as top level keys.
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Move react_controls from examples plugin to controls plugin. This PR
does not effect user facing features since it does not effect the legacy
control group implementation or its usage. Future PRs will integrate the
new control group with dashboard and ControlGroupRenderer and then
remove the legacy control group implementation.
PR increases page load bundle size because of new action registration
and the control group react embeddable registration. This will be a
temporary increase as removing the legacy control group will remove the
legacy embeddable factory registration, which is larger then react
embeddable registration.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Fixes https://github.com/elastic/kibana/issues/189580
PR awaits until all control filters are ready and then applies
selections during reset.
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/189407
## Summary
This PR adds an `order` attribute to the control factory so that the
ordering in the UI remains consistent - previously, the order was
determined by the order the factories were registered in (which is no
longer predictable now that the registration happens `async` - it's hard
to repro, but there were times where something delayed the options list
registration and it would appear at the end of my list). Adding and
sorting the UI based on the `order` of the factory removes this
uncertainty.
### 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
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
## Summary
The range slider `value` was getting overwritten by the old value on
edit after the field name changed because we were passing in `value` as
part of the editor state manager - so, this resulted in the following
when editing a range slider with a defined `value` (for the sake of
clarity, let's say `value = [100, 200]`.
1. Change the field name to another number field (keeping it as a range
slider control) and save your changes
2. On save, the editor loops through the provided state manager key by
key and updates the control
3. The `fieldName` key is hit first because of the order of spread, so
this gets updated - which triggers the `fieldChangedSubscription` and
sets `value` to `undefined`
4. The `value` key gets hit afterward, which still has the old `[100,
200]` value because we don't clear up the dirty state - so, the editor
calls `value$.next([100, 200])`
5. The edited control now has the same selection as the old control
🔥
We should only add state to the editor state manager **that the editor
can change** - and since `value` is never changed via the editor,
removing this from the state manager fixes the above situation. I've
added a comment to hopefully clarify this.
### How to test
1. Create a range slider control and make a value change on it
2. Edit that control and pick a different data view and/or field - keep
it as a range slider control!
3. The value selected at step 1 **should be cleared**
### Before
https://github.com/user-attachments/assets/e6700538-deda-4196-8f52-c5446fa06518
### After
https://github.com/user-attachments/assets/be47fb2c-ecbf-4274-8beb-82a7e5462874
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
While reviewing https://github.com/elastic/kibana/pull/188687, I noticed
that controls where still getting filtered by timeslider changes even
when chaining was disabled or the control was to the left of the
timeslider. This PR resolves this issue by only passing in timeslice
from `chaining$` instead of `controlGroupFetch$`.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary

At the moment, our package generator creates all packages with the type
`shared-common`. This means that we cannot enforce boundaries between
server-side-only code and the browser, and vice-versa.
- [x] I started fixing `packages/core/*`
- [x] It took me to fixing `src/core/` type to be identified by the
`plugin` pattern (`public` and `server` directories) vs. a package
(either common, or single-scoped)
- [x] Unsurprisingly, this extended to packages importing core packages
hitting the boundaries eslint rules. And other packages importing the
latter.
- [x] Also a bunch of `common` logic that shouldn't be so _common_ 🙃
### For maintainers
- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
PR does the following
* Adds `untilInitialized` to `ControlGroupApi`.
* Control group example updated to not mount data table react embeddable
until control group is initialized (and all control group filters are
available)
* Updates `buildControl` to be async
* Updates all controls to `await` filters before returning
`buildControl`
* Updates control group to display loading indicator until all controls
loaded
* Moves control group react logic into `ControlGroup` component
* Implements `Apply` button
<img width="600" alt="Screenshot 2024-07-24 at 7 33 25 AM"
src="https://github.com/user-attachments/assets/4840c731-2287-4a12-aa9c-3d9c83d64d14">
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR fixes control editing so that, when the control type is changed,
extra state from the old type gets removed. Prior to this, controls were
keeping unrelated state - for example, switching from a range slider to
a search control would result in a search control with the "step"
property.
### 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
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Closes https://github.com/elastic/kibana/issues/187504
## Summary
This PR changes how control creation/editing is handled in the new
system by changing from a state manager to an explicit `initialState` +
`updateState` callback structure. Unfortunately, the `stateManager`
system really only works if we had inline creation for controls - since
we don't have that, the embeddable (and hence the `stateManager`)
doesn't exist until **after** the editor is saved. Therefore, especially
with respect to the custom options component, we had no way of knowing
what keys the `stateManager` should include when trying to create a new
control. The new system isn't quite as clean IMO, but it works better
for our current goals with this refactor. We can revisit the
`stateManager` idea once controls support inline editing 👍
This PR also fixes a few visual bugs, noted below.
### 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
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/187382
## Summary
This PR separates out the previously memoized
`CompatibleControlTypesComponent` into a separate component that accepts
**props** for the fields that it is dependant on rather than relying on
the dependencies to the `useMemo` function. This is because, previously,
we had an extra dependency in the dependency array (`controlType`) that
was causing the memoized component to render too many times and it was
causing a weird bug where the old "disabled" menu item wasn't getting
unmounted properly.
| Before | After |
|--------|--------|
| 
| 
|
By switching to a component with explicit props, unnecessary
dependencies should hopefully be avoided in the future.
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
## Summary
The primary goal of this PR is to clean up the styling of the
`ControlPanel` component for the new React control renderer.
Specifically, this fixes the following:
- I switched the inline Emotion styling to CSS classes instead
- I made it so that the timeslider control renders the drag handler in
edit mode and **doesn't** render the empty icon for the drag handler in
view mode
<p align="center"><img width="600px"
src="d5bf169b-2106-4f88-9698-f00162809d0a"/><p>
- I fixed the timeslider prepend so that it no longer wraps
<p align="center"><img width="500px"
src="7859d67b-1454-45b5-b7d8-7000086641a7"/><p>
- I moved the error component into the `EuiFormControlLayout` component,
which ensures that the drag handler is rendered for when a control has a
blocking error. I also fixed the styling for the error component:
<p align="center"><img width="600px"
src="13e0f041-8c51-494c-9079-323ed518c87b"/><p>
When I was working on these style changes, I noticed that the timeslider
control wasn't implementing `CanClearSelections` which meant that it no
longer had the clear selections action. This made me realize that this
interface should probably be part of the `DefaultControlApi` rather than
`DefaultDataControlApi` so, I moved it and added `clearSelections` to
the timeslider API.
<p align="center"><img width="600px"
src="47f7b648-bb2d-4158-b058-456bfdf5cdb5"/><p>
### Checklist
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/184376
### Note for design review
index.scss file is just copy of
https://github.com/elastic/kibana/blob/main/src/plugins/controls/public/time_slider/components/index.scss.
We are migrating controls in the examples folder and then will migrate
these back into src folder once the migration is complete
### Changes
Changes to ControlGroupApi
* Implement timeslice$ API
* Implement autoApplySelections$
* Runtime state `autoApplySelections` is inverse of serialized state
`showApplySelections`
<img width="1000" alt="Screenshot 2024-06-11 at 12 56 45 PM"
src="dc27e3e3-6c25-4d5a-ab25-bfcc9bb38178">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <hannah.wright@elastic.co>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
PR updates initializeDataControl to handle error cases like DataView not
found and field not found.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/184373
## Summary
This PR marks the first step of the control group migration to the new
React embeddable system. A few notes about this:
- In the new system, each individual control will no longer be an
"embeddable" - instead, we are creating a **new** control-specific
registry for all controls. This is **modelled** after the embeddable
registry, but it is locked down and much more controls-specific.
- Most of the work accomplished in this PR is hidden away in the
`examples` plugin - that way, user-facing code is not impacted. After
some discussion, we decided to do it this way because refactoring the
control group to work with both legacy and new controls (like we did for
the dashboard container) felt like a very large undertaking for minimal
benefit. Instead, all work will be contained in the example plugin
(including building out the existing control types with the new
framework) and we will do a final "swap" of the legacy control group
with the new React control group as part of
https://github.com/elastic/kibana/issues/174961
- This PR does **not** contain a fully functional control group
embeddable - instead, the main point of this PR is to introduce the
control registry and an example control. The current control group
embeddable is provided just to give the **bare minimum** of
functionality.
- In order to find the new Search control example, navigate to Developer
Examples > Controls > Register a new React control
- The example search control only works on text fields. See
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html
and
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html
for information on the two search techniques.
### Checklist
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Aligns the Portable Dashboard renderer and the Control Group renderer to a new API structure using `useImperativeHandle` rather than the overcomplicated and mostly unused wrapper provider system.
## Summary
This PR adds the option to provide, custom props when calling
`openAddDataControlFlyout`. For example, users of the API may want
different placeholder than default for any new options list that is
added.
Currently, in security solution, we need a custom placeholder for newly
added controls. Hence, this PR. Please let me know if this is not the
best way to do this.
https://user-images.githubusercontent.com/7485038/232775198-a111d711-ffba-4d26-8c70-c2af08008e05.mov
Adds an "add" button that shows up to the right of the Control Group if
configured. Also adds a system for fetching settings from consumers, and
adds settings that can hide or show pieces of the Control editor flyout.
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>
This PR upgrades uuid into its latest version `9.0.0`.
The previous default used version `v4` was kept where it was previously
used and places using `v1` or `v5` are still using it.
In this latest version they removed the deep import feature and as we
are not using tree shaking it increased our bundles by a significant
size. As such, I've moved this dependency into the `ui-shared-deps-npm`
bundle.
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>