`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> |
||
---|---|---|
.. | ||
analytics | ||
content-management | ||
core | ||
deeplinks | ||
default-nav | ||
home | ||
kbn-ace | ||
kbn-alerts-as-data-utils | ||
kbn-alerts-ui-shared | ||
kbn-ambient-common-types | ||
kbn-ambient-ftr-types | ||
kbn-ambient-storybook-types | ||
kbn-ambient-ui-types | ||
kbn-analytics | ||
kbn-apm-config-loader | ||
kbn-apm-synthtrace | ||
kbn-apm-synthtrace-client | ||
kbn-apm-utils | ||
kbn-axe-config | ||
kbn-babel-preset | ||
kbn-babel-register | ||
kbn-babel-transform | ||
kbn-bazel-runner | ||
kbn-cases-components | ||
kbn-cell-actions | ||
kbn-chart-icons | ||
kbn-check-mappings-update-cli | ||
kbn-ci-stats-core | ||
kbn-ci-stats-performance-metrics | ||
kbn-ci-stats-reporter | ||
kbn-ci-stats-shipper-cli | ||
kbn-cli-dev-mode | ||
kbn-coloring | ||
kbn-config | ||
kbn-config-mocks | ||
kbn-config-schema | ||
kbn-content-management-utils | ||
kbn-crypto | ||
kbn-crypto-browser | ||
kbn-cypress-config | ||
kbn-data-service | ||
kbn-datemath | ||
kbn-dev-cli-errors | ||
kbn-dev-cli-runner | ||
kbn-dev-proc-runner | ||
kbn-dev-utils | ||
kbn-discover-utils | ||
kbn-doc-links | ||
kbn-docs-utils | ||
kbn-dom-drag-drop | ||
kbn-ebt-tools | ||
kbn-ecs | ||
kbn-es | ||
kbn-es-archiver | ||
kbn-es-errors | ||
kbn-es-query | ||
kbn-es-types | ||
kbn-eslint-config | ||
kbn-eslint-plugin-disable | ||
kbn-eslint-plugin-eslint | ||
kbn-eslint-plugin-imports | ||
kbn-eslint-plugin-telemetry | ||
kbn-event-annotation-common | ||
kbn-event-annotation-components | ||
kbn-expandable-flyout | ||
kbn-expect | ||
kbn-failed-test-reporter-cli | ||
kbn-field-types | ||
kbn-find-used-node-modules | ||
kbn-flot-charts | ||
kbn-ftr-common-functional-services | ||
kbn-ftr-screenshot-filename | ||
kbn-generate | ||
kbn-generate-console-definitions | ||
kbn-generate-csv | ||
kbn-generate-csv-types | ||
kbn-get-repo-files | ||
kbn-guided-onboarding | ||
kbn-handlebars | ||
kbn-hapi-mocks | ||
kbn-health-gateway-server | ||
kbn-i18n | ||
kbn-i18n-react | ||
kbn-import-locator | ||
kbn-import-resolver | ||
kbn-interpreter | ||
kbn-io-ts-utils | ||
kbn-jest-serializers | ||
kbn-journeys | ||
kbn-json-ast | ||
kbn-kibana-manifest-schema | ||
kbn-language-documentation-popover | ||
kbn-lens-embeddable-utils | ||
kbn-lint-packages-cli | ||
kbn-lint-ts-projects-cli | ||
kbn-logging | ||
kbn-logging-mocks | ||
kbn-managed-vscode-config | ||
kbn-managed-vscode-config-cli | ||
kbn-management | ||
kbn-mapbox-gl | ||
kbn-monaco | ||
kbn-object-versioning | ||
kbn-optimizer | ||
kbn-optimizer-webpack-helpers | ||
kbn-osquery-io-ts-types | ||
kbn-peggy | ||
kbn-peggy-loader | ||
kbn-performance-testing-dataset-extractor | ||
kbn-picomatcher | ||
kbn-plugin-generator | ||
kbn-plugin-helpers | ||
kbn-react-field | ||
kbn-repo-file-maps | ||
kbn-repo-info | ||
kbn-repo-linter | ||
kbn-repo-packages | ||
kbn-repo-path | ||
kbn-repo-source-classifier | ||
kbn-repo-source-classifier-cli | ||
kbn-reporting/common | ||
kbn-rison | ||
kbn-rrule | ||
kbn-rule-data-utils | ||
kbn-safer-lodash-set | ||
kbn-saved-objects-settings | ||
kbn-search-api-panels | ||
kbn-search-response-warnings | ||
kbn-securitysolution-autocomplete | ||
kbn-securitysolution-ecs | ||
kbn-securitysolution-es-utils | ||
kbn-securitysolution-exception-list-components | ||
kbn-securitysolution-grouping | ||
kbn-securitysolution-hook-utils | ||
kbn-securitysolution-io-ts-alerting-types | ||
kbn-securitysolution-io-ts-list-types | ||
kbn-securitysolution-io-ts-types | ||
kbn-securitysolution-io-ts-utils | ||
kbn-securitysolution-list-api | ||
kbn-securitysolution-list-constants | ||
kbn-securitysolution-list-hooks | ||
kbn-securitysolution-list-utils | ||
kbn-securitysolution-rules | ||
kbn-securitysolution-t-grid | ||
kbn-securitysolution-utils | ||
kbn-server-http-tools | ||
kbn-server-route-repository | ||
kbn-set-map | ||
kbn-shared-svg | ||
kbn-shared-ux-utility | ||
kbn-some-dev-log | ||
kbn-sort-package-json | ||
kbn-spec-to-console | ||
kbn-std | ||
kbn-stdio-dev-helpers | ||
kbn-storybook | ||
kbn-telemetry-tools | ||
kbn-test | ||
kbn-test-jest-helpers | ||
kbn-test-subj-selector | ||
kbn-text-based-editor | ||
kbn-timelion-grammar | ||
kbn-tinymath | ||
kbn-tooling-log | ||
kbn-ts-projects | ||
kbn-ts-type-check-cli | ||
kbn-typed-react-router-config | ||
kbn-ui-actions-browser | ||
kbn-ui-framework | ||
kbn-ui-shared-deps-npm | ||
kbn-ui-shared-deps-src | ||
kbn-ui-theme | ||
kbn-unified-field-list | ||
kbn-url-state | ||
kbn-use-tracked-promise | ||
kbn-user-profile-components | ||
kbn-utility-types | ||
kbn-utility-types-jest | ||
kbn-utils | ||
kbn-validate-next-docs-cli | ||
kbn-visualization-ui-components | ||
kbn-web-worker-stub | ||
kbn-whereis-pkg-cli | ||
kbn-yarn-lock-validator | ||
react | ||
serverless | ||
shared-ux | ||
README.md |
Kibana-related packages
This folder contains packages that are intended for use in Kibana and Kibana plugins.
tl;dr:
- Don't publish to npm registry
- Always use the
@kbn
namespace - Always set
"private": true
inpackage.json
Using these packages
We no longer publish these packages to the npm registry. Now, instead of specifying a version when including these packages, we rely on yarn workspaces, which sets up a symlink to the package.
For example if you want to use the @kbn/i18n
package in Kibana itself, you
can specify the dependency like this:
"@kbn/i18n": "1.0.0"
However, if you want to use this from a Kibana plugin, you need to use a link:
dependency and account for the relative location of the Kibana repo, so it would
instead be:
"@kbn/i18n": "link:../../kibana/packages/kbn-i18n"
then run yarn kbn bootstrap
from the plugin directory.
Creating a new package
Run the following command from the root of the Kibana repo:
node scripts/generate package @kbn/<PACKAGE_NAME> --web --owner @elastic/<TEAM_NAME>
Unit tests for a package
Currently there is only one tool being used in order to test packages which is Jest. Below we will explain how it should be done.
Jest
A package should follow the pattern of having .test.js
files as siblings of the source code files, and these run by Jest.
A package using the .test.js
naming convention will have those tests automatically picked up by Jest and run by the unit test runner, currently mapped to the Kibana test
script in the root package.json
.
yarn test
runs all unit tests.yarn jest
runs all Jest tests in Kibana.
In order for the plugin or package to use Jest, a jest.config.js file must be present in it's root. However, there are safeguards for this in CI should a test file be added without a corresponding config file.
Each package can also specify its own test
script in the package's package.json
, for cases where you'd prefer to run the tests from the local package directory.