Skip to content

Popover on the EuiTour component doesn't respect the anchorPosition prop #5731

@cauemarcondes

Description

@cauemarcondes

On APM I'm adding the EuiTour component on a new feature we implemented, service groups. One of the steps is to show the tour component on a EuiCard which is rendered inside an EuiFlexGrop. I'd like to position the popover on the leftside up of the card, but it automatically changes the popover to the top of the card, as it wouldn't have enough space to render on the side, but it has.

Screen.Recording.2022-03-17.at.4.26.49.PM.mov

I try adding a button to show the tour after the card was rendered but still got the same problem.

Screen.Recording.2022-03-17.at.4.41.24.PM.mov
<EuiTourStep
        content={
          <>
            <EuiText size="s" color="subdued">
              {i18n.translate(
                'xpack.apm.serviceGroups.tour.serviceGroups.content',
                {
                  defaultMessage:
                    "Now that you've created a service group, your All services inventory has moved here. This group cannot be edited or removed.",
                }
              )}
            </EuiText>
            <EuiSpacer />
            <EuiText size="s" color="subdued">
              {i18n.translate(
                'xpack.apm.serviceGroups.tour.createGroups.content.link',
                { defaultMessage: 'Learn more in our documentation' }
              )}
            </EuiText>
          </>
        }
        isStepOpen={isOpen}
        onFinish={() => setIsOpen(false)}
        maxWidth={300}
        minWidth={300}
        step={1}
        stepsTotal={1}
        title={i18n.translate(
          'xpack.apm.serviceGroups.tour.serviceGroups.title',
          { defaultMessage: 'All services group' }
        )}
        anchorPosition="leftUp"
        footerAction={<div>Dismiss</div>}
      >
        <div>{Card}</div>
      </EuiTourStep>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions