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

retain intrinsic size of draggable `Dialog` #1997

Closed mayank99 closed 2 weeks ago

mayank99 commented 3 weeks ago

Changes

Fixes #1961

The width/height were being explicitly set in an Effect, supposedly to maintain dialog position upon window resize. I'm not sure why that's even desirable, but I've just removed the extrinsic size properties from it, because the size is not required for maintaining position.

As a result, the dialog will continue to retain its intrinsic size until the user attempts to resize it (which for a non-resizable dialog will never happen).

Testing

Added unit test.

Manually verified that the linked issue is fixed.

https://github.com/iTwin/iTwinUI/assets/9084735/93e97a14-d8f5-46f0-982d-be5d80fb0c3a

Docs

Added changeset.