pharos icon indicating copy to clipboard operation
pharos copied to clipboard

Storybook: Component state change doesn't sync back to Storybook control in some stories

Open daneah opened this issue 1 year ago • 0 comments

Expected behavior When I update the state of a component that is controlled by a Storybook control by interacting with the component directly, the state in the control is also updated.

Actual behavior Interacting with some components, such as the Modal or the Sidenav, can change the state of the component without changing the state of the Storybook control.

Steps to reproduce the issue

  1. Visit https://pharos.jstor.org/storybooks/wc/?path=/story/components-sidenav--base
  2. Open the Controls pane
  3. Change the open state to true
  4. Observe the Sidenav opens
  5. Close the Sidenav using its close button
  6. Observe the open state remains true

Screenshots or code If applicable, add screenshots or code to help explain the issue.

Pharos version 14.0.0

Additional information This is very likely an issue with our Storybook integration rather than with the components or Storybook itself. We can probably do something like trigger an action so that the controls update when the component is changed. We may even have examples where we already do this.

daneah avatar Mar 08 '24 21:03 daneah