-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 v85.1.0 #162660
Upgrade EUI to v85.1.0 #162660
Changes from 11 commits
aa3d143
65fe690
6599006
841153c
33d7179
06a0d50
3c4ca04
da39fb7
6ff6f33
94240ae
d20bf4e
d3040e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,7 @@ | |
"@elastic/datemath": "5.0.3", | ||
"@elastic/elasticsearch": "npm:@elastic/[email protected]", | ||
"@elastic/ems-client": "8.4.0", | ||
"@elastic/eui": "85.0.1", | ||
"@elastic/eui": "85.1.0", | ||
"@elastic/filesaver": "1.1.2", | ||
"@elastic/node-crypto": "1.2.1", | ||
"@elastic/numeral": "^2.5.1", | ||
|
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 |
---|---|---|
|
@@ -85,7 +85,7 @@ export const LICENSE_OVERRIDES = { | |
'[email protected]': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts | ||
'@mapbox/[email protected]': ['MIT'], // license in readme https://github.com/tmcw/jsonlint | ||
'@elastic/[email protected]': ['Elastic License 2.0'], | ||
'@elastic/eui@85.0.1': ['SSPL-1.0 OR Elastic License 2.0'], | ||
'@elastic/eui@85.1.0': ['SSPL-1.0 OR Elastic License 2.0'], | ||
'[email protected]': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry | ||
'[email protected]': ['MIT'], // license in importing module https://www.npmjs.com/package/binary | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,13 @@ | |
|
||
import React, { useState } from 'react'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import { EuiFilterButton, EuiPopover, EuiFilterSelectItem, EuiFilterGroup } from '@elastic/eui'; | ||
import { | ||
EuiFilterButton, | ||
EuiPopover, | ||
EuiFilterSelectItem, | ||
EuiFilterGroup, | ||
useEuiTheme, | ||
} from '@elastic/eui'; | ||
|
||
interface Filter { | ||
name: string; | ||
|
@@ -24,6 +30,7 @@ export interface Filters { | |
} | ||
|
||
export function FilterListButton({ onChange, filters }: Props) { | ||
const { euiTheme } = useEuiTheme(); | ||
const [isPopoverOpen, setIsPopoverOpen] = useState(false); | ||
|
||
const activeFilters = Object.values(filters).filter((v) => (v as Filter).checked === 'on'); | ||
|
@@ -76,7 +83,10 @@ export function FilterListButton({ onChange, filters }: Props) { | |
panelPaddingSize="none" | ||
data-test-subj="filterList" | ||
> | ||
<div className="euiFilterSelect__items"> | ||
{/* EUI NOTE: Please use EuiSelectable (which already has height/scrolling built in) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an approximate timeline yet for the deprecation of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apologies for not clarifying this - we're shooting for the end of the 2023, although this isn't a firm timeline on our end and we're super happy to flex/work with Kibana teams on this! |
||
instead of EuiFilterSelectItem (which is pending deprecation). | ||
@see https://elastic.github.io/eui/#/forms/filter-group#multi-select */} | ||
<div className="eui-yScroll" css={{ maxHeight: euiTheme.base * 30 }}> | ||
cee-chen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{Object.entries(filters).map(([filter, item], index) => ( | ||
<EuiFilterSelectItem | ||
checked={(item as Filter).checked} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@breehall what are the plans for switching out the deprecated
EuiFilterSelectItem
forEuiSelectable
, as is still being used in our file here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a few too many usages in Kibana for EUI to tackle every single one of these ourselves, so we left the inline comments in hopes that Kibana teams would grab the deprecation conversions in their own time. It should hopefully be a fairly straightforward conversion, and if needed you can reference our docs example: https://elastic.github.io/eui/#/forms/filter-group#multi-select
As I mentioned in another comment, the final removal of
EuiFilterSelectItem
is still 6months+ out, so hopefully plenty of time for y'all - but please let us know if we can be a resource for this!