[release/8.0-preview1] Tweak modal sizing #627
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #513. This fix is just for Preview1 since we've already moved on from the modals in main. Making as minimal of a change as possible to address the issue.
Instead of making the dialog width automatic based on its content, and locking the content to a specific width (1000px), we invert that and lock the dialog width to 1000px and set the grid container to size to 100% of its container. This handles the default scenario of resizing the browser window when you have not resized any of the columns in the grid.
There's a second scenario similar to what's shown in the window where you resize the grid columns. This also resizes the grid and allows it to be wider than the dialog. The user can get themselves into a situation where they made the column so large they can't see the resize grab handles anymore to make it smaller again (in addition to the rendering looking like it does in #513). A second variant of this happens when the header text is too wide even after wrapping. For that, we change the dialog to allow horizontal scrolling.
If we were keeping the modals, we'd probably want to do more to make the resizing more adaptive to smaller screens. But this is just a small fix to prevent the bad rendering seen in #513.
Without wide header text or grid resizing:
With wide header text:
With grid columns resized: