Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Resizing of Storybook Panel doesn't always apply #25759

Closed
vanessayuenn opened this issue Jan 25, 2024 · 2 comments · Fixed by #26460
Closed

[Bug]: Resizing of Storybook Panel doesn't always apply #25759

vanessayuenn opened this issue Jan 25, 2024 · 2 comments · Fixed by #26460

Comments

@vanessayuenn
Copy link
Contributor

vanessayuenn commented Jan 25, 2024

Describe the bug

Project: Bitwarden (Angular)
Version: 8.0.0-alpha.13
Bug/feedback: Resizing of Storybook Panel doesn't always apply
Tested Browser: Edge (but also encountered it in Chrome a while ago)

When the panel is resized fast, the changes aren't always applied:

Aufzeichnung.2024-01-23.153723.mp4

To Reproduce

  1. Go to https://stackblitz.com/edit/github-t8esdj?file=.storybook%2Fmanager.jsx
  2. Open the Primary Button Story.
  3. Try to resize the Storybook Panel fast

System

No response

Additional context

No response

@vanessayuenn vanessayuenn changed the title [Bug]: [Bug]: Resizing of Storybook Panel doesn't always apply Jan 25, 2024
@brielle5810
Copy link

Hi! Could I try and take this on?

@vanessayuenn
Copy link
Contributor Author

@brielle5810 of course! PR is very welcome! If this is your first contribution, be sure to check the contribution guide and hop onto the Storybook Discord if you need any help getting started. Looking forward to your contribution! ✨

jorge-ji added a commit to jorge-ji/storybook that referenced this issue Mar 12, 2024
When trying to resize any panel too fast, the changes would not be applied.
The fix was done by changing a comparison condition in "useLayoutEffect()". Instead of using a variable ("prevManagerLayoutStateRef") that was also modified by another function ("useEffect()") that could execute at the same time, it now uses a variable that is only modified by the own function, making it so that the supposed layout values are not changed after they are set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants