[Controls] Fix cut off range slider popover (#128855) (#134147)

* Fix cut off popover for right most range control

* Reduce control label max-width and restore small control size

* Disable responsive flex groups in range slider control

* Update options list icon

* Updated time slider icon

(cherry picked from commit c6e9b7aefb)
This commit is contained in:
Catherine Liu 2022-06-09 18:16:00 -07:00 committed by GitHub
parent b290b13cbc
commit b08e4dccd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 5 deletions

View file

@ -57,7 +57,7 @@ $controlMinWidth: $euiSize * 14;
}
.controlFrame__labelToolTip {
max-width: 50%;
max-width: 40%;
}
.controlFrameWrapper {

View file

@ -51,7 +51,7 @@ export class OptionsListEmbeddableFactory
public isEditable = () => Promise.resolve(false);
public getDisplayName = () => OptionsListStrings.getDisplayName();
public getIconType = () => 'list';
public getIconType = () => 'editorChecklist';
public getDescription = () => OptionsListStrings.getDescription();
public inject = createOptionsListInject();

View file

@ -31,6 +31,7 @@
.rangeSliderAnchor__delimiter {
background-color: unset;
padding: $euiSizeS*1.5 0;
}
.rangeSliderAnchor__fieldNumber {
font-weight: $euiFontWeightBold;

View file

@ -110,7 +110,7 @@ export const RangeSliderPopover: FC<Props> = ({
className="rangeSliderAnchor__button"
data-test-subj={`range-slider-control-${id}`}
>
<EuiFlexGroup gutterSize="none">
<EuiFlexGroup gutterSize="none" responsive={false}>
<EuiFlexItem>
<EuiFieldNumber
controlOnly
@ -178,8 +178,7 @@ export const RangeSliderPopover: FC<Props> = ({
panelClassName="rangeSlider__panelOverride"
closePopover={() => setIsPopoverOpen(false)}
anchorPosition="downCenter"
initialFocus={false}
repositionOnScroll
attachToAnchor={false}
disableFocusTrap
onPanelResize={() => {
if (rangeRef?.current) {
@ -192,6 +191,7 @@ export const RangeSliderPopover: FC<Props> = ({
className="rangeSlider__actions"
gutterSize="none"
data-test-subj="rangeSlider-control-actions"
responsive={false}
>
<EuiFlexItem>
<EuiDualRange

View file

@ -53,6 +53,7 @@ export class TimesliderEmbeddableFactory
public isEditable = () => Promise.resolve(false);
public getDisplayName = () => TimeSliderStrings.getDisplayName();
public getIconType = () => 'clock';
public getDescription = () => TimeSliderStrings.getDescription();
public inject = createOptionsListInject();