You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After implementing eslint-plugin-deprecation there are linting warnings left around deprecated code.
We want to replace the deprecated usages with the expected alternatives where already possible to reduce the warnings.
Note
The are warnings around EuiSelectFilterItem being deprecated. For EuiComboBox this will be handled by updating it with EuiSelectable in this separate issue.
Guidance for picking up this task:
Address the smaller deprecations, that can be cleaned up now, in a straightforward way.
Anything larger that would take substantial effort is moved to a separate task.
Additional insight
ESLint output
eui/packages/eui/src-docs/src/store/configure_store.js
22:42 warning 'createStore' is deprecated. **We recommend using the `configureStore` method
of the `@reduxjs/toolkit` package**, which replaces `createStore`.
Redux Toolkit is our recommended approach for writing Redux logic today,
including store setup, reducers, data fetching, and more.
**For more details, please read this Redux docs page:**
**https://redux.js.org/introduction/why-rtk-is-redux-today**
`configureStore` from Redux Toolkit is an improved version of `createStore` that
simplifies setup and helps avoid common bugs.
You should not be using the `redux` core package by itself today, except for learning purposes.
The `createStore` method from the core `redux` package will not be removed, but we encourage
all users to migrate to using Redux Toolkit for all Redux code.
If you want to use `createStore` without this visual deprecation warning, use
the `legacy_createStore` import instead:
`import { legacy_createStore as createStore} from 'redux'` deprecation/deprecation
eui/packages/eui/src-docs/src/views/elastic_charts/accessibility_bullet.tsx
49:10 warning 'Goal' is deprecated. please use `Bullet` spec instead deprecation/deprecation
eui/packages/eui/src-docs/src/views/elastic_charts/goal.tsx
49:12 warning 'Goal' is deprecated. please use `Bullet` spec instead deprecation/deprecation
eui/packages/eui/src/components/breadcrumbs/_breadcrumb_content.tsx
44:3 warning 'color' is deprecated. - if a custom color is wanted, use the `css` prop to pass custom css deprecation/deprecation
150:7 warning 'color' is deprecated. - if a custom color is wanted, use the `css` prop to pass custom css deprecation/deprecation
eui/packages/eui/src/components/button/button_group/button_group.tsx
154:3 warning 'name' is deprecated. No longer needed. You can safely remove this prop entirely deprecation/deprecation
eui/packages/eui/src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx
205:8 warning 'EuiFilterSelectItem' is deprecated. - Use EuiSelectable instead deprecation/deprecation
eui/packages/eui/src/components/datagrid/controls/data_grid_toolbar.stories.tsx
269:41 warning 'PlayFunctionContext' is deprecated. Use {@link StoryContext } instead deprecation/deprecation
290:41 warning 'PlayFunctionContext' is deprecated. Use {@link StoryContext } instead deprecation/deprecation
316:35 warning 'PlayFunctionContext' is deprecated. Use {@link StoryContext } instead deprecation/deprecation
328:41 warning 'PlayFunctionContext' is deprecated. Use {@link StoryContext } instead deprecation/deprecation
348:35 warning 'PlayFunctionContext' is deprecated. Use {@link StoryContext } instead deprecation/deprecation
eui/packages/eui/src/components/datagrid/controls/full_screen_selector.stories.tsx
60:35 warning 'PlayFunctionContext' is deprecated. Use {@link StoryContext } instead deprecation/deprecation
eui/packages/eui/src/components/datagrid/data_grid.stories.tsx
153:35 warning 'PlayFunctionContext' is deprecated. Use {@link StoryContext } instead deprecation/deprecation
208:35 warning 'PlayFunctionContext' is deprecated. Use {@link StoryContext } instead deprecation/deprecation
eui/packages/eui/src/components/drag_and_drop/drag_drop_context.stories.tsx
117:35 warning 'PlayFunctionContext' is deprecated. Use {@link StoryContext } instead deprecation/deprecation
eui/packages/eui/src/components/filter_group/filter_select_item.test.tsx
17:29 warning 'EuiFilterSelectItem' is deprecated. - Use EuiSelectable instead deprecation/deprecation
20:35 warning 'EuiFilterSelectItem' is deprecated. - Use EuiSelectable instead deprecation/deprecation
eui/packages/eui/src/components/filter_group/filter_select_item.tsx
192:3 warning 'EuiFilterSelectItemClass' is deprecated. - Use EuiSelectable instead deprecation/deprecation
eui/packages/eui/src/components/filter_group/index.ts
19:10 warning 'EuiFilterSelectItem' is deprecated. - Use EuiSelectable instead deprecation/deprecation
19:10 warning 'EuiFilterSelectItem' is deprecated. - Use EuiSelectable instead deprecation/deprecation
eui/packages/eui/src/components/markdown_editor/markdown_actions.ts
271:35 warning 'execCommand' is deprecated. deprecation/deprecation
eui/packages/eui/src/components/markdown_editor/markdown_editor.test.tsx
286:14 warning 'execCommand' is deprecated. deprecation/deprecation
eui/packages/eui/src/components/popover/popover.tsx
638:7 warning 'hasDragDrop' is deprecated. - use `usePortal` prop on children `EuiDraggable` components instead deprecation/deprecation
eui/packages/eui/src/services/color_picker/index.ts
10:31 warning 'useColorStopsState' is deprecated. deprecation/deprecation
10:31 warning 'useColorStopsState' is deprecated. deprecation/deprecation
eui/packages/eui/src/services/copy/copy_to_clipboard.ts
42:17 warning 'execCommand' is deprecated. deprecation/deprecation
eui/packages/eui/src/services/index.ts
66:31 warning 'useColorStopsState' is deprecated. deprecation/deprecation
66:31 warning 'useColorStopsState' is deprecated. deprecation/deprecation
✖ 29 problems (0 errors, 29 warnings)
warnings in the src-docs folder
These warnings will be removed after the new documentation site is released. They don't require any action right now.
Looks like hasDragDrop can be safely removed (no uses in Kibana or cloud). It is mentioned in #1469.
"execCommand is deprecated" warning
There is no clear, drop-in replacement to execCommand but it's recommended to move away from it if possible because the support can be dropped at any time (MDN).
Description
This issue is a follow-up to this PR.
After implementing eslint-plugin-deprecation there are linting warnings left around deprecated code.
We want to replace the deprecated usages with the expected alternatives where already possible to reduce the warnings.
Note
The are warnings around
EuiSelectFilterItem
being deprecated. ForEuiComboBox
this will be handled by updating it withEuiSelectable
in this separate issue.Guidance for picking up this task:
Additional insight
ESLint output
warnings in the
src-docs
folderThese warnings will be removed after the new documentation site is released. They don't require any action right now.
#7401
"
'color'
is deprecated" warningLooks like
color
can be safely removed (no uses in Kibana or cloud). No mention in the #1469. Verify the impact.PlayFunctionContext
warningReplace with
StoryContext
. Drop-in replacement."Use
EuiSelectable
instead" warningThese warnings can only be removed with refactoring components to use
EuiSelectable
:EuiComboBox
- [EuiComboBox] Rebuild with EuiSelectable #2841EuiFilterGroup
- requires a taskSkip for now.
"
hasDragDrop
is deprecated" warningLooks like
hasDragDrop
can be safely removed (no uses in Kibana or cloud). It is mentioned in #1469."
execCommand
is deprecated" warningThere is no clear, drop-in replacement to
execCommand
but it's recommended to move away from it if possible because the support can be dropped at any time (MDN).Functionalities needed and their replacements:
insertText
(EuiMarkdown
)- alternative is Selection API and Range APIcopy
(copy_to_clipboard.ts
)- alternative is Clipboard APIRequires separate tasks to refactor the code and verify the functionality is working as expected.
"
useColorStopsState
is deprecated" warningLooks like
useColorStopsState
can be safely removed (no uses in Kibana or cloud). No mention in the #1469. Verify the impact before removing.The text was updated successfully, but these errors were encountered: