-
Notifications
You must be signed in to change notification settings - Fork 523
Description
Hi,
In version 5.x.x, the behavior of the next() method has changed compared to 4.x.x when the next showcase widget is not rendered in the widget tree. Instead of closing the showcase, it continues advancing through non-existent steps. Additionally, it’s no longer possible to access key.currentContext or key.currentWidget from keys passed to Showcase.withWidget, which previously allowed detecting whether a widget was rendered.
Steps to reproduce the behavior:
- Create a showcase flow with 4 steps
- Render only steps 1 and 2 in the widget tree (steps 3 and 4 are not built yet)
- Start the showcase and move to step 2
- Call next()
Observed behavior:
- The showcase does not close
- It stays on step 2
- Pressing next again behaves as if moving to step 3
- Pressing next again behaves as if moving to step 4
- Only after that does the showcase close
Expected behavior
In version 4.x.x, when next() was called and the next showcase widget was not rendered, the showcase and barrier were automatically closed.
I expected the same behavior in 5.x.x, or at least a way to detect whether the next widget exists before advancing.
Additional context
In 4.x.x it was possible to check (even with the widgets that are rendered) sampleKey.currentContext sampleKey.currentWidget, where sampleKey is the key passed into Showcase.withWidget
