Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade EUI to v87.1.0 #163961

Merged
merged 26 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d56687b
Upgrade EUI to v87.1.0
cee-chen Aug 15, 2023
1c34b60
i18n updates
cee-chen Aug 15, 2023
d579e22
[EuiHeader] Remove deprecated `border`/`borders` prop
cee-chen Aug 15, 2023
da3c80b
[EuiHeader] Remove deprecated Sass variables
cee-chen Aug 15, 2023
5a1e04a
[EuiHeader] Update snapshots
cee-chen Aug 15, 2023
97e79d3
[?] Update color picker snapshot
cee-chen Aug 15, 2023
fc7995c
[EuiHeaderSectionItemButton] Fix failing Jest tests
cee-chen Aug 15, 2023
7c08114
Fix type issues caused by now non-required Pagination `pageSize` prop…
cee-chen Aug 15, 2023
c6daf9b
Fix more type definitions to require `pageSize`
cee-chen Aug 15, 2023
abcf499
[triggers_actions_ui] Require `pageSize` and DRY out types
cee-chen Aug 15, 2023
36e9772
[kbn-securitysolution-exception-list-components] Require `pageSize` a…
cee-chen Aug 15, 2023
a19e6f1
Merge branch 'main' into eui-v87.1.x
kibanamachine Aug 16, 2023
b1ae046
[?] Fix failing AIOps FTR test
cee-chen Aug 16, 2023
baa08ce
Merge branch 'main' into eui-v87.1.x
kibanamachine Aug 16, 2023
e02a5b2
Merge branch 'main' into eui-v87.1.x
kibanamachine Aug 16, 2023
7b0e3a2
Merge branch 'main' into eui-v87.1.x
kibanamachine Aug 16, 2023
4ff641f
Merge branch 'main' into eui-v87.1.x
kibanamachine Aug 16, 2023
6792314
Merge branch 'main' into eui-v87.1.x
patrykkopycinski Aug 16, 2023
684f321
Merge branch 'main' into eui-v87.1.x
cee-chen Aug 21, 2023
d3b45ad
[PR feedback] Fix `EuiPageTemplate` panelled behavior
cee-chen Aug 21, 2023
33663cd
Merge branch 'main' into eui-v87.1.x
cee-chen Aug 21, 2023
8a2a436
Merge branch 'main' into eui-v87.1.x
cee-chen Aug 21, 2023
dee75ba
Update AIOps assertion again
cee-chen Aug 21, 2023
5b3ddfb
Merge branch 'main' into eui-v87.1.x
cee-chen Aug 21, 2023
98e6e42
Un-fix AIOps test
cee-chen Aug 21, 2023
eb3b4e3
Merge branch 'main' into eui-v87.1.x
cee-chen Aug 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.9.1-canary.1",
"@elastic/ems-client": "8.4.0",
"@elastic/eui": "86.0.0",
"@elastic/eui": "87.1.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ export function Header({
customBranding$={customBranding$}
/>,
],
borders: 'none',
},
{
...(observables.navControlsCenter$ && {
Expand All @@ -139,7 +138,6 @@ export function Header({
</EuiShowFor>,
],
}),
borders: 'none',
},
{
items: [
Expand All @@ -164,14 +162,13 @@ export function Header({
/>,
<HeaderNavControls navControls$={observables.navControlsRight$} />,
],
borders: 'none',
},
]}
/>

<EuiHeader position="fixed" className="header__secondBar">
<EuiHeaderSection grow={false}>
<EuiHeaderSectionItem border="right" className="header__toggleNavButtonSection">
<EuiHeaderSectionItem className="header__toggleNavButtonSection">
<CollapsibleNav
appId$={application.currentAppId$}
id={navId}
Expand Down Expand Up @@ -230,7 +227,7 @@ export function Header({
<HeaderBadge badge$={observables.badge$} />

<EuiHeaderSection side="right">
<EuiHeaderSectionItem border="none">
<EuiHeaderSectionItem>
<HeaderActionMenu mounter={headerActionMenuMounter} />
</EuiHeaderSectionItem>
</EuiHeaderSection>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.chrHeaderLogo {
display: flex;
align-items: center;
height: $euiHeaderChildSize;
height: $euiSizeXXL;
padding-inline: $euiSizeS;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface Props {
side?: 'left' | 'right';
}

export function HeaderNavControls({ navControls$, side }: Props) {
export function HeaderNavControls({ navControls$ }: Props) {
const navControls = useObservable(navControls$, []);

if (!navControls) {
Expand All @@ -30,10 +30,7 @@ export function HeaderNavControls({ navControls$, side }: Props) {
return (
<>
{navControls.map((navControl: ChromeNavControl, index: number) => (
<EuiHeaderSectionItem
key={index}
border={side ? (side === 'left' ? 'right' : 'left') : 'none'}
>
<EuiHeaderSectionItem key={index}>
<HeaderExtension extension={navControl.mount} />
</EuiHeaderSectionItem>
))}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'Page level controls',
description: 'Screen reader announcement about heading controls',
}),
'euiBreadcrumb.popoverAriaLabel': i18n.translate('core.euiBreadcrumb.popoverAriaLabel', {
defaultMessage: 'Clicking this button will toggle a popover dialog.',
}),
'euiBreadcrumb.collapsedBadge.ariaLabel': i18n.translate(
'core.euiBreadcrumb.collapsedBadge.ariaLabel',
{
Expand Down Expand Up @@ -158,6 +161,17 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'ARIA label and tooltip content describing a button that expands an actions menu',
}
),
'euiCollapsibleNavBeta.ariaLabel': i18n.translate('core.euiCollapsibleNavBeta.ariaLabel', {
defaultMessage: 'Site menu',
}),
'euiCollapsibleNavButton.ariaLabelClose': i18n.translate(
'core.euiCollapsibleNavButton.ariaLabelClose',
{ defaultMessage: 'Toggle navigation closed' }
),
'euiCollapsibleNavButton.ariaLabelOpen': i18n.translate(
'core.euiCollapsibleNavButton.ariaLabelOpen',
{ defaultMessage: 'Toggle navigation open' }
),
'euiColorPicker.alphaLabel': i18n.translate('core.euiColorPicker.alphaLabel', {
defaultMessage: 'Alpha channel (opacity) value',
description: 'Label describing color alpha channel',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ import { css } from '@emotion/react';
import type { FC } from 'react';
import { EuiCommentProps, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';

import type { Pagination as PaginationType } from '@elastic/eui';

import type {
CommentsArray,
ExceptionListItemSchema,
ExceptionListTypeEnum,
} from '@kbn/securitysolution-io-ts-list-types';

import { euiThemeVars } from '@kbn/ui-theme';
import { EmptyViewerState, ExceptionItemCard, Pagination } from '../..';
import { EmptyViewerState, ExceptionItemCard, Pagination, PaginationProps } from '../..';

import type {
RuleReferences,
Expand All @@ -46,7 +44,7 @@ interface ExceptionItemsProps {
exceptions: ExceptionListItemSchema[];
listType: ExceptionListTypeEnum;
ruleReferences: RuleReferences;
pagination: PaginationType;
pagination: PaginationProps['pagination'];
editActionLabel?: string;
deleteActionLabel?: string;
dataTestSubj?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import type { Pagination } from '@elastic/eui';
import type { NamespaceType } from '@kbn/securitysolution-io-ts-list-types';

export interface GetExceptionItemProps {
pagination?: Pagination;
pagination?: PaginationProps['pagination'];
search?: string;
filters?: string;
}

export interface PaginationProps {
dataTestSubj?: string;
ariaLabel?: string;
pagination: Pagination;
pagination: Pagination & { pageSize: number };
onPaginationChange: (arg: GetExceptionItemProps) => void;
}

Expand Down
2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const LICENSE_OVERRIDES = {
'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/ems-client@8.4.0': ['Elastic License 2.0'],
'@elastic/eui@86.0.0': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@87.1.0': ['SSPL-1.0 OR Elastic License 2.0'],
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary
};
2 changes: 1 addition & 1 deletion x-pack/packages/ml/data_grid/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface RowCountInfo {
/**
* Type representing the pagination settings for an index.
*/
export type IndexPagination = Pick<EuiDataGridPaginationProps, 'pageIndex' | 'pageSize'>;
export type IndexPagination = Required<Pick<EuiDataGridPaginationProps, 'pageIndex' | 'pageSize'>>;

/**
* Type for callback function for changing items per page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface BaseDataTableProps {
rowRenderers: DeprecatedRowRenderer[];
hasCrudPermissions?: boolean;
unitCountText: string;
pagination: EuiDataGridPaginationProps;
pagination: EuiDataGridPaginationProps & { pageSize: number };
totalItems: number;
rowHeightsOptions?: EuiDataGridRowHeightsOptions;
isEventRenderedView?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const getPaginationTableParams = (
export const getPaginationQuery = ({
pageIndex,
pageSize,
}: Pick<Pagination, 'pageIndex' | 'pageSize'>) => ({
}: Required<Pick<Pagination, 'pageIndex' | 'pageSize'>>) => ({
from: pageIndex * pageSize,
size: pageSize,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type TableProps = Required<EuiBasicTableProps<CspFinding>>;
interface Props {
loading: boolean;
items: CspFinding[];
pagination: Pagination;
pagination: Pagination & { pageSize: number };
sorting: TableProps['sorting'];
setTableOptions(options: CriteriaWithPagination<CspFinding>): void;
onAddFilter: OnAddFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { EmptyState } from '../../../../components/empty_state';
export interface ResourceFindingsTableProps {
items: CspFinding[];
loading: boolean;
pagination: Pagination;
pagination: Pagination & { pageSize: number };
sorting: Required<EuiBasicTableProps<CspFinding>>['sorting'];
setTableOptions(options: CriteriaWithPagination<CspFinding>): void;
onAddFilter: OnAddFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ export const AccountHeader: React.FC = () => {
return (
<EuiHeader>
<EuiHeaderSection grow={false}>
<EuiHeaderSectionItem border="none">
<EuiHeaderSectionItem>
<EuiHeaderLogo iconType="logoWorkplaceSearch" />
<EuiText role="banner">{WORKPLACE_SEARCH_TITLE}</EuiText>
</EuiHeaderSectionItem>
<EuiHeaderSectionItem border="none">
<EuiHeaderSectionItem>
<EuiHeaderLinks>
<EuiButtonEmptyTo to={PRIVATE_SOURCES_PATH}>{ACCOUNT_NAV.SOURCES}</EuiButtonEmptyTo>
</EuiHeaderLinks>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface CriteriaWithPagination<T> extends Criteria<T> {

interface UseTableSettingsReturnValue<T> {
onTableChange: EuiBasicTableProps<T>['onChange'];
pagination: Pagination;
pagination: Required<Omit<Pagination, 'showPerPageOptions'>>;
sorting: {
sort: {
field: keyof T;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe('SecurityNavControlService', () => {
aria-expanded="false"
aria-haspopup="true"
aria-label="Account menu"
class="euiButtonEmpty euiHeaderSectionItemButton emotion-euiButtonDisplay-euiButtonEmpty-m-empty-text"
class="euiButtonEmpty euiHeaderSectionItemButton emotion-euiButtonDisplay-euiButtonEmpty-m-empty-text-euiHeaderSectionItemButton"
data-test-subj="userMenuButton"
style="line-height: normal;"
type="button"
Expand All @@ -102,7 +102,7 @@ describe('SecurityNavControlService', () => {
class="eui-textTruncate euiButtonEmpty__text"
>
<span
class="euiHeaderSectionItemButton__content"
class="euiHeaderSectionItemButton__content emotion-euiHeaderSectionItemButton__content"
>
<span
aria-label="Loading"
Expand Down
Loading