diff --git a/src/components/tour/__snapshots__/tour_step.test.tsx.snap b/src/components/tour/__snapshots__/tour_step.test.tsx.snap index 2a793994d39..65613f5edbd 100644 --- a/src/components/tour/__snapshots__/tour_step.test.tsx.snap +++ b/src/components/tour/__snapshots__/tour_step.test.tsx.snap @@ -50,7 +50,7 @@ exports[`EuiTourStep can change the minWidth and maxWidth 1`] = ` class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--noShadow euiPopover__panel euiPopover__panel--left euiPopover__panel-isOpen euiTour testClass1 testClass2" data-popover-panel="true" role="dialog" - style="top: -22px; left: -26px; will-change: transform, opacity; max-width: 420px; min-width: 240px; z-index: 2000;" + style="top: -22px; left: -26px; will-change: transform, opacity; z-index: 2000;" >
-

- A demo -

-
-
- You are here -
-
+

+ A demo +

+
+
+ You are here +
- + +
@@ -148,7 +152,7 @@ exports[`EuiTourStep can have subtitle 1`] = ` class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--noShadow euiPopover__panel euiPopover__panel--left euiPopover__panel-isOpen euiTour testClass1 testClass2" data-popover-panel="true" role="dialog" - style="top: -22px; left: -26px; will-change: transform, opacity; max-width: 600px; min-width: 300px; z-index: 2000;" + style="top: -22px; left: -26px; will-change: transform, opacity; z-index: 2000;" >
-

- Subtitle -

-

+ Subtitle +

+

+ A demo +

+
+
- A demo - -
-
- You are here -
-
+ You are here +
- + +
@@ -251,7 +259,7 @@ exports[`EuiTourStep can override the footer action 1`] = ` class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--noShadow euiPopover__panel euiPopover__panel--left euiPopover__panel-isOpen euiTour testClass1 testClass2" data-popover-panel="true" role="dialog" - style="top: -22px; left: -26px; will-change: transform, opacity; max-width: 600px; min-width: 300px; z-index: 2000;" + style="top: -22px; left: -26px; will-change: transform, opacity; z-index: 2000;" >
-

- A demo -

-
-
- You are here -
-
+

+ A demo +

+
+
+ You are here +
- +
+ +
@@ -338,7 +350,7 @@ exports[`EuiTourStep can turn off the beacon 1`] = ` class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--noShadow euiPopover__panel euiPopover__panel--left euiPopover__panel-isOpen euiTour testClass1 testClass2" data-popover-panel="true" role="dialog" - style="top: -22px; left: -16px; will-change: transform, opacity; max-width: 600px; min-width: 300px; z-index: 2000;" + style="top: -22px; left: -16px; will-change: transform, opacity; z-index: 2000;" >
-

- A demo -

-
-
- You are here -
-
+

+ A demo +

+
+ You are here +
+
- + +
@@ -431,7 +447,7 @@ exports[`EuiTourStep is rendered 1`] = ` class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--noShadow euiPopover__panel euiPopover__panel--left euiPopover__panel-isOpen euiTour testClass1 testClass2" data-popover-panel="true" role="dialog" - style="top: -22px; left: -26px; will-change: transform, opacity; max-width: 600px; min-width: 300px; z-index: 2000;" + style="top: -22px; left: -26px; will-change: transform, opacity; z-index: 2000;" >
-

- A demo -

-
-
- You are here -
-
+

+ A demo +

+
+
+ You are here +
- + +
diff --git a/src/components/tour/tour_step.tsx b/src/components/tour/tour_step.tsx index 6da963feea1..b32e9a9c940 100644 --- a/src/components/tour/tour_step.tsx +++ b/src/components/tour/tour_step.tsx @@ -170,8 +170,6 @@ export const EuiTourStep: FunctionComponent = ({ }; }, [anchor]); - const newStyle: CSSProperties = { ...style, maxWidth, minWidth }; - const classes = classNames('euiTour', className); const finishButtonProps: EuiButtonEmptyProps = { @@ -240,7 +238,7 @@ export const EuiTourStep: FunctionComponent = ({ isOpen: isStepOpen, ownFocus: false, panelClassName: classes, - panelStyle: newStyle, + panelStyle: style, offset: hasBeacon ? 10 : 0, 'aria-labelledby': titleId, arrowChildren: hasBeacon && , @@ -248,7 +246,7 @@ export const EuiTourStep: FunctionComponent = ({ }; const layout = ( - <> +
{subtitle && ( @@ -261,7 +259,7 @@ export const EuiTourStep: FunctionComponent = ({
{content}
{footer} - +
); if (!anchor && children) { diff --git a/upcoming_changelogs/5897.md b/upcoming_changelogs/5897.md new file mode 100644 index 00000000000..b76b5820820 --- /dev/null +++ b/upcoming_changelogs/5897.md @@ -0,0 +1,3 @@ +**Bug fixes** + +- Fixed `EuiTour` position calculation issues caused by popover width styles