iTwin / iTwinUI

A design system for building beautiful and well-working web interfaces.
https://itwin.github.io/iTwinUI/
MIT License
92 stars 35 forks source link

Fix `InformationPanel` size on `orientation` change #1964

Closed Ben-Pusey-Bentley closed 4 weeks ago

Ben-Pusey-Bentley commented 1 month ago

Changes

Fixes an issue with the InformationPanel component where resizing the component and then changing the orientation would maintain the resized dimensions in a way that broke the intended style of the panel. This was fixed by adjusting the state logic so that only part of the style of the panel is effected by the state, dependent on the value of orientation. width is only applied when the orientation is vertical, and height is only applied when the orientation is horizontal.

Testing

Tested in the vite playground to make sure the fix works. Ran react visual and unit tests to make sure there were no unintended changes. Also added e2e test for this issue.

Docs

Added patch changeset to @itwin/itwinui-react.