brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Prevent modal dialog from exceeding window height #6056

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by redmunds Tuesday Jan 28, 2014 at 02:56 GMT Originally opened as https://github.com/adobe/brackets/pull/6665


This is for #6395.

I've seen this when I don't remember a modal dialog exceeding window height, so there may be other causes.

The problem is that sidebar gets stretched out-of-shape but doesn't get refreshed properly. This fix prevents modal dialogs from stretching window out-of-shape.

I think problem with sidebar not getting refreshed properly is because its layout is not pure CSS (i.e. uses JS). For some reason modal dialog exceeding window height does not trigger resize events. This is probably because modal dialog is inside a display:table and/or position:relative/absolute container.


redmunds included the following code: https://github.com/adobe/brackets/pull/6665/commits

core-ai-bot commented 3 years ago

Comment by JeffryBooher Tuesday Jan 28, 2014 at 23:52 GMT


Shouldn't we also constrain dialog width? If I make the app more narrow the same problem occurs...

core-ai-bot commented 3 years ago

Comment by JeffryBooher Wednesday Jan 29, 2014 at 00:18 GMT


There are 2 scrollbars right next to each other in the case of the extension manager which provides list of extensions with a scrollbar. Looks funky. May be solvable with a UI treatment from@larz0

If I resize the app after a dialog appears to make it larger then the dialog doesn't resize which is unexpected.

LIkewise, if i resize the app to make it smaller after the dialog appears I don't get the scrollbars.

If I get scrollbars on the dialog because it's bigger than the main window and make the window smaller aftewards then the scrollbars don'w scroll to the new window extent.

Resizing the app after the dialog appears then launching a subdialog causes the app to do some funky redrawing:

image

core-ai-bot commented 3 years ago

Comment by JeffryBooher Wednesday Jan 29, 2014 at 00:23 GMT


@redmunds done with initial review.

Not sure if we should merge this until we talk about the issues with@larz0. Some of these issues could be addressed by disabling resizing the app while in a modal state.

Too bad we can't get native style dialogs that don't need to constrain to the size of the app window. Not sure if that would be helpful on the Mac though -- Modal Sheets still constrain to the app size but most apps usually have modal sheets that are small enough and app minimum size constraints that deal with that problem.

core-ai-bot commented 3 years ago

Comment by redmunds Wednesday Jan 29, 2014 at 01:29 GMT


@JeffryBooher Pushed changes to:

This works much better even with nested modal dialogs. You can start with main window larger than modal dialog then resize so it's smaller than modal, and also the opposite. Let me know if you find any other weird cases.

core-ai-bot commented 3 years ago

Comment by JeffryBooher Thursday Jan 30, 2014 at 01:07 GMT


Looks good. All tests pass. Merging