Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EUI Tour Component Improvement #143847

Closed
bojanasan opened this issue Oct 24, 2022 · 7 comments
Closed

EUI Tour Component Improvement #143847

bojanasan opened this issue Oct 24, 2022 · 7 comments
Labels
Team:Journey/Onboarding Platform Journey Onboarding team

Comments

@bojanasan
Copy link

EUI Tour component improvement:
Currently, the EUI tour components can only be dismissed by interacting with the component in the UI. This is done by either clicking on the buttons in the footer, or interacting with the button or area the component is pointing to (no footer).

Ideally the user could also be able to click outside of the EUI Tour component to dismiss it and essentially exit the tour flow. This doesn't seem to be supported currently.

Describe a specific use case for the feature:
The intention is to make sure that the user can easily get out of any EUI Tour, especially given that there will be a number of additional tours added now and going forward.

cc @gavinwye @alisonelizabeth

@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 24, 2022
@alisonelizabeth alisonelizabeth added the Team:Journey/Onboarding Platform Journey Onboarding team label Oct 24, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-onboarding (Team:Journey/Onboarding)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 24, 2022
@alisonelizabeth
Copy link
Contributor

Thanks for opening up this issue @bojanasan!

If we move forward with this change, I think it is something we would want to solve on the EUI side. @elastic/eui-design do you have any thoughts on this?

@miukimiu
Copy link
Contributor

Hi @bojanasan,

Ideally the user could also be able to click outside of the EUI Tour component to dismiss it and essentially exit the tour flow. This doesn't seem to be supported currently.

This was a design decision. Users can click by mistake outside of the tour and then they don't see the tour. Is there a way to restart the tour? If, yes I think it makes sense to be able to click outside.

And this can be easily implemented as seen on the following CodeSandbox: https://codesandbox.io/s/black-thunder-8p20ey?file=/demo.js.

Alternative approach

What do you think if in EUI, we implement a way of having at least two actions in the footer? One action could be used to "skip the tour" and the other to "next".

Here are a few examples of this pattern:

687a8742cdefaa39a882b971155daf04

best_5270

Let me know your thoughts.

@alisonelizabeth
Copy link
Contributor

Thanks for the feedback @miukimiu!

This was a design decision. Users can click by mistake outside of the tour and then they don't see the tour. Is there a way to restart the tour? If, yes I think it makes sense to be able to click outside.

There is not a way to restart the tour currently.

What do you think if in EUI, we implement a way of having at least two actions in the footer? One action could be used to "skip the tour" and the other to "next".

I think this is already possible, and the approach we are currently taking.

Screen Shot 2022-11-16 at 3 51 31 PM

@bojanasan thoughts?

@miukimiu
Copy link
Contributor

Hi @alisonelizabeth,

Where is this screenshot coming from? I would love to see the code to find out what was the approach to make the buttons in line.

I'm assuming the approach is similar to the following one:

<EuiTourStep
   { ... }
    footerAction={
          <span>
              <EuiButtonEmpty size="s">Skip tour</EuiButtonEmpty>{" "}
              <EuiButton size="s">Next</EuiButton>
          </span>
        }
/>

But ff this is a pattern we're going to use, I can improve the component so that consumers just need to pass an array of buttons.

@alisonelizabeth
Copy link
Contributor

Here is the code for the 2 buttons:

    <EuiFlexGroup gutterSize="s" alignItems="baseline">
      <EuiFlexItem>
        <EuiButtonEmpty
          onClick={() => endTour()}
          size="xs"
          color="text"
          // Used for testing and to track FS usage
          data-test-subj="onboarding--observTourSkipButton"
        >
          {i18n.translate('xpack.observability.tour.skipButtonLabel', {
            defaultMessage: 'Skip tour',
          })}
        </EuiButtonEmpty>
      </EuiFlexItem>
      <EuiFlexItem>
        <EuiButton
          onClick={() => incrementStep()}
          size="s"
          color="success"
          // Used for testing and to track FS usage
          data-test-subj="onboarding--observTourNextStepButton"
        >
          {i18n.translate('xpack.observability.tour.nextButtonLabel', {
            defaultMessage: 'Next',
          })}
        </EuiButton>
      </EuiFlexItem>
    </EuiFlexGroup>

There is also some conditional logic, if it is the last step in the tour, an "End tour" link is shown.

But ff this is a pattern we're going to use, I can improve the component so that consumers just need to pass an array of buttons.

👍 that would be great

@osmanis osmanis changed the title EUI Tour Component Improvemenet EUI Tour Component Improvement Dec 7, 2022
@alisonelizabeth
Copy link
Contributor

I'm going to close this one as there is no direct action for the Onboarding team at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Journey/Onboarding Platform Journey Onboarding team
Projects
None yet
Development

No branches or pull requests

4 participants