Skip to content

Commit

Permalink
Upgrade EUI to v55.1.3 (elastic#132451)
Browse files Browse the repository at this point in the history
* Upgrade EUI to 55.1.3 backport

* [Deprecation] Remove `watchedItemProps` from EuiContextMenu usage - should no longer be necessary

* Update snapshots with new data-popover attr

* Fix failing FTR test

- Now that EuiContextMenu focus is restored correctly, there is a tooltip around the popover toggle that's blocking an above item that the test wants to click

- swapping the order so that the tooltip does not block the clicked item should work

* Fix 2nd maps FTR test with blocking tooltip

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
Constance and kibanamachine authored May 20, 2022
1 parent 642290b commit 51ae020
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.2.0-canary.2",
"@elastic/ems-client": "8.3.2",
"@elastic/eui": "55.1.2",
"@elastic/eui": "55.1.3",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
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 @@ -77,6 +77,6 @@ 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.3.2': ['Elastic License 2.0'],
'@elastic/eui@55.1.2': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@55.1.3': ['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
};
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export function FieldSearch({
})}
</EuiPopoverTitle>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={(availableFieldTypes as string[]).map((type) => (
<EuiContextMenuItem
key={type}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,7 @@ class SavedObjectFinderUi extends React.Component<
</EuiFilterButton>
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={this.getSortOptions()}
/>
<EuiContextMenuPanel items={this.getSortOptions()} />
</EuiPopover>
{this.props.showFilter && (
<EuiPopover
Expand Down Expand Up @@ -411,7 +408,6 @@ class SavedObjectFinderUi extends React.Component<
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={this.props.savedObjectMetaData.map((metaData) => (
<EuiContextMenuItem
key={metaData.type}
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 @@ -394,10 +394,7 @@ export class SavedObjectFinderUi extends React.Component<
</EuiFilterButton>
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={this.getSortOptions()}
/>
<EuiContextMenuPanel items={this.getSortOptions()} />
</EuiPopover>
{this.props.showFilter && (
<EuiPopover
Expand Down Expand Up @@ -430,7 +427,6 @@ export class SavedObjectFinderUi extends React.Component<
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={this.props.savedObjectMetaData.map((metaData) => (
<EuiContextMenuItem
key={metaData.type}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,6 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
data-test-subj="lnsIndexPatternTypeFilterOptions"
items={(availableFieldTypes as DataType[]).map((type) => (
<EuiContextMenuItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,7 @@ export const LinksMenuUI = (props: LinksMenuProps) => {
]);

return (
<EuiContextMenuPanel
items={contextMenuItems}
watchedItemProps={['disabled', 'href']} // Ensures the 'View in Discover' link rerenders when loading completes
data-test-subj="mlAnomaliesListRowActionsMenu"
/>
<EuiContextMenuPanel items={contextMenuItems} data-test-subj="mlAnomaliesListRowActionsMenu" />
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export class SpacesPopoverList extends Component<Props, State> {
title: i18n.translate('xpack.security.management.editRole.spacesPopoverList.popoverTitle', {
defaultMessage: 'Spaces',
}),
watchedItemProps: ['data-search-term'],
};

if (this.props.spaces.length >= SPACE_SEARCH_COUNT_THRESHOLD) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class SpacesMenuUI extends Component<Props, State> {
id: 'xpack.spaces.navControl.spacesMenu.changeCurrentSpaceTitle',
defaultMessage: 'Change current space',
}),
watchedItemProps: ['data-search-term'],
};

if (this.props.spaces.length >= SPACE_SEARCH_COUNT_THRESHOLD) {
Expand Down
2 changes: 2 additions & 0 deletions x-pack/test/functional/apps/maps/group1/layer_visibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import expect from '@kbn/expect';
export default function ({ getPageObjects, getService }) {
const PageObjects = getPageObjects(['maps']);
const inspector = getService('inspector');
const testSubjects = getService('testSubjects');
const security = getService('security');

describe('layer visibility', () => {
Expand All @@ -31,6 +32,7 @@ export default function ({ getPageObjects, getService }) {

it('should fetch layer data when layer is made visible', async () => {
await PageObjects.maps.toggleLayerVisibility('logstash');
await testSubjects.click('mapLayerTOC'); // Tooltip blocks clicks otherwise
const hits = await PageObjects.maps.getHits();
expect(hits).to.equal('5');
});
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/maps/group1/sample_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ export default function ({ getPageObjects, getService, updateBaselines }) {
describe('web logs', () => {
before(async () => {
await PageObjects.maps.loadSavedMap('[Logs] Total Requests and Bytes');
await PageObjects.maps.toggleLayerVisibility('Road map - desaturated');
await PageObjects.maps.toggleLayerVisibility('Total Requests by Destination');
await PageObjects.maps.toggleLayerVisibility('Road map - desaturated');
await PageObjects.timePicker.setCommonlyUsedTime('sample_data range');
await PageObjects.maps.enterFullScreen();
await PageObjects.maps.closeLegend();
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1503,10 +1503,10 @@
resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314"
integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ==

"@elastic/eui@55.1.2":
version "55.1.2"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-55.1.2.tgz#dd0b42f5b26c5800d6a9cb2d4c2fe1afce9d3f07"
integrity sha512-wwZz5KxMIMFlqEsoCRiQBJDc4CrluS1d0sCOmQ5lhIzKhYc91MdxnqCk2i6YkhL4sSDf2Y9KAEuMXa+uweOWUA==
"@elastic/eui@55.1.3":
version "55.1.3"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-55.1.3.tgz#976142b88156caab2ce896102a1e35fecdaa2647"
integrity sha512-Hf6eN9YKOKAQMMS9OV5pHLUkzpKKAxGYNVSfc/KK7hN9BlhlHH4OaZIQP3Psgf5GKoqhZrldT/N65hujk3rlLA==
dependencies:
"@types/chroma-js" "^2.0.0"
"@types/lodash" "^4.14.160"
Expand Down

0 comments on commit 51ae020

Please sign in to comment.