mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
# Backport This will backport the following commits from `main` to `9.0`: - [[Controls] Fix control styles and invalid selection icon for Borealis (#213851)](https://github.com/elastic/kibana/pull/213851) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Catherine Liu","email":"catherine.liu@elastic.co"},"sourceCommit":{"committedDate":"2025-04-01T00:04:43Z","message":"[Controls] Fix control styles and invalid selection icon for Borealis (#213851)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/210614.\nCloses https://github.com/elastic/kibana/issues/210615.\nCloses https://github.com/elastic/kibana/issues/210616.\n\nThis is a follow up to the Borealis updates to fix controls\ncolors/styles. This also fixes the text color of the range slider number\ninputs to match the invalid state.\n\n#### Light mode\n\n\n#### Dark mode\n\n\n#### Options List control with selection that results in no data\n\n\n\n#### Range Slider control with valid selection that results in no data\n\n\n#### Range Slider control with invalid selection\n\n\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...","sha":"96598fc01956c0762ac50d8636c3e78ae5735863","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Platform-Design","Feature:Dashboard","Team:Presentation","loe:small","release_note:skip","impact:medium","backport:version","EUI Visual Refresh","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Controls] Fix control styles and invalid selection icon for Borealis","number":213851,"url":"https://github.com/elastic/kibana/pull/213851","mergeCommit":{"message":"[Controls] Fix control styles and invalid selection icon for Borealis (#213851)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/210614.\nCloses https://github.com/elastic/kibana/issues/210615.\nCloses https://github.com/elastic/kibana/issues/210616.\n\nThis is a follow up to the Borealis updates to fix controls\ncolors/styles. This also fixes the text color of the range slider number\ninputs to match the invalid state.\n\n#### Light mode\n\n\n#### Dark mode\n\n\n#### Options List control with selection that results in no data\n\n\n\n#### Range Slider control with valid selection that results in no data\n\n\n#### Range Slider control with invalid selection\n\n\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...","sha":"96598fc01956c0762ac50d8636c3e78ae5735863"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213851","number":213851,"mergeCommit":{"message":"[Controls] Fix control styles and invalid selection icon for Borealis (#213851)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/210614.\nCloses https://github.com/elastic/kibana/issues/210615.\nCloses https://github.com/elastic/kibana/issues/210616.\n\nThis is a follow up to the Borealis updates to fix controls\ncolors/styles. This also fixes the text color of the range slider number\ninputs to match the invalid state.\n\n#### Light mode\n\n\n#### Dark mode\n\n\n#### Options List control with selection that results in no data\n\n\n\n#### Range Slider control with valid selection that results in no data\n\n\n#### Range Slider control with invalid selection\n\n\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...","sha":"96598fc01956c0762ac50d8636c3e78ae5735863"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Catherine Liu <catherine.liu@elastic.co>
This commit is contained in:
parent
2a61432655
commit
effc619a2a
9 changed files with 11 additions and 23 deletions
|
@ -8,7 +8,6 @@ $controlMinWidth: $euiSize * 14;
|
|||
max-inline-size: 100% !important;
|
||||
height: $euiButtonHeightSmall;
|
||||
box-shadow: none !important;
|
||||
background-color: $euiFormBackgroundColor !important;
|
||||
border-radius: 0 $euiBorderRadius $euiBorderRadius 0 !important;
|
||||
|
||||
&--roundedBorders {
|
||||
|
@ -89,7 +88,6 @@ $controlMinWidth: $euiSize * 14;
|
|||
.controlFrame__formControlLayout:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
background-color: transparentize($euiColorPrimary, .5);
|
||||
border-radius: $euiBorderRadius;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
|
@ -217,7 +215,6 @@ $controlMinWidth: $euiSize * 14;
|
|||
border-radius: $euiBorderRadius;
|
||||
font-weight: $euiFontWeightSemiBold;
|
||||
border: $euiBorderWidthThin solid $euiFormBorderColor;
|
||||
background-color: $euiFormInputGroupLabelBackground;
|
||||
min-width: $controlMinWidth;
|
||||
@include euiFontSizeXS;
|
||||
}
|
||||
|
|
|
@ -69,10 +69,6 @@
|
|||
padding-left: $euiSizeM;
|
||||
}
|
||||
|
||||
.optionsList__selectionInvalid {
|
||||
color: $euiColorWarningText;
|
||||
}
|
||||
|
||||
.optionslist--loadingMoreGroupLabel {
|
||||
text-align: center;
|
||||
padding: $euiSizeM;
|
||||
|
|
|
@ -125,7 +125,7 @@ export const OptionsListControl = ({
|
|||
tabIndex={0}
|
||||
iconType="alert"
|
||||
size="s"
|
||||
color="euiColorVis5"
|
||||
color="euiColorVis9"
|
||||
shape="square"
|
||||
fill="dark"
|
||||
title={OptionsListStrings.control.getInvalidSelectionWarningLabel(
|
||||
|
|
|
@ -18,6 +18,7 @@ import {
|
|||
EuiProgress,
|
||||
useEuiBackgroundColor,
|
||||
useEuiPaddingSize,
|
||||
useEuiTheme,
|
||||
} from '@elastic/eui';
|
||||
import { css } from '@emotion/react';
|
||||
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
|
||||
|
@ -39,6 +40,7 @@ const aggregationToggleButtons = [
|
|||
];
|
||||
|
||||
export const OptionsListPopoverFooter = () => {
|
||||
const { euiTheme } = useEuiTheme();
|
||||
const { api, stateManager } = useOptionsListContext();
|
||||
|
||||
const [exclude, loading, allowExpensiveQueries] = useBatchedPublishingSubjects(
|
||||
|
@ -88,7 +90,7 @@ export const OptionsListPopoverFooter = () => {
|
|||
<EuiFlexItem data-test-subj="optionsList-allow-expensive-queries-warning" grow={false}>
|
||||
<EuiIconTip
|
||||
type="warning"
|
||||
color="warning"
|
||||
color={euiTheme.colors.textWarning}
|
||||
content={OptionsListStrings.popover.getAllowExpensiveQueriesWarning()}
|
||||
aria-label={OptionsListStrings.popover.getAllowExpensiveQueriesWarning()}
|
||||
/>
|
||||
|
|
|
@ -71,7 +71,6 @@ export const OptionsListPopoverInvalidSelections = () => {
|
|||
<EuiFlexItem grow={false}>
|
||||
<EuiIcon
|
||||
type="warning"
|
||||
color="warning"
|
||||
title={OptionsListStrings.popover.getInvalidSelectionScreenReaderText()}
|
||||
size="s"
|
||||
/>
|
||||
|
|
|
@ -30,7 +30,6 @@ export const rangeSliderControlStyles = (euiThemeContext: UseEuiTheme) => {
|
|||
}
|
||||
|
||||
.euiFormControlLayout {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
@ -45,11 +44,11 @@ export const rangeSliderControlStyles = (euiThemeContext: UseEuiTheme) => {
|
|||
|
||||
/* Stretch the underline across the entire __childrenWrapper and set it to a custom warning color */
|
||||
background-size: 100% 100%;
|
||||
--euiFormControlStateColor: ${euiTheme.colors.warning};
|
||||
--euiFormControlStateColor: ${euiTheme.colors.textWarning};
|
||||
|
||||
/* But restore the danger color for truly invalid inputs (e.g. min larger than max) */
|
||||
&:has(input:invalid) {
|
||||
--euiFormControlStateColor: ${euiTheme.colors.danger};
|
||||
--euiFormControlStateColor: ${euiTheme.colors.textDanger};
|
||||
}
|
||||
|
||||
/* Remove the append background so the caution icon looks more natural */
|
||||
|
@ -62,7 +61,6 @@ export const rangeSliderControlStyles = (euiThemeContext: UseEuiTheme) => {
|
|||
fieldNumbers: {
|
||||
rangeSliderFieldNumber: css`
|
||||
font-weight: ${euiTheme.font.weight.medium};
|
||||
background-color: transparent;
|
||||
|
||||
&:placeholder-shown,
|
||||
&::placeholder {
|
||||
|
@ -72,9 +70,11 @@ export const rangeSliderControlStyles = (euiThemeContext: UseEuiTheme) => {
|
|||
`,
|
||||
invalid: css`
|
||||
&:not(:invalid) {
|
||||
--euiFormControlStateColor: ${euiTheme.colors.textWarning};
|
||||
color: ${euiTheme.colors.textWarning};
|
||||
}
|
||||
&:invalid {
|
||||
--euiFormControlStateColor: ${euiTheme.colors.textDanger};
|
||||
color: ${euiTheme.colors.textDanger};
|
||||
}
|
||||
`,
|
||||
|
|
|
@ -216,7 +216,7 @@ export const RangeSliderControl: FC<Props> = ({
|
|||
tabIndex={0}
|
||||
iconType="alert"
|
||||
size="s"
|
||||
color="euiColorVis5"
|
||||
color="euiColorVis9"
|
||||
shape="square"
|
||||
fill="dark"
|
||||
title={RangeSliderStrings.control.getInvalidSelectionWarningLabel()}
|
||||
|
|
|
@ -218,7 +218,7 @@ export const getRangesliderControlFactory = (): DataControlFactory<
|
|||
return {
|
||||
api,
|
||||
Component: ({ className: controlPanelClassName }) => {
|
||||
const [dataLoading, fieldFormatter, max, min, selectionHasNotResults, step, value] =
|
||||
const [dataLoading, fieldFormatter, max, min, selectionHasNoResults, step, value] =
|
||||
useBatchedPublishingSubjects(
|
||||
dataLoading$,
|
||||
dataControl.api.fieldFormatter,
|
||||
|
@ -243,7 +243,7 @@ export const getRangesliderControlFactory = (): DataControlFactory<
|
|||
<RangeSliderControl
|
||||
controlPanelClassName={controlPanelClassName}
|
||||
fieldFormatter={fieldFormatter}
|
||||
isInvalid={selectionHasNotResults}
|
||||
isInvalid={Boolean(value) && selectionHasNoResults}
|
||||
isLoading={typeof dataLoading === 'boolean' ? dataLoading : false}
|
||||
max={max}
|
||||
min={min}
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.timeSlider-prependButton {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.timeSlider__anchor {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -16,8 +12,6 @@
|
|||
overflow: hidden;
|
||||
|
||||
.euiText {
|
||||
background-color: transparent !important;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue