From d921538d4e3e4a3111b2d61e61da6125e25e49ca Mon Sep 17 00:00:00 2001 From: Cee Chen <549407+cee-chen@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:18:43 -0800 Subject: [PATCH] Remove deprecated usages of `EuiFormRow`'s `display="columnCompressedSwitch"` prop (#198709) ## Summary This prop option has been deprecated as of https://github.com/elastic/eui/pull/7968. `display="columnCompressed"` now automatically accounts for EuiSwitches (via `:has` CSS) and the extra prop option is no longer needed. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) --------- Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com> (cherry picked from commit 83a9acd79b79fa650c610adb13bff1ced2c707fc) --- .../annotation_editor_controls.tsx | 2 +- .../testing_embedded_lens/public/controls.tsx | 14 +++++++------- .../settings/alerts_settings/alerts_settings.tsx | 2 +- .../knowledge_base/knowledge_base_settings.tsx | 2 +- .../partition_labels/extended_template.tsx | 2 +- .../application/data_drift/data_drift_view.tsx | 2 +- .../components/geo_upload_form/geo_upload_form.tsx | 2 +- .../editor_frame/config_panel/layer_panel.tsx | 3 --- .../axis/extent/axis_extent_settings.tsx | 2 +- .../axis/ticks/axis_ticks_settings.tsx | 2 +- .../ignore_global_filter/settings_control.tsx | 2 +- .../legend/legend_settings_popover.tsx | 4 ++-- .../datatable/components/dimension_editor.tsx | 4 ++-- .../datatable/components/toolbar.tsx | 2 +- .../visualizations/gauge/dimension_editor.tsx | 2 +- .../visualizations/partition/layer_settings.tsx | 2 +- .../tagcloud/tagcloud_toolbar/tagcloud_toolbar.tsx | 2 +- .../xy/xy_config_panel/axis_settings_popover.tsx | 6 +++--- .../missing_values_option.tsx | 2 +- .../vector_style_editor.test.tsx.snap | 4 ++-- .../vector/components/color/dynamic_color_form.tsx | 2 +- .../categorical_data_mapping_popover.tsx | 2 +- .../data_mapping/ordinal_data_mapping_popover.tsx | 2 +- .../vector/components/size/dynamic_size_form.tsx | 2 +- .../vector/components/vector_style_editor.tsx | 2 +- .../public/components/force_refresh_checkbox.tsx | 2 +- .../public/components/global_filter_checkbox.tsx | 2 +- .../public/components/global_time_checkbox.tsx | 2 +- .../layer_settings/layer_settings.tsx | 6 +++--- .../trigger_actions/filter_by_map_extent/modal.tsx | 2 +- .../trigger_actions/synchronize_movement/modal.tsx | 2 +- 31 files changed, 43 insertions(+), 46 deletions(-) diff --git a/packages/kbn-event-annotation-components/components/annotation_editor_controls/annotation_editor_controls.tsx b/packages/kbn-event-annotation-components/components/annotation_editor_controls/annotation_editor_controls.tsx index fbef21087cffd..de230ac617987 100644 --- a/packages/kbn-event-annotation-components/components/annotation_editor_controls/annotation_editor_controls.tsx +++ b/packages/kbn-event-annotation-components/components/annotation_editor_controls/annotation_editor_controls.tsx @@ -386,7 +386,7 @@ const ConfigPanelGenericSwitch = ({ value: boolean; onChange: (event: EuiSwitchEvent) => void; }) => ( - + } helpText={helpText} - display="columnCompressedSwitch" + display="columnCompressed" hasChildLabel={false} > ) : null} {isPieChart(currentAttributes) ? ( - + ) : null} {isHeatmapChart(currentAttributes) ? ( - + ) : null} {isGaugeChart(currentAttributes) ? ( - + } - display="columnCompressedSwitch" + display="columnCompressed" helpText="Pass a consumer defined action to show in the panel context menu." > = React.memo( = ({ onValueChange, argV /> - + - + { onIndexNameValidationEnd={this.props.onIndexNameValidationEnd} /> - + )} - {layerDatasource?.LayerSettingsComponent && visualizationLayerSettings.data ? ( - - ) : null} {activeVisualization?.LayerSettingsComponent && visualizationLayerSettings.data ? ( return ( <> ) /> = ({ label={i18n.translate('xpack.lens.xyChart.missingValuesStyle', { defaultMessage: 'Show as dotted line', })} - display="columnCompressedSwitch" + display="columnCompressed" > {!!styleOptions.useCustomColorRamp ? null : ( - + (props: Props - + <> (props: Props - + <> - + { } return ( - + + + + + + { return !isVectorLayer(props.layer) ? null : ( - + { _renderSwitches() { return mapEmbeddablesSingleton.getMapPanels().map((mapPanel) => { return ( - + { const hasErrors = synchronizedPanels.length === 1 && mapPanel.getIsMovementSynchronized(); return (