React-joyride: Tour hangs if the first step's target doesn't exist

Created on 9 Jun 2020  路  3Comments  路  Source: gilbarbara/react-joyride

馃殌 Feature Idea

Currently, the steps whose target could not be found in the DOM gets skipped. But if the target of the first step is not found, then the whole tour gets skipped.

Motivation

Instead of manually playing with steps every time, I hope it is better to list all the steps and render whose target is available and skip others.

Example

If the target of Step A is not found skip directly to step B.

enhancement

Most helpful comment

Hey,

I understand the desire to have this package to handle all these problems, however it will add complexity and more surface for bugs to emerge.

Some users might not like that so I'll have to add a flag to conditionally filter the steps but other users might want to have yet another option to set the filter function and so on.

However, I'll check the logic that skips the tour if the first step is missing and I could change it if it doesn't break anything else.

All 3 comments

Hey,

Why are you adding invalid steps?
Just filter the ones you don't need.

Yes, I've handled it by filtering the valid steps alone.

Let me explain the scenario I have. My application has multiple screens and I've around 5 to 6 steps on each page, but the target elements will not be available all the time. Let's say some options will be available based on the configurations sent from the backend. So, I have to filter each step based on the config and feed it to the joy ride component.

What I thought is like, if I have listed the entire steps in a separate file and just feed it to the joy ride component and it will handle it be skipping the steps which are not valid.

Hey,

I understand the desire to have this package to handle all these problems, however it will add complexity and more surface for bugs to emerge.

Some users might not like that so I'll have to add a flag to conditionally filter the steps but other users might want to have yet another option to set the filter function and so on.

However, I'll check the logic that skips the tour if the first step is missing and I could change it if it doesn't break anything else.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jjordy picture jjordy  路  3Comments

dshuvalov picture dshuvalov  路  6Comments

snlhnk picture snlhnk  路  5Comments

leantide picture leantide  路  5Comments

SamSunani picture SamSunani  路  4Comments