Commit graph

1058 commits

Author SHA1 Message Date
Jean-Louis Leysens
809a83df82
[Saved Objects] Provide stable sorting to the rows extracted from UI (#187545)
## Summary

Per the title

Close https://github.com/elastic/kibana/issues/179977
2024-07-08 20:40:32 +10:00
Marta Bondyra
e6f17e7c06
[Unified field list] debounce search (#187143)
## Summary

Updates to unified field list on typing are debounced - this way we
don't get so many updates when typing in the search input.

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6424

## Performance comparison
Test: typing the string: activem for metricbeat data (~6000 fields)

before (costly update on every keystroke):
<img width="669" alt="Screenshot 2024-06-28 at 17 28 38"
src="7075f7bc-2d90-4177-acac-69ac101b2ef1">

after (only one costly update when user stops typing):
<img width="269" alt="Screenshot 2024-06-28 at 17 24 43"
src="8c0ce4a3-7c1a-428b-a482-f6b4d87911e0">
2024-07-06 14:47:26 +02:00
Yulia Čech
f8589f890e
[Console Monaco migration] Fixes (#186479)
## Summary

Fixes https://github.com/elastic/kibana/issues/184927
Fixes https://github.com/elastic/kibana/issues/184584
Fixes https://github.com/elastic/kibana/issues/184447


This PR fixes various issues in the migrated Console: 
- The url params with whitespaces are now parsed correctly and the whole
values is sent in the request
(https://github.com/elastic/kibana/issues/184927)
- The autocomplete for fields only shows the fields of the current index
(https://github.com/elastic/kibana/issues/184584)
- The popup with autocomplete suggestion is not covered by the resizer
bar (https://github.com/elastic/kibana/issues/184447)

#### How to test
1. Send a request with a url param that contains a whitespace, for
example `GET _search?q="test test"`. The request should be executed
correctly.
2. Create an index with only 1 field 
```
PUT field_test/_doc/1
{
  "test": 1
}
```
Try a search query with the fields autocomplete and check that only 1
field is suggested
```
GET field_test/_search
{
  "query": {
    "match": {
      "
```
3. Check that the popup with autocomplete suggestions is not covered by
the resizer bar


### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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)
2024-06-25 15:48:16 +02:00
Yulia Čech
5e346b2561
[Console] Enable monaco by default (#184862)
## Summary

Closes https://github.com/elastic/kibana/issues/184025

This PR enables the migration from Ace to Monaco in Dev Tools Console by
default in the main branch. All serverless projects will still have the
migration disabled by default. After 8.15 is branched, the migration
will be disabled there as well. The intended release version for this
migration is 8.16.

### Functional tests 
This PR creates a copy of functional tests for Monaco Console and keeps
the tests for Ace in a separate folder. When the migration is released,
we can remove the code for Ace together with tests.
The Monaco tests are not the exact copy of the Ace tests, since some
functionality and autocomplete behaviour is slightly different in the
migrated Console. For example, the auto-closing of brackets works in
Monaco when typing something, but is not kicking in in the tests.

Flaky test runner 

### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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>
2024-06-19 17:37:04 +02:00
renovate[bot]
454ef7f5a3
Update dependency @elastic/charts to v65.1.0 (main) (#184396)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
[`65.0.0` ->
`65.1.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/65.0.0/65.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@elastic%2fcharts/65.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@elastic%2fcharts/65.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@elastic%2fcharts/65.0.0/65.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@elastic%2fcharts/65.0.0/65.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts (@&#8203;elastic/charts)</summary>

###
[`v65.1.0`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#6510-2024-05-28)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v65.0.0...v65.1.0)

##### Bug Fixes

- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to ^94.5.0
([#&#8203;2433](https://togithub.com/elastic/elastic-charts/issues/2433))
([b13ded9](b13ded98da))
- **deps:** update dependency
[@&#8203;playwright/test](https://togithub.com/playwright/test) to
^1.44.0
([#&#8203;2434](https://togithub.com/elastic/elastic-charts/issues/2434))
([faf36aa](faf36aaf1e))
- **Metric:** should only show one focus halo on `::focus` event
([#&#8203;2441](https://togithub.com/elastic/elastic-charts/issues/2441))
([96b0779](96b0779cc3))
- react component type errors
([#&#8203;2440](https://togithub.com/elastic/elastic-charts/issues/2440))
([f0b3a00](f0b3a008e7))

##### Features

- **legend:** add legend stats (table view)
([#&#8203;2426](https://togithub.com/elastic/elastic-charts/issues/2426))
([c22f767](c22f7673c8))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlZpc3VhbGl6YXRpb25zIiwiYmFja3BvcnQ6c2tpcCIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-29 16:17:43 -07:00
Drew Tate
58f1c67a50
[Discover] fix flaky test (#184180)
## Summary

Fix https://github.com/elastic/kibana/issues/183493
Fix https://github.com/elastic/kibana/issues/183479

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6079
2024-05-29 11:18:19 -05:00
Eyo O. Eyo
690690ea21
Simplify workflow for dashboard copy creation in both view and edit interaction modes (#180938)
## Summary

Closes https://github.com/elastic/kibana/issues/161047

- Removes the `save as` top nav menu button
- Also renames nav menu item `clone` to `duplicate` and make it
available in edit mode.
- The save dashboard modal no longer displays and open to save the
dashboard in context as new, given that we've chosen to explicitly
create a copy of the dashboard in context when either of the the
`duplicate` or `saveas` menu option is selected.
- includes bug fix for an issue where clicking the dashboard modal
scrolled the user to the content bottom, see
https://github.com/elastic/kibana/pull/180938#issuecomment-2117586572

## Before
### View mode
<img width="1728" alt="Screenshot 2024-04-16 at 15 59 10"
src="48dc4565-1f75-4f46-839c-8d76f4fedefe">

### Edit mode
<img width="1725" alt="Screenshot 2024-04-16 at 15 59 00"
src="1ac743ac-33b4-4f68-ab59-ad19ab58fa1c">

## After

#### Managed Dashboard

5072a501-8d16-4f25-9575-6f11fed6e580

#### View mode

610d0952-97f0-46b8-a0ea-1546a799d387

#### Edit mode

4f596c07-7bd1-4c5a-9131-0c78731cb113



<!-- ### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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>
2024-05-29 11:46:23 +02:00
Davis McPhee
872f010648
[Discover] Migrate from index to dataSource in app state (#182321)
## Summary

This PR replaces the `index` property of Discover's app state with a new
`dataSource` property, containing two initial types: `dataView` and
`esql`. The new data source abstraction will be used in the One Discover
data source context resolution process, as well as preparing Discover to
support additional data sources as needed in the future. Additionally,
it creates a clearer division in the Discover state between "data view
mode" and "ES|QL mode", where previously this was implicit based on
whether the `query` property was an ES|QL query vs KQL or Lucene.

The goal of this PR is to add initial support for the `dataSource`
property without introducing broader changes to the Discover state
management. However, these changes open up opportunities for future
improvements to simplify the state management, such as checking the data
source type to determine which mode Discover is in instead of always
checking the query directly. These types of enhancements can be built on
this foundation in followup PRs.

Part of #181963.

### Checklist

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] 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)
2024-05-15 20:02:43 -03:00
Rachel Shen
dc1fd5a533
[Tests] Share Modal Redesign clean up and tests (#180406)
## Summary

This PR makes the share redesign modal work the primary share context
paradigm (excluding Canvas) by removing the share plugin config that had
share.new_version.enabled for testing and implementation.
This PR cleans up the FTRs. 

Closes [#151523](https://github.com/elastic/kibana/issues/151523)
As a result of defaulting to short urls, some tests were removed since
they are now obsolete.
One fix in this PR to avoid customer known issues is to allow reporting
(if license is permitted) for watcher users. Refer to
https://github.com/elastic/sdh-kibana/issues/4481#issuecomment-2012969470.

I've opened a separate issue to track any skipped or deleted tests as a
result of short urls by default here
https://github.com/elastic/kibana/issues/181066

### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))


### Release Note

The share menu is updated for a more streamlined user experience. Users
can navigate through a tabbed modal to copy links for discover,
dashboard, and lens.

---------

Co-authored-by: Eyo Okon Eyo <eyo.eyo@elastic.co>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2024-05-15 11:49:35 -07:00
Nick Partridge
382ee2d076
Fix reset UX for panel title and description (#182986)
## Summary

Updates to the panel title flyout behavior to be more strict about changes to the title, including...

- Input defaults to the actual title when empty (`""`), no longer fills
with default viz `title`/`description`.
- Uses the default title/description when the value is `undefined`, such
that the value has never been set.
- Adds a clear button to the `title` input.
- `Reset` wording replaced with `Reset to default`, for `title` and
`description`.
- Only shows reset if there is a `default` non-empty
`title`/`description` to reset to, applies mostly to by-value viz.
- Changes the inspect panel `title` to always match the panel `title`
and show `"[No Title]"` when empty.
2024-05-14 10:15:10 -07:00
Matthew Kime
1bcec40bbc
[data views] Reenable MKI test - change data import tool to be serverless compatible (#181349)
## Summary

Change data import / export method so test works in MKI environment.

Closes https://github.com/elastic/kibana/issues/171479 and
https://github.com/elastic/kibana/issues/180568

Verified by running functional test runner run locally against MKI
environment.
2024-05-09 11:11:52 -05:00
Stratoula Kalafateli
b64500b9e6
[ES|QL] [Discover] Creating where clause filters from the table, sidebar and table row viewer (#181399)
## Summary

Part of https://github.com/elastic/kibana/issues/181280

This PR handles the creation of filters (where clause) in Discover ES|QL
mode. The parts that are being handled are:

- sidebar
- document viewer
- table


![meow](f2e32e91-5d76-4723-93c1-dbeadb7eb9cb)

The creation of filters from the charts is not here.

### Checklist

Delete any items that are not applicable to this PR.

- [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] [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [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] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-06 15:44:19 +02:00
Matthew Kime
67bc795f8d
[data views] Fix create runtime field functional test on MKI (#181101)
## Summary

Addresses flaky test that fails to set the runtime field type to
composite. Passed a 50x run on the flaky test runner -
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5724

Attempts to avoid this happening - 
![image
(4)](57f38aed-1e70-4fa7-82e6-b9f84e8cb509)
2024-04-23 05:19:01 -05:00
Hannah Mudge
a41177f32c
[Dashboard] Default to saved object description when panel description is not provided (#181177)
Closes https://github.com/elastic/kibana/issues/181172

## Summary

This PR fixes a bug where panels were not showing descriptions from
library items - this is because (1) we weren't providing the
`defaultPanelDescription` as part of the default embeddable API and (2)
the panel header was not defaulting to the `defaultPanelDescription`
when a panel description was not provided.

Because of (1), the panel settings flyout showed a blank description
**despite** having the correct logic for defaulting to the default panel
description - that is why the tests in `customize_panel_editor.test.tsx`
passed but it didn't work in production.

### 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)
2024-04-22 07:52:46 -07:00
christineweng
51cc9cade2
[Security Solution] Add guided tour to document details flyout (#180318)
## Summary

This PR adds a guided tour for the new expandable flyout in alerts
table.

Where it will show up:
 Alerts page
 Alerts tab in Cases

Tour will not show up in:
 rule creation
 flyout in timeline
 event table.


e9d0ce92-0eb4-4898-ad05-91d701aec01d



**How to test**
- Generate some alerts and go to Alerts page
- Expand a row in alerts table
- Guided tour should appear
- Note that rule preview is only available to alerts. Guided tour for an
event or alert preview does not have that step.

To test guided tour in event and timeline, enable
`expandableEventFlyoutEnabled`, `expandableTimelineFlyoutEnabled`
respectively.

### 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] [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
2024-04-15 12:42:50 -07:00
Julia Rechkunova
510395d414
[Discover] Enable the suggestion selector from lens configuration flyout (#180323)
- Closes https://github.com/elastic/kibana/issues/180249
- Closes https://github.com/elastic/kibana/issues/179515

## Summary

This PR removes suggestions from above the UnifiedHistogram vis. Now
users can change suggestions via the lens flyout.

ES|QL query which supports suggestions:
<img width="600" alt="Screenshot 2024-04-10 at 16 57 09"
src="a0e7aed9-c223-4e29-8919-3e65eef52443">

ES|QL query which does not support suggestions for the histogram vis:
<img width="600" alt="Screenshot 2024-04-10 at 16 58 08"
src="6ba3c283-5bd3-46eb-839f-6d6fda41db5b">

25x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5656

### 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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-04-12 17:24:44 +02:00
Nick Partridge
2b344d2797
[FTR] Update getAttribute method return (#179715) 2024-04-10 10:28:03 -07:00
Dzmitry Lemechko
48aed6e623
[FTR] add dataViews service (#180066)
## Summary

This PR makes few changes:
- extend
[kbn-test-subj-selector](https://github.com/elastic/kibana/compare/main...dmlemeshko:kibana:ftr/add-dataViews-service?expand=1#diff-43f2401dd3f9c11b6cbd75c8801a6ccbbe1d4db5a19e907f263c4932f810c73c)
with wildcard (*) support:

```
testSubjSelector('*dataView-switch-link') => [data-test-subj*="dataView-switch-link"]
```

It allows us to search for DOM elements with the common text part in
`data-test-subj` attribute, e.g. `lns-dataView-switch-link` &
`discover-dataView-switch-link`

- add new FTR service
[dataViews](test/functional/apps/discover/group4/_adhoc_data_views.ts)
to unify mostly identical code related to data views across multiple
page objects (lens, discover, unified_search, dashboard)
It is not a big win in terms of code cleanup, but should save some time
whenever we will need to make logic updates.
2024-04-10 16:33:00 +02:00
Julia Rechkunova
c708c49948
[Discover] Allow to store the configured ES|QL visualization v3 (#175227)
- Resolves https://github.com/elastic/kibana/issues/167887

## Summary

On Discover page user can see a visualization for data view and ES|QL
modes. For ES|QL mode it's also allowed to customize the visualization.
This PR allows to save such customization together with a saved search.

In more details, various types of Lens visualization can be shown on
Discover page:
- If in the default (data view) mode, Unified Histogram shows a
"formBased" histogram (`type:
UnifiedHistogramSuggestionType.histogramForDataView` in this PR)
- If in the ES|QL mode, 2 scenarios are possible (so far only these are
customizable):
- If Lens has suggestions for the current query, Unified Histogram shows
one of them (`type: UnifiedHistogramSuggestionType.lensSuggestion` in
this PR) Example query: `from kibana_sample_data_logs | stats avg(bytes)
by message.keyword`
- If Lens suggestion list is empty, Unified Histogram shows a
"textBased" histogram (`type:
UnifiedHistogramSuggestionType.histogramForESQL` in this PR). Example
query: `from kibana_sample_data_logs | limit 10`
   
The main flow is that Unified Histogram first picks a suggestion (one of
`UnifiedHistogramSuggestionType` type), then calculates lens attributes
which are necessary to build Lens embeddable. With a saved search we are
saving those calculated lens attributes under `savedSearch.visContext`.
For handling this logic, I refactored `useLensSuggestion`,
`getLensAttributes` into `LensVisService`.

Restoring a saved customization adds complexity to the flow as it should
pick now not just any available suggestion but the suggestion which
matches to the previously saved lens attributes.

Changes to the current query, time range, time field etc can make the
current vis context incompatible and we have to drop the vis
customization. This PR already includes this logic of invalidating the
stored lens attributes if they are not compatible any more. New vis
context will override the previous one when user presses Save for the
current search. Until then, we try to restore the customization from the
previously saved vis context (for example when the query changes back to
the compatible one).


What can invalidate the saved vis context and drop the user's
customization:
- data view id
- data view time field name
- query/filters
- time range if it has a different time interval
- text based columns affect what lens suggestions are available

Flow of creating a new search:

![1](9274d895-cedb-454a-9a9d-3b0cf600d801)

Flow of editing a saved search:

![2](086ce4a0-f679-4d96-892b-631bcfee7ee3)





<details>
<summary>Previous details</summary>

- Previous approach https://github.com/elastic/kibana/pull/174373
(saving current suggestion instead of lens attributes)
- Previous approach https://github.com/elastic/kibana/pull/174783
(saving lens attributes but it's based on existing hooks)

But I was stuck with how to make "Unsaved changes" badge work well when
user tries to revert changes.

For testing in ES|QL mode I use `from kibana_sample_data_logs | limit
10` as query, customize color of a lens histogram, and save it with a
saved search. Next I check 2 cases:
1. edit query limit `from kibana_sample_data_logs | limit 100`, see that
vis customization gets reset which is expected, press "Revert changes"
in the "Unsaved changes" badge => notice that reset did not work
2. edit only histogram color, press "Revert changes" in the "Unsaved
changes" badge => notice that reset did not work

Here are some nuances with the state management I am seeing which
together do not allow to successfully revert unsaved changes:
- For ES|QL histogram lens attributes include a modified query `from
kibana_sample_data_logs | limit 10 | EVAL timestamp=DATE_TRUNC(30
second, @timestamp) | stats results = count(*) by timestamp | rename
timestamp as "@timestamp every 30 second"` which means that not only
changes to the original query but also a different time interval
invalidates the saved lens attributes.
- In ES|QL mode, `query` prop update is delayed for
`UnifiedHistogramContainer` component until Discover finishes the
documents fetch
fc2ec957fe/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts (L346)
which means that Discover should make a request on revert changes. And
It's not happening for (2) as it does not make sense for Discover to
trigger refetch if only `visContext` changes so we should find another
way. With (1) there is another problem that Discover `visContext` state
gets hijacked by lens attributes invalidation logic (as query is not
sync yet to UnifiedHistogram) before fetch is completed or get [a chance
to be
fired](6038f92b1f/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts (L51-L54)).
I tried delaying `externalVisContext` prop update too (to keep in sync
with `query` update) but it does not help
fc2ec957fe/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts (L437)
- Unified Histogram should signal to Discover to start a refetch when
current suggestion changes
fc2ec957fe/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts (L289)
- for some reason this logic is required for "Revert changes" to work as
it triggers the refetch. I would expect Discover on its own to notice
the change in query and refetch data but it does not seem to be the
case.

</details>

<details>
<summary>Other challenges</summary>

- [ ] Since we are starting to save lens attributes inside a saved
search object (similar to how Dashboard saves lens vis by value), we
should integrate Lens migrations into saved search migrations logic. I
made a quick PoC how it could look like here
4529711d0d
This showed that adding Lens plugin as a dependency to saved search
plugin causes lots of circular deps in Kibana. To resolve that I am
suggesting to spit saved search plugin into 2 plugins
https://github.com/elastic/kibana/pull/174939 - not the best solution
but it seems impossible to split lens plugins instead.
    Updates here: 
- [x] revert the code regarding migrations and saved search plugin split
- [x] create a github issue to handle client side migrations once their
API is available https://github.com/elastic/kibana/issues/179151
- [x] Discover syncs app state with URL which means that the new
`visContext` (large lens attributes object) ends up in the URL too. We
should exclude `visContext` from URL sync as it can make the URL too
long.
    Updates here:  we are not using appState for this any more
- [x] Changes from https://github.com/elastic/kibana/pull/171081 would
need to be refactored and integrated into the new `LensVisService`.
- [x]  Refactor after https://github.com/elastic/kibana/pull/177790
- [x] Handle a case when no chart is available for current ES|QL query
- [ ] For ES|QL histogram lens attributes include a modified query `from
kibana_sample_data_logs | limit 10 | EVAL timestamp=DATE_TRUNC(30
second, @timestamp) | stats results = count(*) by timestamp | rename
timestamp as "@timestamp every 30 second"` which means that not only
changes to the original query but also a different time range can reset
the customization of lens vis as it gets a different time interval based
on current time range
- New update from Stratoula: 
- [ ] would it help to persist response of `onApplyCb` instead of lens
attributes? <= the shape does not seem to be different and it works as
it is so I'm keeping lens attributes
- [x] use new `getLensAttributes` from
https://github.com/elastic/kibana/pull/174677

</details>

10x flaky test
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5578

### 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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-04-08 16:04:52 +02:00
Dzmitry Lemechko
65b5298a85
[ftr] services/page objects cleanup (#179560)
## Summary

@dej611 shared with me a way to look for code duplication in Kibana repo
and I did a quick check in FTR page objects / services
```
npx jscpd  --ignore '**/target/**,**/*.d.ts,*.json,**/*spec*,**/test_suites/**' **/test*/**/page_objects/**  -r html
npx jscpd  --ignore '**/target/**,**/*.d.ts,*.json,**/*spec*,**/test_suites/**' **/test*/**/services/**  -r html`
```

I was able to find not only easy to fix duplications, but also
non-longer used service and functions. This PR just a small cleanup :)

---------

Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2024-04-06 09:24:22 +02:00
Marco Liberati
d680d2d45d
Unskip TSVB to Lens functional test (#179858)
## Summary

Fixes #179307 and speeds up a bit the `resetPage` method when possible
via click on the `Visualize list` navigation breadcrumb on the top left:

<img width="289" alt="Screenshot 2024-04-04 at 09 56 37"
src="74011b51-34b1-4cfa-a78e-4224a3494a25">


The work on `navigateToNewVisualization` (function called by
`resetPage`) had some side effects for some tests where a uiSettings
changes were used as shortcut for the time picker: in such case a
`forceRefresh` option has been provided now to cover it, but I may
suggest to reduce the usage as much as possible.
The new change lead to an average of ~5 minutes saving only within the
`open_in_lens/tsvb` test suite, but it is a rough number as the average
between the savings on the CI on the flaky runner.
Probably there's an extra saving on other test suites as well.

Flaky runner for the `Open in Lens/TSVB` test suite (50x runs):
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5604
Flaky runner for the `Lens - Group5` test suite (50x runs):
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5606#_


### 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
2024-04-04 11:24:20 +02:00
Hannah Mudge
b9ab67ab13
[Dashboard Navigation] GA Links Panel (#178999)
Closes https://github.com/elastic/kibana/issues/172075
Closes https://github.com/elastic/kibana/issues/178396

## Summary

In order to move the links panel into general availability, this PR does
four main things:
1. It changes the default of the "Save to library" toggle in the flyout
from `true` to `false` - this is in response to some early telemetry,
which suggests that link panels **not** saved to the library are more
common.

    | Before | After |
    |--------|--------|
| ![Screenshot 2024-03-20 at 9 38
41 AM](af42e570-98c2-4cbb-852f-0a34a7dd779b)
| ![Screenshot 2024-03-20 at 9 36
10 AM](2943e3fe-c3ce-4b23-a8cf-bba990995457)
|

2. It fixes a styling issue in Serverless where the height of the
secondary edit/add link flyout was incorrect.

    | Before | After |
    |--------|--------|
|
![image](0d32bda7-a5bc-4655-80ac-bffab6fce61a)
|
![image](78f32642-550b-475f-bbf1-12a38189592e)
|

3. It removes the lab setting for the links panel. The removal of this
setting is **not** a breaking change - it is completely safe to remove
this setting **regardless** of the previous value. Telemetry tracking
for this setting is also no longer required.

    | Before | After |
    |--------|--------|
| ![Screenshot 2024-03-19 at 3 00
39 PM](e9d5c19e-9ebd-4561-8391-4bb7e6f915d9)
|
![image](1325c0d0-349f-4dc9-897a-41049efb4670)
|


4. It removes any reference to "Technical preview" or "Experimental"
    
    | Before | After |
    |--------|--------|
| ![Screenshot 2024-03-19 at 2 55
20 PM](2a246688-78b1-4376-9218-8b6b2a87dfed)
|
![image](20bf7b6c-ef85-4ede-851d-035fd9f53bbd)
|
| ![Screenshot 2024-03-19 at 2 56
14 PM](c9fe5224-56d8-4d04-8b3c-f7c8b5433115)
| ![Screenshot 2024-03-19 at 2 58
27 PM](a2dfcb4d-2d42-40d0-a7d4-616587e69044)
|


### 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))
- [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)
2024-03-25 13:10:04 -07:00
Julia Rechkunova
e2da5af358
[ES|QL][UnifiedFieldList] Support field stats for ES|QL query (#178433)
- Closes https://github.com/elastic/kibana/issues/174984

## Summary

This PR adds field stats for ES|QL mode in Discover. It will show "Top
values" for `keyword`, `ip`, `boolean`, `number`, `version` fields and
"Examples" for `text` and geo fields.

Also this PR extends text based column's meta with `esType` to make it
easier to differentiate between `keyword` and `text` columns when kibana
type for both is `string`. This change also has a UI improvement: `k`
token will be shown next to keyword fields in data grid column header
and in doc viewer instead of `t` token. And it will be possible to
filter by Keyword/Text types in the fields sidebar for ES|QL mode.

<img width="400" alt="Screenshot 2024-03-13 at 18 29 47"
src="d88e85c3-329f-44fc-af54-3493dd9896d0">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 01"
src="b0808860-28db-472b-a0e3-37fc857bb40c">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 19"
src="b571199c-5956-472c-a0f7-c1b3d9bfe473">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 13"
src="a8e46b97-da38-4cbb-8980-fff214e09818">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 06"
src="8d1495ea-36d5-4203-9e86-90e7ea22cfe9">
<img width="400" alt="Screenshot 2024-03-13 at 18 31 50"
src="b0660c57-aea8-4570-a72b-22df4c15dcc8">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 50"
src="9f81f7a8-7cba-44db-bbef-f1f1cb8e1093">

25x flaky test
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5470

### 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 was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-03-22 05:30:04 -07:00
Marta Bondyra
095c0593c5
[kbn-dnd-package] Divide draggable and droppable (#177282)
## Summary

Refactors a `<DragDrop/>` component to `<Draggable/>` and
`<Droppable/>`.

1. Performance gains
Performance improvements – one rerender less and then longest render
dropped by 30-40% (for 6x slowdown from 250 to 150ms action). The main
reason is that the components that were switching between being
Draggable and Droppable don't have to do it anymore so we don't mount
and unmount components as often.

<img width="856" alt="Screenshot 2024-02-22 at 17 10 07"
src="1555d1e0-93e6-4037-8636-470ea5101a14">

<img width="834" alt="Screenshot 2024-02-22 at 17 11 27"
src="11db4f37-e1c8-4ca5-83b7-c59d7937ce9a">

2. Readability improvements
Now it's much easier to see if the component is a drop zone or a
draggable component. The logic that was mixed between these two is
untangled and the components are smaller thanks to it.

4. Better API
It's easier to add a `<Draggable/>` or `<Droppable/>` components.

6. Small bugs fixes
Flash of colors when starting dragging in reorder group
![Feb-22-2024
17-15-32](e63296f5-1bc5-455c-ad7b-05738511f16a)

Annotation cut content
<img width="297" alt="Screenshot 2024-02-22 at 17 17 49"
src="ce4ab3d1-2a89-49cc-9230-c2ade194d1a3">

Half-transparent content when dragging - it doesn't make sense.
<img width="284" alt="Screenshot 2024-02-22 at 17 16 51"
src="fcafc12e-2ec9-4f93-a224-c7b4c8852e09">

7. Rewriting all the dnd tests from the package to rtl. It's still not
ideal, but way more tested from user perspective and way more readable.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-03-21 14:30:14 +01:00
Matthew Kime
e0adf1d744
[data views] Data views / runtime field creation flaky test fix (#177315)
## Summary

Fix runtime field creation flaky test. Just a pair of minor test
improvements.

Passed a 200x run through the flaky test runner.

Closes: https://github.com/elastic/kibana/issues/173558 and
https://github.com/elastic/kibana/issues/178733
2024-03-18 06:52:45 -05:00
Eyo O. Eyo
910188e4e0
Fix how sample data test install state is determined in test (#178529)
## Summary
Closes https://github.com/elastic/kibana/issues/112103

Make sample data install status available to be read by test util, as
documented by @gsoldevila in the issue referenced above. The issue
happens because there's a slight delay that really can't be walked
around where the install status in this particular instance is still
'installed' but the call to mark the sample data completes so there's
that flicker where the `remove` element is displayed momentarily because
the component doesn't quite received the update to the sample data's
install status immediately.

The proposed fix opts to complement the current way of determining if
any sample data is installed using the newly introduced `data-status`
attribute, here we wait till the result of clicking the remove button
actually triggers a change in the value of the install state of said
sample data, which in turn is reflected in the value of `data-status`
alongside checking that the remove button exists.

### Checklist
<!--
Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials -->
- [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
<!--
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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)
-->
2024-03-12 12:16:13 -07:00
Hannah Mudge
235c4d5ad7
[Controls] Add "Apply" button (#174714)
Closes https://github.com/elastic/kibana/issues/170396
Closes https://github.com/elastic/kibana/issues/135459

## Summary

This PR adds the option to **stop** selections from being auto-applied -
instead, authors can make it so that their selections are only applied
once the new apply button is clicked:



d785631c-0aa5-4e3f-81f9-2d1d0f582b70

### Brief Summary of Changes

- **Publishing Filters**
We used to publish the control group filters as soon as **any** child
changed its output - however, if the apply button is enabled, this logic
no longer works. So, we added an extra step to the publishing of
filters:

1. When a child's output changes, we check if the apply button is
enabled
2. If it is disabled, we publish the filters to the control group output
right away (like we used to); otherwise, we push the new filters to the
`unpublishedFilters` array.
3. Clicking the apply button will publish the `unpublishedFilters`
array.

- **Unsaved Changes**
We used to publish control group unsaved changes whenever **anything**
about the children panels' persistable input changed - however, this no
longer works with the apply button because we **don't** want selections
to trigger unsaved changes when it is enabled.
   
To get around this, we **no longer** take into account selections when
checking for unsaved changes - instead, we compare the **output
filters** from the control group to determine whether anything about the
children changed. As described above, if the control group has
"auto-apply selections" turned off, the control group waits to change
its output until the apply button is clicked - therefore, unsaved
changes will **also** not be triggered until the apply button is
clicked. This unsaved changes logic works **regardless** of if the apply
button is enabled or not.

- **Saved Object**
This required changes to the **dashboard** saved object because of how
we store the control group input as part of the dashboard SO - so, we
are now on a second version for the Dashboard SO. I've also made this
version **slightly less strict** by allowing unknown attributes in the
schema - that way, unknown attributes will no longer throw an error (as
they do on version 1).

### 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] [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [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))
- [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>
Co-authored-by: Nick Peihl <nick.peihl@elastic.co>
2024-03-12 12:22:39 -06:00
Hannah Mudge
f72f278c6d
[Dashboard Navigation] Unskip links panel test (#178051)
Closes https://github.com/elastic/kibana/issues/177675
Closes https://github.com/elastic/kibana/issues/177676

## Summary

When I originally ran the FTR on this test, it [passed 100
times](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5389),
so I thought we could maybe just unskip the test without further effort.
However, when looking at the failure screenshot, it looks like the link
creation/editor flyout didn't open for some reason - so, I decided to
add some extra logging statements (to make debugging easier if this test
fails again) + add a few extra retry's to **ensure** that the flyout is
open before progressing to (hopefully) prevent this from happening in
the future.

Rerunning the FTR after these changes also [passed 100
times](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5391):


![image](32b0bb5d-d063-4095-8fd6-3bca3a191616)

Backporting these changes since the original failure was in 8.13.

### 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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed


### 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)
2024-03-06 11:08:17 -07:00
Davis McPhee
dd06748484
Fix flaky test from #173292 and #173784 part 2 (#177530)
## Summary

Let's try this again... This PR again attempts to fix the flaky test
from #173292 and #173784 (and now #175047 too), which was still failing
after #176978 was merged.

The latest failures are due to the "View all matches" button
disappearing between when it was last checked in the retry loop and when
we attempt to click it again, so I've updated the test to handle
exceptions thrown when we attempt to re-click the button.

Hopefully this will eliminate the flakiness, but I'm open to any
suggestions for alternative approaches if someone has a better idea.

~Flaky test runner x95:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5266.~
~Flaky test runner x95:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5284.~
Flaky test runner x95:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5286.
Flaky test runner x95:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5305.

Resolves #173292.
Resolves #173784.
Resolves #175047.

### Checklist

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] 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)
2024-02-24 20:50:45 -04:00
Julia Rechkunova
bd593149db
[DataView] Show previously selected no time field setting (#177221)
- Closes https://github.com/elastic/kibana/issues/177001

## Summary

When editing a data view, previously selected time field value will be
chosen in the form.

### 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
2024-02-23 10:45:55 +01:00
Davis McPhee
36365bd911
[Discover] Prevent showing the ES|QL transition modal when a saved search without unsaved changes is open (#177107)
## Summary

This PR prevents the ES|QL transition modal from showing when switching
to a data view from a saved search that has no unsaved changes.

Resolves #176772.

### Checklist

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] 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)
2024-02-22 11:47:13 -04:00
Julia Rechkunova
f004fac3ec
[Discover] Add baseline tests for time field column (#176937)
- Addresses https://github.com/elastic/kibana/issues/174074

Adding tests before I change the code via
https://github.com/elastic/kibana/pull/176834

It checks different permutations of the following conditions:
- with and without selected fields
- data view with and without a time field
- ESQL with and without a time field
- Discover and Dashboard views
- `doc_table:legacy` setting
- `doc_table:hideTimeColumn` setting

The whole test suite is running for ~23 minutes. Here is the successful
build
https://buildkite.com/elastic/kibana-pull-request/builds/193811#018dace6-044f-46f9-b7a9-1fc82d05278c

I am skipping some tests so it does not take so much time on every
Kibana build. If we ever need to check all edge cases (like in
https://github.com/elastic/kibana/pull/176834) we can temporary enable
them again. So in the end the PR adds ~7 minutes to the build.
2024-02-20 14:58:05 +01:00
Matthias Wilhelm
a2268131b3
[DataViews] Improve management functional tests for serverless (#177146)
* improving code to prevent occasional flakiness in serverless
2024-02-20 10:52:48 +01:00
Davis McPhee
d2f566970c
Fix flaky test from #172781 (#176972)
## Summary

This PR fixes the flaky test skipped in #172781.

Flaky test runner x95:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5187.

Resolves #172781.

### Checklist

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] 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)
2024-02-15 16:08:13 -04:00
Tre
986116133f
[FTR] Refactor toasts svc (#174222)
### Summary

Refactoring general ui service (test helpers), to a kbn package.
  - Optimize methods and drop some code duplication.
  
### Why 

  - Makes the service easily available from multiple code areas. 
- This is a preparation to potentially moving tests to plugins /
packages, where they would no longer be able to import thing from test
or x-pack/test but only from a package.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-02-14 09:24:20 +00:00
Peter Pisljar
721f48cad3
discover query cancellation (#176202) 2024-02-13 15:54:51 +01:00
Julia Rechkunova
0f31c0bff3
[Discover] Unskip update data view test (#176508)
- Closes https://github.com/elastic/kibana/issues/174066

95x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5099

### 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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2024-02-12 11:21:00 -07:00
Davis McPhee
509248b0c6
[Saved Queries] Improve saved query management (#170599)
## Summary

This PR introduces a number of changes and improvements to saved query
management:
- Add server side pagination (5 queries per page) and search
functionality to the "Load query" list, which improves UX and
performance by no longer requesting all queries at once.
- Redesign the "Load query" list to improve the UX and a11y, making it
possible for keyboard users to effectively navigate the list and
load/delete queries.
- Add an "Active" badge to the "Load query" list to indicate which list
entry represents the currently loaded query, and hoist the entry to the
top of the first page for better visibility when no search term exists.
- Deprecate the saved query `/_all` endpoint and update it to return
only the first 100 queries instead of loading them all into memory at
once.
- Add a new `titleKeyword` field to the saved query SO, which allows
sorting queries alphabetically by title when displaying them in the
"Load query" list.
- Improve the performance of the "has saved queries" check when Unified
Search is mounted to no longer request actual queries, and instead just
request the count.
- Update the saved query duplicate title check to no longer rely on
fetching all queries at once, and instead asynchronously check for
duplicates by title on save.
- Add server side duplicate title validation to the create and update
saved query endpoints.
- Various small fixes and cleanups throughout saved query management.


43328aea-0f7b-4b7a-a5fb-e33ed822f317

Resolves #172044.
Resolves #176427.

## Testing

To generate saved queries for testing, run the script below and replace
`{KIBANA_REQUEST_COOKIE}` with the cookie header value from an API
request of a Kibana user with an active session:
```shell
for i in {1..100}; do curl 'http://localhost:5601/internal/saved_query/_create' \
  -H 'Accept: */*' \
  -H 'Accept-Language: en-US,en;q=0.9,az;q=0.8,es;q=0.7' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: {KIBANA_REQUEST_COOKIE}' \
  -H 'elastic-api-version: 1' \
  -H 'kbn-build-number: 9007199254740991' \
  -H 'kbn-version: 8.13.0' \
  -H 'x-elastic-internal-origin: Kibana' \
  --data-raw '{"title":"query '"$(echo $(($i - 1)) | tr '[0-9]' '[a-j]')"'","description":"","query":{"query":"bytes > 500","language":"kuery"},"filters":[]}' \
  --compressed; done
```

### 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [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))
- [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>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-02-12 13:18:17 -04:00
Robert Oskamp
736af7b0e0
[FTR] Fix URL checks in navigateToApp (#176546)
## Summary

This PR fixes the URL check for successful navigation in the `common`
PageObject `navigateToApp` method.
2024-02-09 09:15:18 +01:00
Julia Rechkunova
f019b531a0
[Discover] Unskip edit data view test (#176134)
- Closes https://github.com/elastic/kibana/issues/174066

## Summary

50x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5022


### 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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2024-02-06 09:07:34 +01:00
Catherine Liu
80d01ecca4
[Controls] Adds step setting for range slider control (#174717)
## Summary

Closes #174542.


bb9e0297-a0a5-48e9-8424-457976ac3188

This adds a step interval option to the range slider control. 

<img width="300" alt="Screenshot 2024-01-17 at 4 06 05 PM"
src="79984cc9-1b82-42e9-bb7f-7bb71307c894">


This step setting allows values greater than 0, including decimal step
intervals.


95247aab-045b-4c0c-9004-dce01f3a10b1

When a step interval is defined, the number fields still show the
absolute min/max range available as placeholders, but the range slider
in the popover will be rounded to the nearest min/max multiple of the
step interval.

<img width="400" alt="Screenshot 2024-01-17 at 4 05 26 PM"
src="cf9e17f7-75a6-4d37-97ff-8a54526615cf">

Even with a step interval defined, values that fall between the step
intervals can be entered directly in the number fields.

<img width="400" alt="Screenshot 2024-01-17 at 4 07 42 PM"
src="5af10454-5ce0-448b-8fda-075396e55b78">


### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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>
2024-02-01 14:08:56 -08:00
Elena Stoeva
123e62517a
[Advanced Settings] Integrate new Settings application into stateful Kibana (#175255)
Closes https://github.com/elastic/kibana/issues/172922 

## Summary

This PR:
- Integrates the new Settings application
(`packages/kbn-management/settings/application`) into stateful Kibana
and removes the old `management_app` from the
`src/plugins/advanced_settings` plugin.
- Adds support for section registry in the new Settings application, so
that other plugins can add their own sections to the Advanced settings
app.
- Adds functionality for disabling saving of settings based on the
provided capabilities of the current user.

<img width="1352" alt="Screenshot 2024-01-23 at 16 46 03"
src="1f3b7088-58e2-46e8-a7dd-ae0fc346b4ba">

<br><br>

"Usage collection" section in Global settings:

<img width="1099" alt="Screenshot 2024-01-23 at 16 48 24"
src="ebc54ad5-348b-46dd-a047-b418ddc7ba4f">

### How to test

**Testing Advanced settings in stateful Kibana:**
1. Start Es with `yarn es snapshot` and Kibana with `yarn start`
2. Go to Stack Management -> Advanced Settings
3. Verify that the app functions correctly. Both tabs (for space and
global settings) should be displayed, setting fields should be editable
and saveable, etc.

**Testing the section registry**
Currently, `telemetry_management_section` is the only plugin that
registers a section - the "Usage collection" section under the "Global
settings" tab. This should work correctly in stateful Kibana.
1. Start Es with `yarn es snapshot --license=trial` and Kibana with
`yarn start`
2. Go to Stack Management -> Advanced Settings and select the "Global
settings" tab
3. Scroll down and verify that the "Usage collection" section is
displayed and works as expected.

**Testing with different capabilities:**
1. Start Es with `yarn es snapshot` and Kibana with `yarn start`
2. Go to Stack Management -> Roles
3. Create a role that has "Read" access to Advanced settings and one
that doesn't have any access.
4. Create users with each of these two roles.
5. Log in with these users and verify that the user with "Read" access
can see the app but cannot edit it, and the user with no privileges
cannot access the app.

**Testing Advanced settings in serverless Kibana:**
The Advanced settings app in serverless shouldn't be affected by these
changes.
1. Start Es with `yarn es serverless` and Kibana with `yarn
serverless-{es/oblt/security}`
2. Go to Management -> Advanced Settings
3. Verify that the app functions correctly. There shouldn't be any tabs
as there are no spaces.


<!--
### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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>
2024-01-30 20:47:35 +00:00
Robert Oskamp
bc9706577e
Fix serverless attachment framework tests for MKI (#175085)
## Summary

This PR fixes the cases attachment framework tests for MKI runs with
search projects.

### Details

- Recently, a refresh of the default data view field list has been added
(as part of field caps caching)
- However, during test run time, this data view does not necessarily
exist anymore (might have been cleaned up by an earlier test)
- This was the case for our MKI test runs (where tests run in a
different order / in different groups than in CI, which made the test
fail
- This introduced an optional parameter to ignore a missing data view
when `refreshDataViewFieldList` is called, which allows us to just move
on in that scenario
2024-01-18 13:09:25 +01:00
Matthew Kime
acdaf0127e
[data views] cache field caps requests (#168910)
## Summary

Closes: https://github.com/elastic/kibana/issues/169622

Field caps request caching - implement `stale-while-revalidate` cache
headers and etags with 304 responses as appropriate.

This PR accomplishes
- Adds 304 Not Modified to http server
- Adds refresh button to data view management that force refreshes field
list
- Adds `/internal/data_views/fields` endpoint which supports caching. 
- This is necessary since `fields_for_wildcard` doesn't support caching
due to POST requests
- Adds `stale-while-revalidate` header directive UNLESS field list is
empty.
- Uses Vary header with hash of user id to force requests when user has
changed.
- Unchanged field list responses won't recreate data view field list

### How to test
1. Pop open the dev tools to the network tab and make sure 'Disable
cache' is unchecked. filter for 'fields' requests
2. Load more than one data set (sample data is fine)
3. Go to discover
4. Switch selected data views. Notice status code on first load vs
subsequent loads
5. Open a new window, notice loading from cache
6. Push document that changes field list. You'll need to wait for cache
to expire for it to load. The default is 5s.
7. Notice that field list loads after cache is old properly result in
304 response.
8. Set `data_views:cache_max_age`, shift reload. No field requests will
be cached.

#### Note on Safari

Safari doesn't support the `stale-while-revalidate` directive.
Additionally, the Safari dev console shows 304 responses as 200's. I
figured this out by adding console statements to the fields endpoint. As
best I can tell, Safari won't be performant on slow clusters but its
also no slower than it was before this PR. Safari does respect the
disabling of cache headers.

## Release note

Data View field list requests are now cached with a
`stale-while-revalidate` strategy. This means that after the initial
field list request, all subsequent requests return the cached response
which is very fast. If the cache is determined to be stale then the
cache will update in the background and new data will be available on
the next request.

This behavior can be modified via the `data_views:cache_max_age` Kibana
advanced setting. Setting it to zero will disable the cache. All other
values (in seconds) will be used to determine whether the cache is
stale. The default value is 5 seconds.

The field list can be manually updated via the refresh button in data
view management or a hard refresh with your browser.

Note for Safari: The `stale-while-revalidate` cache directive is
unsupported, therefore it makes additional requests. If this is
impacting Kibana performance then try Chrome or Firefox.

Data View Management

<img width="1064" alt="Screenshot 2024-01-09 at 1 36 20 PM"
src="f272c19f-81b4-4697-9303-b1f8f150e2b9">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: amyjtechwriter <61687663+amyjtechwriter@users.noreply.github.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2024-01-16 06:54:38 -06:00
Julia Rechkunova
aa33843863
[Discover] Move total hits counter from histogram to grid area. New controls in histogram. (#171638)
- Closes https://github.com/elastic/kibana/issues/168825
- Closes https://github.com/elastic/kibana/issues/171610
- Closes https://github.com/elastic/kibana/issues/167427
- Partially addresses https://github.com/elastic/kibana/issues/165192

## Summary

This PR moves the total hits counter closer to the grid, updates
histogram controls and introduces new panel toggle buttons for toggling
fields sidebar and histogram.

<img width="500" alt="Screenshot 2023-12-05 at 15 37 20"
src="5b9bd771-1052-4205-849f-18c21cc299b8">
<img width="500" alt="Screenshot 2023-12-05 at 15 37 29"
src="e5941b27-c497-4d7e-b461-68b66931475a">
<img width="500" alt="Screenshot 2023-12-05 at 15 37 37"
src="97abd32e-9ff2-4d9a-b7e7-b9d6d9cf64db">
<img width="500" alt="Screenshot 2023-12-05 at 15 37 50"
src="10f2b4f4-ec37-41c3-b78b-78c64e14d655">
<img width="400" alt="Screenshot 2023-12-05 at 15 37 59"
src="ef2e28b2-f6ba-4ccb-aea4-3946ba2d5839">
<img width="300" alt="Screenshot 2023-12-05 at 15 38 05"
src="07901ede-0bcb-46a6-a398-4562189fd54f">
<img width="500" alt="Screenshot 2023-12-05 at 15 40 38"
src="17830115-2111-4b8f-ae40-7b5875c06879">
<img width="500" alt="Screenshot 2023-12-05 at 15 40 56"
src="975d475b-280b-495a-b7b7-31c7ade5f21e">
<img width="500" alt="Screenshot 2023-12-05 at 15 43 08"
src="38b6053a-e260-48d8-9591-3f3409df2876">

## Testing

When testing, please check collapsing/expanding the fields sidebar and
histogram. Also for ES|QL mode with suggestions, legacy table, no
results and error prompt, Field Statistics tab, data views without a
time field, light/dark themes.

### 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] [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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2024-01-12 03:36:27 -07:00
Tre
0515829a9e
[FTR] Move find service to shared location (#173874)
## Summary

Refactoring general ui service to a kbn package.

Resolves an [Appex QA](https://github.com/elastic/appex-qa-team) issue.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-01-04 17:58:17 +00:00
Matthias Wilhelm
d67c0eff2f
[DataViews] Unskip and stabilize functional tests of dataviews management (#173900)
Improving data view related functional test code to reduce flakiness
2023-12-28 21:52:11 +01:00
Hannah Mudge
2486ed5bd1
[Controls] Re-add filtering settings (#172857)
Closes https://github.com/elastic/kibana/issues/162985

## Summary

This PR re-adds UI for the filtering settings that allow authors to
determine whether or not they want the unified search bar / time picker
to sync with the control group.

To provide some context, we **used** to have these settings, but they
were deemed over complicated and the UI to control them was removed back
in `v8.3`. Here's a screenshot of what they used to look like:

<p align="center"><img width="700"
src="c84c4be0-a12e-46fa-b7b5-2e94682d8bbf"/></p>

> [!NOTE]
> These settings still existed in the code, even after `v8.3` - all we
did was remove the UI to control them.

After customer feedback, we decided to re-add the UI to control these
settings, with **some** simplification - specifically, after
investigating how other apps (Maps, Lens, etc.) handle unified search
bar settings, I noticed that the control group was the **only** place
that considered the query bar to be different than / seperate from
filter pills. Therefore, rather than having **three** toggles like we
did previously (filter pills, query bar, and time picker), I combined
the filter pills + query bar settings into a single "Apply global
filters" toggle. So now, our unified search bar settings have only
**two** toggles, like so:


<p align="center"><img width="500"
src="ba8d3a8f-ee0c-48c6-8d35-6068571013b3"/></p>


This is not only simpler than it was in versions less than `v8.3.0`, it
is also more consistent with how other apps do it.

> [!IMPORTANT]
> After some design feedback, I moved the old descriptions for the
"Validate user selections" and "Chain controls" settings into tooltips +
switched to a compressed `EuiSwitch` for all the settings.
>
> All of the screenshots in this PR description have been updated to
reflect this change, but some screenshots in the comments below may be
out of date.

### Summary of Control Group Settings by Version

| Version | Screenshot |
|--------|--------|
| Version <= `v8.2.0` | <img width="535"
src="c84c4be0-a12e-46fa-b7b5-2e94682d8bbf"/>
|
| `v8.3.0` <= version <= `v8.12.0` | <img width="535"
src="cb49f33e-ce7a-4a29-9830-2c3feafdcb23"/>
|
| This branch (`v8.13.0`) | <img width="535"
src="a76fc1f9-5b2d-4dc5-855a-6a284256e8c5"/>
|

### 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] [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
([Link](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4638))

![image](8a0ffab3-4783-4e64-9585-ee20ee765d6f)
- [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))
- [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)
2023-12-19 16:24:05 -07:00
Hannah Mudge
7d024a7b86
[Controls] Add numeric options list (#172106)
Closes https://github.com/elastic/kibana/issues/143587
Closes https://github.com/elastic/kibana/issues/126795

## Summary

This PR adds support for numeric options lists - i.e. options list
controls that are created with a numeric field. In order to make this
possible, I had to add support for fields to have multiple, overlapping
compatible control types (however, it is currently only number fields
where this applies). When selecting a field that is compatible with
multiple control types, the user is given the option to select which
control type they want, like so:

<p align="center"><img alt="GIF of multiple control types being
available for a single field"
src="9ebb6795-1206-47c4-aaef-32437d27cf59"/></p>

> [!NOTE]
> This system currently defaults to options list controls, since these
are the most common - this is backed up by our telemetry, which shows
that (in the last 30 days), clusters with at least one options list
control occured **ten times more often** than clusters with at least one
range slider control. However, if we decide to introduce more control
types (such as, for example, a date picker control), this assumption may
no longer be the case - at that point, we would need to reevaluate
whether the default should **always** be options list.

### Video


4a876c94-a041-4228-aab8-7c2c1c871071

### Exact Match Searching

Since numeric fields do not have a "prefix" query equivalent, the only
possibility for searching these fields is either (1) a range query or
(2) an exact match / equality query. In this PR, I added support for
equality search - i.e. in order to find a value in a numeric options
list, you must enter the *full*, exact term in order for it to be found;
in the future, we could extend this to include a range search. This is
the exact match searching in action:

<p align="center"><img alt="GIF of exact match searching example on
number field"
src="491feff3-031f-4367-8018-67aab9be55e3"/></p>


Since exact match searching is a generic search query that works for
**all** field types, I added this as an option for **all** field types
that support searching - i.e. keyword fields, number fields, IP fields,
etc. For example, here is the supported search techniques for a keyword
field:


<p align="center"><img alt="GIF of all available search techniques for
keyword field"
src="dbc12cef-d43e-4d9f-a779-a5fe9e75325c"/></p>

> [!TIP]
> Exact match / equality / term searching on float values can lead to
slightly unexpected results - refer to the [documentation on precision
loss](https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html#_which_type_should_i_use)
for a description of why. Be mindful when using an options list control
for float values, and consider whether a range slider might be a better
solution!

Eventually, we should be able to add exact-match searching to date
fields, as well; however, due to [discrepancies that exist in the
unified search bar](https://github.com/elastic/kibana/issues/172097)
with respect to how searching date fields is handled, we should ideally
wait until this is resolved so that we can be consistent across all
three search experiences (query bar, filter pills, and controls).


Depending on how the author expects a given control to be used, this
search technique will return results **faster** than some of the other
search types since "search as you type" will, more often than not,
return zero results in this setting - that is why I chose to add it for
keyword fields, as well.


### Searching when `allowExpensiveQueries` setting is `false`
Previously, we had **two separate versions** of our options list search
queries - one for when `allowExpensiveQueries` was `true`, and the other
for when it was `false`. This was a significant amount of tech debt that
was time consuming to maintain, which made it difficult to justify
keeping this around considering **how much** of Kibana relies on this
setting to be `true` (searching for existing Dashboards by title on the
listing page, saving a brand new dashboard, etc.).

Therefore, while we still have **some** functionality when
`allowExpensiveQueries` is `false`, I have refactored this code
significantly to simplify the logic.

> [!IMPORTANT]
> Specifically, options list controls now only support **exact match
searching** when `allowExpensiveQueries` is `false`.

Since this query is the same regardless of the type of field or the
value of `allowExpensiveQueries`, this means we no longer have to
maintain two slightly different versions ("cheap" and "expensive") of
our search queries. This cleans up our tech debt significantly.

### Bundle Size Changes @elastic/kibana-operations 

Changes to bundle size are primarily due to the changes I made to the
`OptionsListEditorOptions` component - since this component is directly
added to the options list factory (which is not async imported), this
impacts the bundle size.

### 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] [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] 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))
- [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)
2023-12-18 13:52:45 -07:00
Tomasz Kajtoch
b043545208
Upgrade EUI to v91.0.0 (with backports) (#170716)
`v90.0.0``v91.0.0-backport.0`

⚠️ While this upgrade pings many teams and has a large code diff, **the
majority of the changes are snapshots or tests-related** and do not
touch source code, so should theoretically only need a code review and
not dedicated QA.

The changes in EUI that required a large swathe of these updates are:

- **EuiPopover** removed an extra unnecessary `<div>` wrapper on its
anchors, which affected many snapshots and a few CSS overrides, which
should have been updated
- **EuiButtonGroup** now renders `<button>` elements instead of `<input
type="radio">` elements for single selection, which affected both
snapshots and E2E tests
- **EuiSuperDatePicker**'s absolute date input now requires an `Enter`
keypress when parsing dates (affected E2E tests)
- **EuiComboBox**, when rendered with `singleSelection={{ plainText:
'true' }}`, no longer renders a pill (i.e. text). This combobox type now
behaves more like an `EuiFieldText`, where the selection is rendered via
input `value` instead. This affected a high amount of E2E tests (both
FTR and Cypress), both in terms of updating assertions and changing
selections, but should **not** significantly affect user experience -
see https://github.com/elastic/eui/pull/7332 for more.

---

##
[`v91.0.0-backport.0`](https://github.com/elastic/eui/tree/v91.0.0-backport.0)

**This is a backport release only intended for use by Kibana.**

- Added `esqlVis`, `pipeBreaks`, and `pipeNoBreaks` icon glyphs.
- `EuiSelectable` now allows configurable text truncation via
`listProps.truncationProps`
([#7388](https://github.com/elastic/eui/pull/7388))
- `EuiTextTruncate` now supports a new `calculationDelayMs` prop for
working around font loading or layout shifting scenarios
([#7388](https://github.com/elastic/eui/pull/7388))

**Bug fixes**

- Fixed a bug with `EuiSelectable`s with custom `truncationProps`, where
scrollbar widths were not being accounted for
([#7392](https://github.com/elastic/eui/pull/7392))

## [`91.0.0`](https://github.com/elastic/eui/tree/v91.0.0)

- Updated the background color of `EuiPopover`s in dark mode to increase
visibility & contrast against other page/panel backgrounds
([#7310](https://github.com/elastic/eui/pull/7310))
- Memoized `EuiDataGrid` to prevent unneeded re-renders
([#7324](https://github.com/elastic/eui/pull/7324))
- Added a configurable `role` prop to `EuiAccordion`
([#7326](https://github.com/elastic/eui/pull/7326))
- Added a configurable `role` prop to `EuiGlobalToastList`
([#7328](https://github.com/elastic/eui/pull/7328))
- For greater flexibility, `EuiSuperDatePicker` now allows users to
paste ISO 8601, RFC 2822, and Unix timestamps in the `Absolute` tab
input, in addition to timestamps in the `dateFormat` prop
([#7331](https://github.com/elastic/eui/pull/7331))
- Plain text `EuiComboBox`es now behave more like a normal text
field/input. Backspacing will no longer delete the entire value, and
selected values can now be double clicked and copied.
([#7332](https://github.com/elastic/eui/pull/7332))
- `EuiDataGrid`'s display settings popover now allows users to clear the
"Lines per row" input before typing in a new number
([#7338](https://github.com/elastic/eui/pull/7338))
- Improved the UX of `EuiSuperDatePicker`'s Absolute tab for users
manually typing in timestamps
([#7341](https://github.com/elastic/eui/pull/7341))
- Updated `EuiI18n`s with multiple `tokens` to accept dynamic `values`
([#7341](https://github.com/elastic/eui/pull/7341))

**Bug fixes**

- Fixed `EuiComboBox`'s `onSearchChange` callback to pass the correct
`hasMatchingOptions` value
([#7334](https://github.com/elastic/eui/pull/7334))
- Fixed an `EuiSelectableTemplateSitewide` bug where the `popoverButton`
behavior would break if passed a non-DOM React wrapper
([#7339](https://github.com/elastic/eui/pull/7339))

**Deprecations**

- `EuiPopover`: deprecated `anchorClassName`. Use `className` instead
([#7311](https://github.com/elastic/eui/pull/7311))
- `EuiPopover`: deprecated `buttonRef`. Use `popoverRef` instead
([#7311](https://github.com/elastic/eui/pull/7311))
- `EuiPopover`: removed extra `.euiPopover__anchor` div wrapper. Target
`.euiPopover` instead if necessary
([#7311](https://github.com/elastic/eui/pull/7311))
- Deprecated `EuiButtonGroup`'s `name` prop. This can safely be removed.
([#7325](https://github.com/elastic/eui/pull/7325))

**Breaking changes**

- Removed deprecated `euiPaletteComplimentary` - use
`euiPaletteComplementary` Instead
([#7333](https://github.com/elastic/eui/pull/7333))

**Accessibility**

- Updated `type="single"` `EuiButtonGroup`s to render standard buttons
instead of radio buttons under the hood, per recent a11y recommendations
([#7325](https://github.com/elastic/eui/pull/7325))
- `EuiAccordion` now defaults to a less screenreader-noisy `group` role
instead of `region`. If your accordion contains significant enough
content to be a document landmark role, you may re-configure it back to
`region`. ([#7326](https://github.com/elastic/eui/pull/7326))
- Reduced screen reader noisiness when sorting `EuiDataGrid` columns via
toolbar ([#7327](https://github.com/elastic/eui/pull/7327))
- `EuiGlobalToastList` now defaults to a `log` role. If your toasts will
always require immediate user action, consider (with caution) using the
`alert` role instead.
([#7328](https://github.com/elastic/eui/pull/7328))

**CSS-in-JS conversions**

- Updated `$euiFontFamily` and `$euiCodeFontFamily` to match Emotion
fonts ([#7332](https://github.com/elastic/eui/pull/7332))

---------

Co-authored-by: Cee Chen <constance.chen@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-12-18 11:15:15 -06:00