Closes https://github.com/elastic/kibana/issues/164893
### Background
"is partial" has 2 meanings
1) Results are incomplete because search is still running
2) Search is finished. Results are incomplete because there are shard
failures (either in local or remote clusters)
[async
search](https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html)
defines 2 flags.
1) `is_running`: Whether the search is still being executed or it has
completed
2) `is_partial`: When the query is no longer running, indicates whether
the search failed or was successfully completed on all shards. While the
query is being executed, is_partial is always set to true
**note**: there is a bug in async search where requests to only local
clusters return `is_partial:false` when there are shard errors on the
local cluster. See
https://github.com/elastic/elasticsearch/issues/98725. This should be
resolved in 8.11
Kibana's existing search implementation does not align with
Elasticsearch's `is_running` and `is_partial` flags. Kibana defines "is
partial" as definition "1)". Elasticsearch async search defines "is
partial" as definition "2)".
This PR aligns Kibana's usage of "is partial" with Elasticsearch's
definition. This required the following changes
1) `isErrorResponse` renamed to `isAbortedResponse`. Method no longer
returns true when `!response.isRunning && !!response.isPartial`. Kibana
handles results with incomplete data. **Note** removed export of
`isErrorResponse` from data plugin since its use outside of data plugin
does not make sense.
2) Replace `isPartialResponse` with `isRunningResponse`. This aligns
Kibana's definition with Elasticsearch async search flags.
3) Remove `isCompleteResponse`. The word "complete" is ambiguous. Does
it mean the search is finished (no longer running)? Or does it mean the
search has all results and there are no shard failures?
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jatin Kathuria <jatin.kathuria@elastic.co>
Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
## PR change summary
`v87.2.0`⏩`v88.1.0`
⚠️ The biggest thing to QA in this PR is several **breaking changes** to
`EuiDescriptionList`.
### Description list `columnWidths` prop
This PR introduces a new `columnWidths` prop and removes several Kibana
instances of custom CSS overrides to title/description column widths.
The primary motivation behind this is not just to reduce custom CSS, but
also because v88.0.0 introduced an underlying CSS change of `column`
description lists to using [`display: grid`
CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout).
The new prop allows us to support existing description list custom
widths while not requiring Kibana developers to understand or write grid
CSS (except for 1 or two scenarios around `max-width`).
⚠️ **No user-facing UI around column widths should have regressed as a
result of these changes. If they have, please let us know in this PR.**
### Description list gutter size changes
The prop `gutterSize` has been renamed to `rowGutterSize` and the
default size is now `s` instead of `m`.
The change to `s` from `m` means there is an **expected** smaller gap
between list items (see below screenshots):
**Current `EuiDescriptionList` with default `rowGutterSize="s"`**
<img width="753" alt=""
src="c17aef28-ed3b-40c4-84c3-396e788b13bb">
**Prior `EuiDescriptionList` with default `gutterSize="m"`**
<img width="721" alt=""
src="84d5f5a2-8fa6-4f99-9dc0-73fd143aa1e1">
If Kibana teams prefer to keep the previous `m` gutter for their
instances of `EuiDescriptionList`, you have a couple of options:
1. Let EUI team know in the PR and we can set usage back to what it was
before
2. Set `rowGutterSize="m"` yourselves manually
---
## [`88.1.0`](https://github.com/elastic/eui/tree/v88.1.0)
- Added `font.defaultUnits` theme token. EUI component font sizes
default to `rem` units - this token allows consumers to configure this
to `px` or `em` ([#7133](https://github.com/elastic/eui/pull/7133))
- Updated `EuiDescriptionList` with new `columnWidths` prop
([#7146](https://github.com/elastic/eui/pull/7146))
**Bug fixes**
- Fixed `EuiDataGrid`'s keyboard shortcuts popover display
([#7146](https://github.com/elastic/eui/pull/7146))
**CSS-in-JS conversions**
- Renamed `useEuiFontSize()`'s `measurement` option to `unit` for
clarity ([#7133](https://github.com/elastic/eui/pull/7133))
## [`88.0.0`](https://github.com/elastic/eui/tree/v88.0.0)
- Updated `EuiDescriptionList` with a new `columnGutterSize` prop
([#7062](https://github.com/elastic/eui/pull/7062))
**Deprecations**
- Deprecated `EuiSuggest`. We recommend using `EuiSelectable` or
`EuiComboBox` instead
([#7122](https://github.com/elastic/eui/pull/7122))
- Deprecated `EuiControlBar`. We recommend using `EuiBottomBar` instead
([#7122](https://github.com/elastic/eui/pull/7122))
- Deprecated `EuiColorStops`. We recommend copying the component to your
application if necessary
([#7122](https://github.com/elastic/eui/pull/7122))
- Deprecated `EuiNotificationEvent`. We recommend copying the component
to your application if necessary
([#7122](https://github.com/elastic/eui/pull/7122))
**Breaking changes**
- Renamed `EuiDescriptionList`'s `gutterSize` prop to `rowGutterSize`
([#7062](https://github.com/elastic/eui/pull/7062))
- `EuiDescriptionList`'s `rowGutterSize` prop now defaults to a size of
`s` (was previously `m`)
([#7062](https://github.com/elastic/eui/pull/7062))
**Accessibility**
- Fixed the dark mode colors of inline `EuiDescriptionListTitle`s to
meet WCAG color contrast requirements
([#7062](https://github.com/elastic/eui/pull/7062))
**CSS-in-JS conversions**
- Converted `EuiKeyPadMenuItem` to Emotion; Removed `$euiKeyPadMenuSize`
and `$euiKeyPadMenuMarginSize`
([#7118](https://github.com/elastic/eui/pull/7118))
---------
Co-authored-by: Cee Chen <constance.chen@elastic.co>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
Currently, if you try loading archive with index mappings not having
replica set into stateless ES, it won't work properly: you will get 503
error on calling `GET <index_name>/_stats`:
```
{
"error": {
"root_cause": [
{
"type": "no_shard_available_action_exception",
"reason": null
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "indices-stats",
"node": null,
"reason": {
"type": "no_shard_available_action_exception",
"reason": null
}
}
]
},
"status": 503
}
```
In stateless replica is
[required](https://elastic.slack.com/archives/C037J0RKRAN/p1690218904855299)
in order to perform search requests (the "search shard").
This PR updates index mappings in es_archives with
`"auto_expand_replicas": "0-1"`, in order to be compatible with
stateless ES and so that we can re-use existing data sets rather than
creating new ones.
I checked with Core Team that we should fine to just adapt all mapping
files, but let me know if that doesn't work for you.
The same value is used to create the "real" SO
[indices](c79c09c3d0/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/actions/constants.ts (L21))
in Kibana.
Closes https://github.com/elastic/kibana/issues/159675
## Summary
We have in lot of places, Tutorial link hardcoded to
`'/app/home#/tutorial/apm'`
This must change based on deployment type to be Serverless or Non
Serverless.
For Serverless the URL is - `'/app/apm/onboarding'`
For Non Serverless, the URL - `'/app/home#/tutorial/apm'`
Hence to avoid adding logic to read Serverless/Non Serverless mode in
all plugins and packages, i have implemented a redirect URL
`/app/apm/tutorial` inside the APM plugin which will read the Serverless
config and accordingly do the redirect.
## Summary
@gchaps and I met to review text on some APM UI pages. Outcomes:
1. Service **m**ap or Service **M**ap — there is inconsistency in the
APM UI with how we refer to Service maps. In some cases, we use title
case (Service Map). In others, we use sentence case (Service map). As
per the [EUI writing
guidelines](https://eui.elastic.co/#/guidelines/writing/guidelines#capitalization),
we should use title case for product features.
2. Storage **e**xplorer or Storage **E**xplorer — same story here. We
use title case sometimes and sentence case others. We should use title
case as this is a product feature.
3. Various text enhancements and changes.
## Summary
Why?
To simplify the process of migration to react-router@6.
https://github.com/remix-run/react-router/discussions/8753
What problems exactly it solves?
- In my previous PR I added `CompatRouter`
https://github.com/elastic/kibana/pull/159173, which caused changes in
~50 files and pinged 15 Teams. And this is just meant to be a temporary
change, so when we're done with the migration I would have to revert
these changes and engage everyone to review the PR again. And it is just
a single step in the migration strategy. So to make our lives easier I
think it would be better to have a common place where we do import our
router components because it will allow us to surface some extra logic
in single place instead of going through the whole source code again.
- `react-router@6` doesn't support a custom `Route` component, so that
means our custom `Route` component that we're using almost everywhere
today, will need to be replaced by a different solution. I have decided
to add `Routes` component, which will be responsible for rendering the
proper component (`react-router@6` renamed `Switch` to `Routes`, so I
have named this component to align with the dictionary of the new
router) and also is going to add the logic that today is done in `Route`
(moving logic to `Routes` will be done in the follow-up PR, here I just
wanted to focus on using the common router components to make the review
process easier)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Resolves https://github.com/elastic/kibana/issues/144887
## Summary
This PR adds an ESLint Plugin which checks specific `Eui` elements for
the existence of a `data-test-subj` prop. This rule will make having one
for these elements required.
This rule is currently only enabled for Observability apps (APM, Infra,
Observability, Synthetics, Uptime).
The plugin is also able to generate a suggestion based on the context in
which the element is used. In the IDE this suggestion can be applied by
using the autofix capability (see video below).
When opening a PR, the CI will automatically apply the suggestion to
qualifying Eui elements in the branch.
https://user-images.githubusercontent.com/535564/225449622-bbfccb40-fdd2-4f69-9d5a-7d5a97bf62e6.mov
## Why do this?
There is an increased push to move towards data driven feature
development. In order to facilitate this, we need to have an increased
focus on instrumenting user event generating elements in the Kibana
codebase. This linting rule is an attempt to nudge Kibana engineers to
not forget to add this property when writing frontend code. It also
saves a bit of work for engineers by suggesting a value for the
`data-test-subj` based on the location of the file in the codebase and
any potential default values that might be present in the JSX node tree.
Finally, because the suggestion is always of the same form, it can
increase the consistency in the values given to these elements.
## Shape of the suggestion
The suggestion for the value of data-test-subj is of the form:
`[app][componentName][intent][euiElementName]`.
For example, when working in a component in the location:
`x-pack/plugins/observability/public/pages/overview/containers/overview_page/header_actions.tsx`,
and having the code:
```
function HeaderActions() {
return (
<EuiButton>{i18n.translate('id', { defaultMessage: 'Submit Form' })}</EuiButton>
)
}
```
the suggestion becomes:
`data-test-subj=o11yHeaderActionsSubmitFormButton`.
For elements that don't take a `defaultMessage` prop / translation, the
suggestion takes the form: `[app][componentName][euiElementName]`
## Which elements are checked by the ESLint rule?
In its current iteration the rule checks these Eui elements:
* `EuiButton`
* `EuiButtonEmpty`
* `EuiLink`
* `EuiFieldText`
* `EuiFieldSearch`
* `EuiFieldNumber`
* `EuiSelect`
* `EuiRadioGroup`
* 'EuiTextArea`
## What types of prop setting does this rule support?
* `<EuiButton data-test-subj="foo">` (direct prop)
* `<EuiButton {...foo}>` (via spreaded object; rule checks for
`data-test-subj` key in object)
## What types of function declarations does this rule support?
* `function Foo(){}` (Named function)
* `const Foo = () => {}` (Arrow function assigned to variable)
* `const Foo = memo(() => {})` (Arrow function assigned to variable
wrapped in function)
* `const Foo = hoc(uponHoc(uponHoc(() => {})))` (Arrow function assigned
to variable wrapped in infinite levels of functions)
## Things to note
* If an element already has a value for `data-test-subj` the rule will
not kick in as any existing instrumentation might depend on the value.
* the auto suggestion is just a suggestion: the engineer can always
adjust the value for a `data-test-subj` before or after committing. Once
a value is present (autofixed or manually set) the rule will not kick
in.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dario Gieselaar <d.gieselaar@gmail.com>
Co-authored-by: Katerina Patticha <kate@kpatticha.com>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
Fixes https://github.com/elastic/kibana/issues/149344
This PR migrates all plugins to packages automatically. It does this
using `node scripts/lint_packages` to automatically migrate
`kibana.json` files to `kibana.jsonc` files. By doing this automatically
we can simplify many build and testing procedures to only support
packages, and not both "packages" and "synthetic packages" (basically
pointers to plugins).
The majority of changes are in operations related code, so we'll be
having operations review this before marking it ready for review. The
vast majority of the code owners are simply pinged because we deleted
all `kibana.json` files and replaced them with `kibana.jsonc` files, so
we plan on leaving the PR ready-for-review for about 24 hours before
merging (after feature freeze), assuming we don't have any blockers
(especially from @elastic/kibana-core since there are a few core
specific changes, though the majority were handled in #149370).
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This PR upgrades uuid into its latest version `9.0.0`.
The previous default used version `v4` was kept where it was previously
used and places using `v1` or `v5` are still using it.
In this latest version they removed the deep import feature and as we
are not using tree shaking it increased our bundles by a significant
size. As such, I've moved this dependency into the `ui-shared-deps-npm`
bundle.
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This PR implements a linter like the TS Project linter, except for
packages in the repo. It does this by extracting the reusable bits from
the TS Project linter and reusing them for the project linter. The only
rule that exists for packages right now is that the "name" in the
package.json file matches the "id" in Kibana.jsonc. The goal is to use a
rule to migrate kibana.json files on the future.
Additionally, a new rule for validating the indentation of tsconfig.json
files was added.
Validating and fixing violations is what has triggered review by so many
teams, but we plan to treat those review requests as notifications of
the changes and not as blockers for merging.
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Dearest Reviewers 👋
I've been working on this branch with @mistic and @tylersmalley and
we're really confident in these changes. Additionally, this changes code
in nearly every package in the repo so we don't plan to wait for reviews
to get in before merging this. If you'd like to have a concern
addressed, please feel free to leave a review, but assuming that nobody
raises a blocker in the next 24 hours we plan to merge this EOD pacific
tomorrow, 12/22.
We'll be paying close attention to any issues this causes after merging
and work on getting those fixed ASAP. 🚀
---
The operations team is not confident that we'll have the time to achieve
what we originally set out to accomplish by moving to Bazel with the
time and resources we have available. We have also bought ourselves some
headroom with improvements to babel-register, optimizer caching, and
typescript project structure.
In order to make sure we deliver packages as quickly as possible (many
teams really want them), with a usable and familiar developer
experience, this PR removes Bazel for building packages in favor of
using the same JIT transpilation we use for plugins.
Additionally, packages now use `kbn_references` (again, just copying the
dx from plugins to packages).
Because of the complex relationships between packages/plugins and in
order to prepare ourselves for automatic dependency detection tools we
plan to use in the future, this PR also introduces a "TS Project Linter"
which will validate that every tsconfig.json file meets a few
requirements:
1. the chain of base config files extended by each config includes
`tsconfig.base.json` and not `tsconfig.json`
1. the `include` config is used, and not `files`
2. the `exclude` config includes `target/**/*`
3. the `outDir` compiler option is specified as `target/types`
1. none of these compiler options are specified: `declaration`,
`declarationMap`, `emitDeclarationOnly`, `skipLibCheck`, `target`,
`paths`
4. all references to other packages/plugins use their pkg id, ie:
```js
// valid
{
"kbn_references": ["@kbn/core"]
}
// not valid
{
"kbn_references": [{ "path": "../../../src/core/tsconfig.json" }]
}
```
5. only packages/plugins which are imported somewhere in the ts code are
listed in `kbn_references`
This linter is not only validating all of the tsconfig.json files, but
it also will fix these config files to deal with just about any
violation that can be produced. Just run `node scripts/ts_project_linter
--fix` locally to apply these fixes, or let CI take care of
automatically fixing things and pushing the changes to your PR.
> **Example:** [`64e93e5`
(#146212)](64e93e5806)
When I merged main into my PR it included a change which removed the
`@kbn/core-injected-metadata-browser` package. After resolving the
conflicts I missed a few tsconfig files which included references to the
now removed package. The TS Project Linter identified that these
references were removed from the code and pushed a change to the PR to
remove them from the tsconfig.json files.
## No bazel? Does that mean no packages??
Nope! We're still doing packages but we're pretty sure now that we won't
be using Bazel to accomplish the 'distributed caching' and 'change-based
tasks' portions of the packages project.
This PR actually makes packages much easier to work with and will be
followed up with the bundling benefits described by the original
packages RFC. Then we'll work on documentation and advocacy for using
packages for any and all new code.
We're pretty confident that implementing distributed caching and
change-based tasks will be necessary in the future, but because of
recent improvements in the repo we think we can live without them for
**at least** a year.
## Wait, there are still BUILD.bazel files in the repo
Yes, there are still three webpack bundles which are built by Bazel: the
`@kbn/ui-shared-deps-npm` DLL, `@kbn/ui-shared-deps-src` externals, and
the `@kbn/monaco` workers. These three webpack bundles are still created
during bootstrap and remotely cached using bazel. The next phase of this
project is to figure out how to get the package bundling features
described in the RFC with the current optimizer, and we expect these
bundles to go away then. Until then any package that is used in those
three bundles still needs to have a BUILD.bazel file so that they can be
referenced by the remaining webpack builds.
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* Updated EUI to version 67.1.2. Updated instaces of ButtonColor from EUI to EuiButtonColor.
* Updated to EuiCard instances that utilize the betaBadgeProps object to return an empty string instead of undefined when the label is unavailable
* Removed two instances of the deprecated internetExplorerOnly() mixin
* Updated two instances of the ButtonColor import to EuiButtonColor as is was renamed in PR #6150
* Updated snapshots in Jest Test Suite #1 to account for EuiButton and EuiCard Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiToolTipAnchor component that replaced the tooltip anchor styles
* Updated snapshots in Jest Test Suite #2 to account forEuiButton, EuiDescriptionList, EuiButtonIcon, and EuiBadge Emotion conversions.
* Updated snapshots in Jest Test Suite #3 to account for EuiDescriptionList, EuiButton, and EuiBadge Emotion conversions. Updated snapshots for EuiTooltip as if now contains the new EuiTooltipAnchor component that replaced the tooltop anchor styles
* Updated snapshots in Jest Test Suite #4 to account for EuiButton Emotion conversion.
* Updated snapshots in Jest Test Suite #5 to account for EuiButton Emotion conversion.
* Updated snapshots in Jest Test Suite #8 to account for EuiButtonIcon and EuiButton Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.
* Updated snapshots in Jest Test Suite #9 to account for EuiFlyout and EuiButton Emotion conversions.
* Updated snapshots in Jest Test Suite #10 to account for EuiButton, EuiBadge, EuiButtonIcon, and EuiCard Emotion conversions. Updated snapshots for EuiToolTtip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles
* Updated instances of EuiButtonIconColor to use EuiButtonIconProps['color'] as it was removed in PR #6150
* Updated tests that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors
* Updated snapshots in Jest Test Suite #1 to account for EuiButton and EuiCard Emotion conversions
* Added the EuiFlyout mixins and variables to Lens Sass file as EuiFlyout has been converted to Emotion and the Sass styles are no longer available in EUI
* Added the EuiCallOutTypes variable to Step Progress Sass file as EuiCallOut has been converted to Emotion and the Sass styles are no longer available in EUI
* Updated snapshots in Jest Test Suite #2 to account for recent Emotion conversions.
Updated snapshots in server_status.test.tsx to render EuiBadge before checking the snapshots to reduce the snapshot churn caused by Emotion.
Updated tests that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* Added imports for the added flyout mixin. Removed references to EuiCallOut mixin as the component has been converted to Emotion and is no longer available for use.
* Updated unit tests and snapshots in Jest Test Suite #10.
Updated snaphshots to account for EuiBadge, EuiDescriptionList, EuiFlyout, and EuiCard Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.
Updated tests that target EuiButton to simulate click events to target a generic button element to prevent undefined click event errors
* Updated unit tests in Jest Test Suite #11 that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors
* Updated unit tests in Jest Test Suite #12 by updating tests that target EuiButton to simulate click events. Instead, these tests now target a generic button element to prevent undefined click event errors
* Updated unit tests in Jest Test Suite #1 by updating tests that target EuiButton to simulate click events. Instead, these tests now target a generic button element to prevent undefined click event errors
* Updated unit tests in Jest Test Suite #2 by updating tests that use EuiButton to simulate click events. Instead, these test have been updated to target a button element to prevent undefined click event errors.
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Updated reference to mixins Sass file.
Updated snapshots for Jest Test Suite #5 to account for EuiButton Emotion conversion. Updated unit tests that target EuiButton to simulate click events. These tests have been updated to target a button element to prevent undefined click event errors
* Updated unit tests in Jest Test Suites 3, 7, 8, 13, and 14.
Updated snapshot to account for EuiButton Emotion conversion.
Updated tests that target EuiButton to simulate click events. These tests now target a generic button element to prevent undefined click event errors.
Updated a few snapshots by adding .render() before checking the snapshot. This will prevent large snapshots coming from recent Emotion conversions
* Updated snapshots in Jest Test Suite #10 to account for the recent EuiButton Emotion conversion
* Updated unit tests in Jest Test Suite #2 by editing tests that target EuiButton to simulate click events. These tests now target a button element in order to prevent undefinde click event errors
* Updated snapshots in Jest Test Suite #10 to account for EuiButton and EuiDescriptionList Emotion conversions
* Updated test cases in Jest Test Suites 3, 7, and 8. Updated snapshots to account for EuiButton and EuiPagination Emotion conversions.
Updated tests that target EuiButton to simulate click events. These tests now target a button element to prevent undefined click errors
* Updated test cases in Jest Test Suite 14. Updated snapshots to account for EuiButton Emotion conversion. Opted to use .render() when updating a few snapshots to reduce the large length of snapshots caused by Emotion
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Revised a change to betaBadgeProps to ensure that the label is available. If not, the value for the badge with be set to undefined.
* Resolved two linting errors
* Resolved two linting errors
* Updated Jest unit tests in various suites.
Updated snapshots to account for EuiButton Emotion conversion. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.
* Updated EuiFlyout in query_flyout.tsx to remove the onClick function from maskProps as it is no longer available. Updated this flyout to use ownFocus and not to close when the overlay mask is clicked.
* Removed the use of EuiButtonIconColor in favor of EuiButtonIconProps['color']
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Updated Cypress test looking for strict equality on EuiPaginationButton class names to match a substring of the Emotion generated class name
* Removed unneeded debugging code. Updated snapshots for various test suites to account for the recent EuiButton Emotion conversion
* Updated a few EuiButton, EuiButtonEmpty, and EuiText components that set the color as ghost. The ghost color mode has been deprecated as of PR #6150. These components now are wrapped in EuiThemeProvider with a dark colorMode to create the previous ghost color.
* Resolved TS error with EuiCard betaBadgeProps
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Remove references to now-removed EuiFlyout CSS classes/vars
* Remove now-removed euiBadge className references
- Convert directly to EuiBadge instead of using CSS
- Remove confusing and now-possibly-irrelevant CSS badge overrides - left/right icons are now set via JSX and not via flex-direction
* Pre-emptively fix various euiOverlayMask CSS overrides
- this data attr isn't technically in yet but will be once https://github.com/elastic/eui/pull/6289 merges
- at the very least this isn't breaking any more than it currently already is!
* Update to v67.1.3
* v67.1.4
* Resolved test failing test case in Security/Manage/Blocklist. The test did not remove focus from the last combo box in the form, which didn't allow the disbaled attribute to be removed from the flyout submit button. I've updated the mock file for Blocklist to return focus to the first form element in the flyout to allow the disabled attribute to be removed.
* Updated snapshots to account for the recent EuiText Emotion conversion
* Fix Log's custom tooltips relying on EuiTooltip classNames that no longer exist
* Fix Vega vis custom tooltips relying on EuiTooltip classNames that no longer exist
- this one is trickier than Log's as it's not using React, so we need to use Emotion's Global to set a static className
* Convert remaining vega_vis.scss to Emotion
- as an example of how other global + non global styles could be handled in the future
* Fix references to removed `euiPaginationButton-isActive` className
- use aria-current attribute instead
* Added missing EuiFlyoutAnimation keyframes for EuiFlyout. This resolved test that failed because they used onAnimationEnd because the FlyoutAnimation could not be found.
* Reolved Jest Tests in suites 1 and 5. Updated snapshots to account for the recent EuiButton Emotion conversion. Updated snapshots for EuiToolTip as it now contains the new EuiToolTipAnchor component that replaced the tooltip anchor styles.
* iterate on rules_list.test.tsx
* bump eui to v67.1.5
* Updatde snapshots for jest test suites to account for the recent EuiButton, EuiOverlayMask, EuiTooltip, and EuiBadge Emotion conversions
* Resolved failing security test by updating the target element for CONNECTOR_TITLE. EuiCard has recently been converted to Emotion and the card title is no longer wrapper in a span.
* Resolved failing test case in Runtime Fields. The modify runtime field test was failing because the combobox responsbible for adding and updating scripts was not appearing. The textbox did not appear because the shared setFieldScript function targets and toggles the script textbox when opening the flyout. When a runtime field is being modified, the toggle is already active and using the shared function will trigger the toggle again (losing access to the script textbox).
Also resolved an issue that prevented the warning EuiCallout to appear when changing the type of a runtime field from its original type. Resolved this by adding an enter keypress at the end of setFieldType function to confirm the type selection, thus triggering the EuiCallout
* Resolved two tests that were failing in Lens. These test were failing because they were checking for equality in class names that no longer exist within EuiButtonGroup as it was recently converted to Emotion. These tests were updated to check for a substring of the new and longer class name
* Quick fix in test case failing because of misspelling in data-test-sub
* Updated snapshot for Jest test case as EuiButton as recently been converted to Emotion
* Removed console.log statement. Oops!
* Resolved a failing test case in Lens. They were failing because they were checking for equality in class names that no longer exist within EuiButtonGroup as it was recently converted to Emotion. These tests were updated to check for a substring of the new and longer class name.
Updated a Security test case by giving a target button the data-test-subj attribute for easier querying
* Removed reference to EuiFlyout mixin as it has been converted to Emotion. Updated the reference to an interal copy of EuiFlyout styles
* Corrected spelling error in EuiFlyout animation in Lens app
* Update EUI with latest backport
* Update button snapshots
* fix another button snapshot
* More snapshot fixes
* [EuiButton][Security] Fix button relying on now-removed `euiButton__text` CSS
- replace removed CSS with `eui-textTruncate` util instead
- combine/DRY out unnecessary span - was affecting min-width of truncation util
+ increase screenshot diff limit - this was smaller than updating the actual baseline screenshots for whatever reason (likely render diff between local and CI)
* Fix remaining Jest tests affected by Emotion conversions
- because Emotion creates its own wrapper, `.first()` can no longer be used - prefer `.last()` instead
* Fix Jest test affected by EuiButton Emotion conversion + removed modifier class
- targeting the native DOM node + filtering by disabled true/false gets us back to the 'correct' lengths
* Fix + improve flyout test
- `.last()` changes to account for EuiButton Emotion conversion is needed, but the last onClose assertion still fails due to us having modified inputs, and the confirm modal being displayed
- split test into two separate tests - one testing the onClose call, and the other testing the confirm modal
* derpin
* Skip rules_list Jest suite
* Update new EuiButton snapshot
* Upgraded EUI version to 67.1.7
* [EuiCard] Update snapshots
* [EuiPopover] Update snapshots
* [QA] Fix missing Vega warn/error message colors
;_;
* [CI] Auto-commit changed files from 'node scripts/generate codeowners'
* Fix Lens kbnToolbarButton regressions
- Caused by flattening of EUI button CSS specificity
- background-color was previously relying on isDisabled CSS specificity to override its #fff color
- `text` color modifier & `!important` is no longer needed and overrides Emotion CSS flatly
- isDisabled class is no longer needed - euiButton no longer sets `pointer-events: none` on disabled buttons (fixes tooltip bug in webkit as well)
* Backport EUI 67.1.8 fixes
* Update EuiCard snapshots
* Fix EuiModal form wrapper causing overflow issues
- see https://elastic.github.io/eui/#/layout/modal#forms-in-a-modal
* Workaround for `.kbnOverlayMountWrapper` mount point causing overflow issues
- not sure what all is using this modal service to be honest, but the wrapper is causing issues with the modal layout, this fixes overflow issues but will not fix any mask-image issues as a result
* more snapshot updates
* EuiButton - added textProps to EuiButton to prevent very long button names from spilling over outside of the container
* EuiButton - Update EuiButton related snapshots. Updated tests that target EuiButton directly to use a data-telementary-id for more specific element querying required by Emotion
* QA - Removed unnecessary comment in code
* Temporary fix for EuiCard[selectable][layout=horizontal] instances on security solutions' rule page
* Temporary fix for EuiCard[selectable][layout=horizontal] instances on osquery live query and canvas's datasource selector
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* Fix CSS specificity, where canvas's solutionToolbarButton's background-color now takes precedence over EuiButton's primary styles
* Removed update to search_marker_tooltip that removed the euiTooltip styles and replaced then with Emotion styling. Added EuiTooltip Sass styles for the component to rely on to test for a styling bug that is causing the tooltip and the tooltip arrow to be out of sync with each other.
* Lint Sass file
* Lint Sass file
* Removed overflow:hidden style from .vgaVis_view as it was causing euiScrollStyles not to present the scroll bars in Vega Vis
* Remove typo from EuiButton textProps object. 'className' should not have been included in the actual class name
* Revert tooltip Sass
This reverts commit 20e6ead571, a5cd2de901, and c605cbd7b9
* Fix Emotion tooltip arrows
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@elastic.co>
* Use ux dynamic data view in visitor breakdown
* Add default time field to data view
* Fix types and unit tests
* Memoize filter values to prevent lens re-rendering
* Fix unit tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Bumping EUI to version 64.0.1.
* Updating snapshot tests for two directories.
* Deprecate basic usages of getBreakpoint
- in favor of useCurrentEuiBreakpoint
* [Fleet] Deprecate isWithinMaxBreakpoint
- in favor of hook
* [DataViz] Update DataVisualizerTable to use window breakpoint vs table resize observer
- since getBreakpoint is now deprecated, we're only looking at the current EUI breakpoint (based off window width)
* [KibanaThemeProvider] Allow apps to modify the default EUI theme
- Setup for custom xl+ breakpoint sizes used by APM and Synthetics
* [APM] Update useBreakpoints hook with EUI breakpoint deprecations
- since getBreakpoint is no longer an usable util
- EUI's new breakpoint hooks already use/debounce window resize events, so we now get to skip all that custom logic by simply making custom EUI breakpoint overrides and using EUI breakpoint hooks
- remove returned `breakpoint` and `width` keys - they weren't actually being used anywhere in APM that I could see and were causing type errors.
- If someone wants to access them, they can use `useCurrentEuiBreakpoint` and `useWindowSize` individually instead
* [UX] Update useBreakpoints hook copied from APM
- basically the exact same logic, they just also need the xxl and xxxl breakpoints
* [Synthetics] Remove `useBreakpoints` in favor of new EUI breakpoint hooks
+ add xxl and xxxl breakpoints to Synthetics EUI themes
- `useBreakpoints`: - as far as I can tell, all attached APIs are basically the same APIs that EUI provides OOTB:
- up -> `useIsWithinMinBreakpoint`
- down -> `useIsWithinMaxBreakpoint`
- between -> `useIsWithinBreakpoints`
- debouncedWidth - not used, but could just use `useWindowSize` directly instead
- note: i'm confused by the `xl` override/conflation with `xxl`, but left the default xl breakpoint size as-is and assumed that all usage instances of 'xl' actually wanted 'xxl'
* v64.0.2 - add missing backports and several new fixes
* v64.0.3
* Fix type error from breakpoint deprecation
- functionally doesn't matter since the array doesn't include undefined, so basically just silence TS complaining about it
* Updating additional snapshots after bump to EUI 64.0.3
* Adding RUM Jest snapshot update.
* Adding Timeout to Fleet token generation test.
* Revert "[DataViz] Update DataVisualizerTable to use window breakpoint vs table resize observer"
This reverts commit 4e60ce281d.
* [DataViz] Remove getBreakpoint usage
- by replacing the breakpoint logic/switch with custom breakpoint sizes and names
- since the table size can be within panels that don't match `window.innerWidth`, we can't use EUI's breakpoint utils here
* Restoring a needed hook for breakpoints.
* Fix broken side navs on uptime/apm/ux/synthetics
- because of their new custom xxl/xxxl breakpoints, the `isLargerBreakpoint` logic was broken on the shared solution nav. switching to a min breakpoint bound fixes the issue and futureproofs the solution nav for all apps that add larger breakpoints than xl
* Fix snapshots/unit tests from previous commits
* Bumping EUI to 64.0.4 backport.
* [PR feedback] Separate DataVisualizerTable more clearly from EUI breakpoints
- per discussion with Quynh and Walter, there's some confusion around the breakpoints that the table is using. Since the table is width is not always the width of the browser window, it cannot use EUI's breakpoint hooks, and should instead use its own custom map of table-specific breakpoints to make that separation clearer
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Update all usages of EuiPageTemplate to EuiPageTemplate_Deprecated
* EuiPageContent_Deprecated as EuiPageContent
* EuiPageContentBody_Deprecated as EuiPageContentBody
* EuiPageContentHeader_Deprecated as EuiPageContentHeader
* EuiPageContentHeaderSection_Deprecated as EuiPageContentHeaderSection
* EuiPageSideBar_Deprecated as EuiPageSideBar
* EuiPageContent__Deprecated to EuiPageContent_Deprecated
* Fix rogue semi-colons
* WIP: NoDataConfigPage & NoDataPage converted to new template
- `withSolutionNav` not yet handled
* WIP: KibanaPageTemplateInner converted to use new template
- Pushes existing `pageHeader` prompts onto created EuiPageTemplate.PageHeader
- Uses `isEmptyState` to push `pageHeader` props to EuiPageTemplate.EmptyPrompt instead (if `children` are not supplied)
* WIP: `withSolutionNav` now renders the sidebar content properly
- Collapsing isn’t working (minWidth isn’t updating)
* Fixing stickiness of sidebar
* [Security] Fixed SecuritySolutionTemplateWrapper’s usage
- Moved `bottomBar` to EuiPageTemplate.BottomBar (now contained in just the page contents)
- Change EuiPanel children wrapper with EuiPageTemplate.Section
* [O11y] Wrap `children` with EuiPageTemplate.Section
* Fix getting_started usage
* WIP: Fixing types
* Removing `template` pass through
* Set EUI to 63.0.0
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* More import fixes
* Sidebar component update
* Expand `KibanaPageTemplate` to all namespaced EUI counterparts
- Updated `docs/tutorials` mdx page
- Fixed SolutionNav prop types
* Updated the tutorial mdx page
* [Stack Management] Updated app layout to new template
- Some temporary props applied for BWC until all other pages can be converted
- Converted `API Keys` page’s layout (and especially prompt usags) to new paradigm
* Fix circular dep
* Fix new circular dependency
- copying and pasting types from KibanaPageTemplateProps, but ah well
* [Security Solution] Remove `template` prop - no longer a prop on Kibana/EuiPageTemplate
* [O11y] Allow customizing EuiPageTemplate.Section wrapper
- converts pageBodyProps
- fixes non-centered loading template
* [Enterprise Search] Update page templates
- fix layouts by auto-wrapping an EuiPageSection for padding, while adding a `customPageSections` prop for more custom sections/layouts
- re-center 404 errors
- update tests
* Update KibanaPageTemplate tests
* Update snapshots
* Fix FTR test with removed EUI classNames
* Fix FTR tests with changed kbn classNames
* Update failing dashboard snapshots
- drop shadow changed slightly in EUI
* Fix failing Security Cypress test
* [O11y] Fix Inventory page using deprecated CSS hooks
* [O11y][Uptime] Fix missing bottom bars
- Modifies ObservabilityPageTemplate to accept a `bottomBar` prop (a la the old EuiPageTemplate behavior)
NOTE: This opinionated page layout structure is starting to feel like it could be potentially limiting / have all the same pitfalls the previous EuiPageTemplate did. If so, consider something closer to the Enterprise Search page template conversion (`customPageSections`).
- Misc cleanup: Use `KibanaPageTemplate` over `EuiPageTemplate`
* [O11y] Fix route template typing
- Since theObservabilityPageTemplate is using the new Eui/KibanaPageTemplate, its child templates and types need to be updated accordingly
* Fix broken minWidth behavior
- was an EUI issue that required a patch release
+ update snapshots
* [Security Solution] Type fixes, restore empty state
- Fix empty state logic removed in a previous commit
- bogarts KibanaPageTemplate's `isEmptyState` prop instead of using `template="noData"`
- extend template wrappers to past ...rest to underlying Kibana/EuiPageTemplate
+ replace EuiPageTemplate with KibanaPageTemplate for consistency
* Fix failing synthetics selector
* Grab EUI v63.0.6
- for deprecation tags and section tag support
* Fix Kibana Overview plugin layout
- needs to use KibanaPageTemplate.Section to get padding back
- use `bottomBorder` prop over horizontal rules
- restore previous page color via panelled=false
* Convert Home plugin to new KibanaPageTemplate
- use KibanaPageTemplate.Section instead to preserve page width/paddings
- use `bottomBorder` instead of `EuiHorizontalRule`
- NOTE: This causes margins to decrease slightly from xxl to xl (largest padding available for EuiPageSection) - this can be restored by CSS overrides if desired
- update CSS to preserve previous looks, + convert to logical properties
* [O11y] Fix non-centered empty/loading states
* [O11y] Restore subdued background on various empty state prompts
* [O11y] Fix all instances of views that require a scrollable full-height child
+ restore comment for inventory view
* [O11y][ux] Fix broken sidebar
- The entire app was missing a wrapping EuiProvider, and as such breakpoint utils were not working, and the sidebar was missing
+ misc cleanup
- remove unnecessary fragment
- remove role="main" attr - now that EuiPageTemplate sets a `main` tag, they'll conflict
- add isEmptyState to center loading component
* [APM Cypress tests] harden flaky test
* [APM Cypress tests] Fix failing Cypress test, again
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* [Lens] Introduce separate dimension groups for mosaic rows and columns
* swap labels
* fix nits
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
* eui to v62.2.0
* i18n updates
* EuiDescriptionListProps imports
* eui to v62.2.1
* euitoast selector updates
* more EuiDescriptionListProps imports
* eui to v62.2.2
* snapshot updates
* snapshot updates
* toast selector updates
* more snapshot updates
* toast selector
* TRIAL: timeout for loading spinner
* do not assume a popover is closed before attempting to open it again
* Revert "do not assume a popover is closed before attempting to open it again"
This reverts commit 1b231657cb.
* remove wait
* eui to v62.2.3
* Fixx fleet unit test
* eui to v62.2.4
* snapshot updates
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
* Upgrade to v62.0.3
* Update EUI i18n tokens
* Update html string snapshots
- Emotion CSS hash changed
* [EuiIcon] Update instances of `keyboardShortcut` icons to `keyboard`
* [EuiErrorBoundary] Update snapshots from Emotion conversion
* [EuiImage] Update snapshots, tests, and CSS to account for Emotion conversion
* [EuiImage][RTL] Fix test failures caused by EuiImage changes
* [EuiCommentList] Deprecate EuiCommentProps.type
* [EuiCommentList] Rename `timelineIcon` prop to `timelineAvatar`
- see https://github.com/elastic/eui/pull/6071
* [EuiCommentList] Fix selectors deprecated by Emotion conversion
* [EuiPopover][EuiCommentEvent][Enzyme] Fix mounted test failures caused by Emotion conversions
- Mounting displays the Emotion wrapper with the data-test-subj on them - we need to specify the output div renders in order for text assertions to be correct
* [EuiPopover] Deprecate `initialFocus={false}` as an option
see https://github.com/elastic/eui/pull/6044
* [EuiPopover] Rename `display=inlineBlock` to `inline-block`
- see https://github.com/elastic/eui/pull/5977
* [EuiPopover] Update snapshots from Emotion conversion
* [EuiPopover] Replace deprecated `.euiPopover__panel-isOpen` class with new `[data-popover-open]` attribute
* [EuiPopover][RTL] Fix test failures caused by not waiting for EuiPopover animation/transition
* Skip failing a11y tests
- test w/ similar error already skipped in another test above
- requires closing the popover for next test to pass
- not sure why delete action is no longer available
* Fix failing Security Cypress tests
* Attempt to squash flaky FTR tests around Add Filter popover
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jonathan Budzenski <jon@elastic.co>