Commit graph

7 commits

Author SHA1 Message Date
Cee Chen
7357af5c1b
Upgrade EUI to v91.3.1 (#173569)
`v91.0.0-backport.0``v91.3.1`

⚠️ The largest set of changes in this PR that touch source code (as
opposed to test code) are related to several **EuiDataGrid** redesigns,
particularly around the toolbar, column cell headers, and cell actions.
We **strongly** recommend QAing your EuiDataGrid usages, **especially**
if you have custom CSS styling on data grid cells.

| Changes | Screencap |
|--------|--------|
| Cell actions and popover | <img
src="6462d983-307f-4a3c-84b1-36d9b276c9a0"
width="240" alt=""> |
| Column headers | <img
src="3fd64a15-829a-48f3-9dba-9dae3c73e6b2"
alt="" width="360"> |
| Toolbar | <img
src="f876f6d7-635d-497a-b1e7-9daf4e6fd3e3"
alt="" width="240"> |

---

## [`v91.3.1`](https://github.com/elastic/eui/releases/v91.3.1)

**Bug fixes**

- Moved `EuiDataGrid`'s header cells' `dataGridHeaderCellActionButton`
test subject attribute from to the clickable button, for easier E2E
testing ([#7427](https://github.com/elastic/eui/pull/7427))
- Fixed `EuiBasicTable`/`EuiInMemoryTable` actions to correctly show as
disabled when rows are being selected
([#7428](https://github.com/elastic/eui/pull/7428))

## [`v91.3.0`](https://github.com/elastic/eui/releases/v91.3.0)

- Added `esqlVis`, `pipeBreaks`, and `pipeNoBreaks` icon glyphs.
([#7399](https://github.com/elastic/eui/pull/7399))
- Updated `EuiDataGridSchemaDetector`'s comparator arguments to include
entry indexes ([#7406](https://github.com/elastic/eui/pull/7406))

## [`v91.2.0`](https://github.com/elastic/eui/releases/v91.2.0)

- Added `endpoint` glyph to `EuiIcon`
([#7383](https://github.com/elastic/eui/pull/7383))

**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))

## [`v91.1.0`](https://github.com/elastic/eui/releases/tag/v91.1.0)

- Updated `EuiDataGrid` cell actions to display above cells instead of
within them, to avoid content clipping issues
([#7343](https://github.com/elastic/eui/pull/7343))
- Updated `EuiDataGrid` cell expansion popovers to sit on top of cells
instead of below/next to them
([#7343](https://github.com/elastic/eui/pull/7343))
- Updated `EuiListGroupItem` to render an external icon and screen
reader affordance for links with `target` set to to `_blank`
([#7352](https://github.com/elastic/eui/pull/7352))
- Updated `EuiListGroupItem` with a new `external` prop, which allows
enabling or disabling the new external link icon
([#7352](https://github.com/elastic/eui/pull/7352))
- Updated `EuiText` to no longer set any opinionated styles on child
`<img>` tags - use `EuiImage` for image display within text instead
([#7360](https://github.com/elastic/eui/pull/7360))
- Improved `EuiBasicTable`/`EuiInMemoryTable`s mobile UI for custom
actions ([#7361](https://github.com/elastic/eui/pull/7361))
- Added a new `EuiDataGridToolbarControl` subcomponent, which is useful
for rendering your own custom `EuiDataGrid` toolbar buttons while
matching the look of the default controls
([#7369](https://github.com/elastic/eui/pull/7369))
- Updated `EuiDataGrid`'s toolbar controls to show active/current counts
in badges, and updated the Columns button icon
([#7369](https://github.com/elastic/eui/pull/7369))
- Updated `EuiButtonEmpty` to allow passing `false` to `textProps`,
which allows rendering custom button content without an extra text
wrapper ([#7369](https://github.com/elastic/eui/pull/7369))
- Updated `EuiDataGrid` column header cells to show the sort arrow after
the heading text, instead of before
([#7371](https://github.com/elastic/eui/pull/7371))
- Updated `EuiDataGrid`'s column header actions icon from a chevron to
`boxesVertical` ([#7371](https://github.com/elastic/eui/pull/7371))
- Updated the actions column in `EuiBasicTable` and `EuiInMemoryTable`s.
Alongside `name`, the `description`, `href`, and `data-test-subj`
properties now also accept an optional callback that the current `item`
will be passed to ([#7373](https://github.com/elastic/eui/pull/7373))
- Updated `EuiContextMenuItem` with a new `toolTipProps` prop
([#7373](https://github.com/elastic/eui/pull/7373))
- `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 incorrect `EuiPopover` positioning calculations when `hasArrow`
was set to false ([#7343](https://github.com/elastic/eui/pull/7343))
- Fixed `EuiSuperSelect` to render options with falsy values (false, 0,
and ''), but not nullish values (undefined or null)
([#7362](https://github.com/elastic/eui/pull/7362))
- Fixed `EuiSuperSelect`'s typing to allow non-string values (e.g.,
booleans or numbers) ([#7362](https://github.com/elastic/eui/pull/7362))
- Fixed `EuiDataGrid`'s numeric and currency column heading cells to be
correctly right-aligned
([#7371](https://github.com/elastic/eui/pull/7371))
- Fixed `EuiBasicTable` and `EuiInMemoryTable` actions not showing
tooltip descriptions when rendered in the all actions popover menu
([#7373](https://github.com/elastic/eui/pull/7373))
- Fixed missing underlines on `EuiContextMenu` link hover
([#7373](https://github.com/elastic/eui/pull/7373))
- Fixed visual text truncation of `EuiBreadcrumb`s with `popoverContent`
([#7375](https://github.com/elastic/eui/pull/7375))
- Fixed `EuiFormRow`s with `hasEmptyLabelSpace` being very slightly off
in vertical alignment
([#7380](https://github.com/elastic/eui/pull/7380))

**Deprecations**

- Deprecated `EuiContextMenuItem`'s `toolTipTitle` prop. Use
`toolTipProps.title` instead
([#7373](https://github.com/elastic/eui/pull/7373))
- Deprecated `EuiContextMenuItem`'s `toolTipPosition` prop. Use
`toolTipProps.position` instead
([#7373](https://github.com/elastic/eui/pull/7373))

**Accessibility**

- Fixed custom `EuiBasicTable`/`EuiInMemoryTable` rendering nested
interactive custom actions
([#7361](https://github.com/elastic/eui/pull/7361))
- Fixed `EuiBasicTable` and `EuiInMemoryTable` actions not correctly
reading out action descriptions to screen readers
([#7373](https://github.com/elastic/eui/pull/7373))
- Fixed `EuiBasicTable` and `EuiInMemoryTable` primary actions not
visibly appearing on keyboard focus
([#7373](https://github.com/elastic/eui/pull/7373))

---------

Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
2024-01-05 08:22:42 -08:00
Pierre Gayvallet
04b93f92cc
flag more packages without side effects (#173602)
## Summary

Follow-up of https://github.com/elastic/kibana/pull/173351

`-1.8MB` more on async chunks
2023-12-20 13:17:18 +01:00
renovate[bot]
1868489bb5
Update dependency @elastic/charts to v61 (main) (#170914)
[![Mend Renovate logo
banner](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) |
[`60.0.0` ->
`61.0.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/60.0.0/61.0.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@elastic%2fcharts/61.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@elastic%2fcharts/61.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@elastic%2fcharts/60.0.0/61.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@elastic%2fcharts/60.0.0/61.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v61.0.0`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#6100-2023-11-08)

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

##### Bug Fixes

- `onRenderChange` callback trigger on resize
([#&#8203;2228](https://togithub.com/elastic/elastic-charts/issues/2228))
([be30c1b](be30c1bd48))
- **axis:** always render `tickLine` unless `visible` is `false`
([#&#8203;2194](https://togithub.com/elastic/elastic-charts/issues/2194))
([ec95d50](ec95d50180))
- **BarSeries:** ignore histogram mode in determining stacked series
([#&#8203;2225](https://togithub.com/elastic/elastic-charts/issues/2225))
([27b4281](27b4281581))
- clamp brushing min of last bucket
([#&#8203;2227](https://togithub.com/elastic/elastic-charts/issues/2227))
([155c22d](155c22dee1))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to ^88.5.0
([#&#8203;2179](https://togithub.com/elastic/elastic-charts/issues/2179))
([2bb921e](2bb921e42b))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to ^88.5.4
([#&#8203;2190](https://togithub.com/elastic/elastic-charts/issues/2190))
([05b33e5](05b33e58f2))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to ^89.1.0
([#&#8203;2212](https://togithub.com/elastic/elastic-charts/issues/2212))
([a91f68d](a91f68d6b7))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v89
([#&#8203;2193](https://togithub.com/elastic/elastic-charts/issues/2193))
([132327d](132327d980))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v90
([#&#8203;2222](https://togithub.com/elastic/elastic-charts/issues/2222))
([10cd53b](10cd53b2e6))

##### chore

- reclaim charts theme ownership from eui
([#&#8203;2175](https://togithub.com/elastic/elastic-charts/issues/2175))
([422c7d5](422c7d529e))

##### Features

- **metric:** allow alpha colors and improve contrast logic
([#&#8203;2184](https://togithub.com/elastic/elastic-charts/issues/2184))
([dd5732e](dd5732e83b))

##### BREAKING CHANGES

- **BarSeries:** now ignores histogram mode in determining stacked
series
- elastic charts theme renamed to `LEGACY_DARK_THEME` and
`LEGACY_LIGHT_THEME` in favor of the main `DARK_THEME` and `LIGHT_THEME`
which was merged with eui theme overrides. These new themes are now
default.
- **axis:** Now respects `tickLine.padding` whenever `tickLine.visible`
is `true`

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy40Ni4wIiwidXBkYXRlZEluVmVyIjoiMzcuNDYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nickofthyme <nicholas.partridge@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-12-13 14:56:54 -05:00
Walter Rafelsberger
aae3e5d087
[ML] Rename index pattern references to data view (Part 2) (#171820)
- Renames references to index patterns to data views in function and
variable names.
- Some inconsistent naming of schemas for data frame analytics was
cleaned up as part of this PR.
- Note this doesn't cover the whole ml owned codebase but just code
related to data frame analytics.
2023-11-23 12:42:43 +01:00
Marta Bondyra
9e951f59ac
[Lens] passing locale to charts (#168571)
## Summary

<img width="973" alt="Screenshot 2023-10-17 at 11 13 20"
src="ff08efbe-dec7-4a45-ad25-17debb679864">

Passes `locale={i18n.getLocale()}` to <Settings/> Component for elastic
charts. For now it only matters for translating months, days etc in time
histogram chart, but I'd rather pass it everywhere in case if we
introduce some copy in the future.

Fixes https://github.com/elastic/kibana/issues/166240
2023-10-17 03:12:38 -07:00
Cee Chen
84ca85d0ef
Upgrade EUI to v87.1.0 (#163961)
`v86.0.0``v87.1.0`

⚠️ The biggest set of type changes in this PR come from the breaking
change that makes `pageSize` and `pageSizeOptions` now optional props
for `EuiBasicTable.pagination`, `EuiInMemoryTable.pagination` and
`EuiDataGrid.pagination`.

This caused several other components that were cloning EUI's pagination
type to start throwing type warnings about `pageSize` being optional.
Where I came across these errors, I modified the extended types to
require `pageSize`. These types and their usages may end up changing
again in any case once the Shared UX team looks into
https://github.com/elastic/kibana/issues/56406.

---

## [`87.1.0`](https://github.com/elastic/eui/tree/v87.1.0)

- Updated the underlying library powering `EuiAutoSizer`. This primarily
affects typing around the `disableHeight` and `disableWidth` props
([#6798](https://github.com/elastic/eui/pull/6798))
- Added new `EuiAutoSize`, `EuiAutoSizeHorizontal`, and
`EuiAutoSizeVertical` types to support `EuiAutoSizer`'s now-stricter
typing ([#6798](https://github.com/elastic/eui/pull/6798))
- Updated `EuiDatePickerRange` to support `compressed` display
([#7058](https://github.com/elastic/eui/pull/7058))
- Updated `EuiFlyoutBody` with a new `scrollableTabIndex` prop
([#7061](https://github.com/elastic/eui/pull/7061))
- Added a new `panelMinWidth` prop to `EuiInputPopover`
([#7071](https://github.com/elastic/eui/pull/7071))
- Added a new `inputPopoverProps` prop for `EuiRange`s and
`EuiDualRange`s with `showInput="inputWithPopover"` set
([#7082](https://github.com/elastic/eui/pull/7082))

**Bug fixes**

- Fixed `EuiToolTip` overriding instead of merging its
`aria-describedby` tooltip ID with any existing `aria-describedby`s
([#7055](https://github.com/elastic/eui/pull/7055))
- Fixed `EuiSuperDatePicker`'s `compressed` display
([#7058](https://github.com/elastic/eui/pull/7058))
- Fixed `EuiAccordion` to remove tabbable children from sequential
keyboard navigation when the accordion is closed
([#7064](https://github.com/elastic/eui/pull/7064))
- Fixed `EuiFlyout`s to accept custom `aria-describedby` IDs
([#7065](https://github.com/elastic/eui/pull/7065))

**Accessibility**

- Removed the default `dialog` role and `tabIndex` from push
`EuiFlyout`s. Push flyouts, compared to overlay flyouts, require manual
accessibility management.
([#7065](https://github.com/elastic/eui/pull/7065))

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

- Added beta `componentDefaults` prop to `EuiProvider`, which will allow
configuring certain default props globally. This list of components and
defaults is still under consideration.
([#6923](https://github.com/elastic/eui/pull/6923))
- `EuiPortal`'s `insert` prop can now be configured globally via
`EuiProvider.componentDefaults`
([#6941](https://github.com/elastic/eui/pull/6941))
- `EuiFocusTrap`'s `crossFrame` and `gapMode` props can now be
configured globally via `EuiProvider.componentDefaults`
([#6942](https://github.com/elastic/eui/pull/6942))
- `EuiTablePagination`'s `itemsPerPage`, `itemsPerPageOptions`, and
`showPerPageOptions` props can now be configured globally via
`EuiProvider.componentDefaults`
([#6951](https://github.com/elastic/eui/pull/6951))
- `EuiBasicTable`, `EuiInMemoryTable`, and `EuiDataGrid` now allow
`pagination.pageSize` to be undefined. If undefined, `pageSize` defaults
to `EuiTablePagination`'s `itemsPerPage` component default.
([#6993](https://github.com/elastic/eui/pull/6993))
- `EuiBasicTable`, `EuiInMemoryTable`, and `EuiDataGrid`'s
`pagination.pageSizeOptions` will now fall back to
`EuiTablePagination`'s `itemsPerPageOptions` component default.
([#6993](https://github.com/elastic/eui/pull/6993))
- Updated `EuiHeaderLinks`'s `gutterSize` spacings
([#7005](https://github.com/elastic/eui/pull/7005))
- Updated `EuiHeaderAlert`'s stacking styles
([#7005](https://github.com/elastic/eui/pull/7005))
- Added `toolTipProps` to `EuiListGroupItem` that allows customizing
item tooltips. ([#7018](https://github.com/elastic/eui/pull/7018))
- Updated `EuiBreadcrumbs` to support breadcrumbs that toggle popovers
via `popoverContent` and `popoverProps`
([#7031](https://github.com/elastic/eui/pull/7031))
- Improved the contrast ratio of disabled titles within `EuiSteps` and
`EuiStepsHorizontal` to meet WCAG AA guidelines.
([#7032](https://github.com/elastic/eui/pull/7032))
- Updated `EuiSteps` and `EuiStepsHorizontal` to highlight and provide a
more clear visual indication of the current step
([#7048](https://github.com/elastic/eui/pull/7048))

**Bug fixes**

- Single uses of `<EuiHeaderSectionItem side="right" />` now align right
as expected without needing a previous `side="left"` sibling.
([#7005](https://github.com/elastic/eui/pull/7005))
- `EuiPageTemplate` now correctly displays `panelled={true}`
([#7044](https://github.com/elastic/eui/pull/7044))

**Breaking changes**

- `EuiTablePagination`'s default `itemsPerPage` is now `10` (was
previously `50`). This can be configured through
`EuiProvider.componentDefaults`.
([#6993](https://github.com/elastic/eui/pull/6993))
- `EuiTablePagination`'s default `itemsPerPageOptions` is now `[10, 25,
50]` (was previously `[10, 20, 50, 100]`). This can be configured
through `EuiProvider.componentDefaults`.
([#6993](https://github.com/elastic/eui/pull/6993))
- Removed `border` prop from `EuiHeaderSectionItem` (unused since
Amsterdam theme) ([#7005](https://github.com/elastic/eui/pull/7005))
- Removed `borders` object configuration from `EuiHeader.sections`
([#7005](https://github.com/elastic/eui/pull/7005))

**CSS-in-JS conversions**

- Converted `EuiHeaderAlert` to Emotion; Removed unused
`.euiHeaderAlert__dismiss` CSS
([#7005](https://github.com/elastic/eui/pull/7005))
- Converted `EuiHeaderSection`, `EuiHeaderSectionItem`, and
`EuiHeaderSectionItemButton` to Emotion
([#7005](https://github.com/elastic/eui/pull/7005))
- Converted `EuiHeaderLinks` and `EuiHeaderLink` to Emotion; Removed
`$euiHeaderLinksGutterSizes` Sass variables
([#7005](https://github.com/elastic/eui/pull/7005))
- Removed `$euiHeaderBackgroundColor` Sass variable; use
`$euiColorEmptyShade` instead
([#7005](https://github.com/elastic/eui/pull/7005))
- Removed `$euiHeaderChildSize` Sass variable; use `$euiSizeXXL` instead
([#7005](https://github.com/elastic/eui/pull/7005))

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
2023-08-21 15:16:39 -07:00
Walter Rafelsberger
9492c932bd
[ML] Package @kbn/ml-data-grid (#155530)
Refactors outdated approach of sharing the custom data grid component
from the `ml` plugin to the `transform` plugin to use packages instead.

Creates the following packages:

- `@kbn/ml-data-grid`
- `@kbn/ml-date-utils`
- `@kbn/ml-runtime-field-utils`
----

- Imports have been refactored so the `transform` plugin no longer
imports code from packages `@kbn/ml-anomaly-utils` and
`@kbn/ml-data-frame-analytics-utils`.
- Removed again auto-generated `@type` related JSDoc comments. Within
the code those annotations are quite redundant, would be cumbersome to
maintain and they are not necessary to satisfy the "missing comments"
check.
- The `renderCellPopover` callback has been refactored out of the
`DataGrid` component and can now be passed in as an optional prop. It is
only used for Data Frame Analytics and this way we can avoid some
dependency of the transform plugin on DFA related code.
- Some more code has been moved to `@kbn/ml-anomaly-utils` to make
available via packages what's needed for the data grid.
2023-06-06 11:20:37 +02:00