Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Behavior change in next() method between 4.x.x and 5.x.x when next showcase widget is not rendered #633

@aydemir-a

Description

@aydemir-a

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:

  1. Create a showcase flow with 4 steps
  2. Render only steps 1 and 2 in the widget tree (steps 3 and 4 are not built yet)
  3. Start the showcase and move to step 2
  4. 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.

Screenshots
Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions