gilbarbara / react-joyride

Create guided tours in your apps
https://react-joyride.com/
MIT License
6.8k stars 525 forks source link

Overlay flashes if in controlled mode, and next is outside the regular flow #918

Closed scottwarren closed 6 months ago

scottwarren commented 1 year ago

🐛 Bug Report

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

In controlled mode, have a button outside the default tooltip that has a delay before going to the next step

Expected behavior

A clear and concise description of what you expected to happen.

Overlay should not flicker

Link to repl or repo (highly encouraged)

Please provide a https://codesandbox.io/ demo or similar.

https://codesandbox.io/s/react-joyride-overlay-flickering-bug-forked-mh25rm?file=/src/App.js

Issues without a reproduction link are likely to stall.

Run npx envinfo --system --binaries --npmPackages react-joyride

Paste the results here:


  System:
    OS: macOS 13.3.1
    CPU: (8) arm64 Apple M1
    Memory: 79.48 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
    npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm
  npmPackages:
    react-joyride: 2.5.4 => 2.5.4
scottwarren commented 1 year ago

As a note, this app isn't using React.StrictMode

Ivan-dev-RED commented 1 year ago

Same problem,,, But it works even if there is no delay before the step AND React.StrictMode exists!

Ivan-dev-RED commented 1 year ago

@gilbarbara Do you have any ideas? May be we need to install some package?

Ivan-dev-RED commented 1 year ago

This is fucking bullshit... On build it works correctly. Why does it flicking in development mode? I wasted some hours of my life on this crap...

gilbarbara commented 1 year ago

@Ivan-dev-RED

There's no need to be aggressive. If you don't like this library, just create your own.

scottwarren commented 11 months ago

@scottwarren have you found the fix?

No, although I did manage to figure out a work around, I implemented my own overlay that I control which is in sync with which step is currently showing

gilbarbara commented 11 months ago

Hey @juniorforlife Nope, and I won't be able to work with this for the foreseeable future.

gilbarbara commented 6 months ago

I've refactored how the Overlay is rendered to prevent any flickering. It's available in v2.8.0

scottwarren commented 6 months ago

Thank you very much :-)