Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Document window and panel window should have a minimum width. #998

Closed
pthiess opened this issue Jun 4, 2012 · 14 comments
Closed

Document window and panel window should have a minimum width. #998

pthiess opened this issue Jun 4, 2012 · 14 comments

Comments

@pthiess
Copy link
Contributor

pthiess commented Jun 4, 2012

Steps to reproduce:

1 Open Brackets
2 Grab the frame in order to resize the app window.
3 Minimize the width

Results:
Minimum width obviously is set by native controls (Mac), the document window can completely disappear, which doesn't seem useful. I'm on the fence whether this should be medium or low priority, set it as low priority for now.

Expected: I'm not sure.

Should we at least show the menu in a single line? A minimum height may also be useful.

@pthiess
Copy link
Contributor Author

pthiess commented Jun 6, 2012

Reviewed

@peterflynn
Copy link
Member

Is there any particular value in doing this? If the user doesn't want their window very tiny, they won't resize it to be that small -- and conversely, if the user explicitly wants a window or panel very small for some reason, why shouldn't we let them do that? Most other apps don't seem to restrict window size, at least.

@redmunds
Copy link
Contributor

One reason is that making either the editor or sidebar width to be less than a certain threshold causes layout to reflow in ridiculous ways. The sidebar is no longer too bad in this regard, but the editor header gets really bad.

Another reason is that after sizing some views to zero, the thing you grabbed to size them down is no longer there to size them back up.

@njx
Copy link

njx commented Oct 31, 2012

Actually, many of the apps on my Mac have a minimum horizontal window size--Chrome and Sublime both do, for example. I think it's reasonable to have a small but non-zero minimum.

@redmunds
Copy link
Contributor

@peterflynn was reviewing a pull request (adobe/brackets-shell#193) that implemented this, so re-assigning to him.

@ghost ghost assigned peterflynn Feb 15, 2013
@jaye773
Copy link

jaye773 commented Jun 6, 2013

has this been fixed? It seems there is a min width, but that does not include the document window. If this is still open I'd like to have a crack at it.

@njx
Copy link

njx commented Jun 6, 2013

Nope, hasn't been fixed yet. This would need to be fixed in the native shell, I believe. @larz0 might have an opinion about what the minimum window width should be.

@larz0
Copy link
Member

larz0 commented Jun 6, 2013

@njx Here are the various minimum sizes of various OS X apps. Brackets obviously needs a minimum size (window next to the Terminal).

I recommend 600x360 which is close to the Messages app because Brackets has a sidebar.

Thoughts?

screen shot 2013-06-06 at 1 54 15 pm

@jaye773
Copy link

jaye773 commented Jun 10, 2013

I see that mynetx has fixed this problem. He has set the min height and min width to 450 and 300. Was something wrong with his code or was it just not integrated into brackets?

His fix is below.
ZweiSteinSoft/brackets-shell@7babc14

@peterflynn
Copy link
Member

Fwiw, I'd vote for a lower minimum. To me it feels heavy-handed to physically prevent users from ever resizing a window below 600px wide. Especially on a laptop screen, that's not all that narrow.

Maybe this is a difference in Mac/Win platform expectations, but on Windows I feel like most apps don't restrict window size so heavily. I can resize Outlook down to 135x150; Chrome goes down to 193x113; Notepad goes down to a miniscule 131x38; and folder windows go down to 160x240.

The Reflow window in the screenshot above goes down to 375x202; they have a sidebar and are a close cousin to Brackets/Edge Code, so we could follow that precedent.

@larz0
Copy link
Member

larz0 commented Aug 22, 2013

@peterflynn 375x202 sounds good.

@mackenza
Copy link
Contributor

fwiw this seems to be more of a Mac thing than a Windows thing. Here is a quick result from my testing of what I consider "common" or "popular" Windows apps.

Tested on Windows 7

  • Google Chrome 32 - min size = 442x106, just enough to see the leftmost tabs and toolbar items no document visible
  • Microsoft Word 2010 - no min size
  • Microsoft Excel 2010 - no min size
  • Adobe Reader X v.10.1.0 - no min size
  • Paint.Net v4 (good example of current MS.Net app) - no min size
  • Windows Explorer file window - min size 161x243 (just enough to be able to access address bar)
  • Apple iTunes 11.1.5.5 - min size 842x550!! (seemingly arbitrary size)

So the only one that won't let you shrink to nothing or a very small size is... an Apple product ;)

BTW, I think this might have been fixed and not closed because on Windows 7 with Sprint 37, I get a min window size for Brackets of: 390x200

Personally, this seems like it could be even smaller or none but it's not terrible the way it is.

@basarat
Copy link

basarat commented Apr 11, 2014

I think this might have been fixed and not closed because on Windows 7 with Sprint 37, I get a min window size for Brackets of: 390x200

Same results for me on windows 8. This is as small as I could drag it:
image

@peterflynn
Copy link
Member

Closing since it appears that the new dark shell already enforces the bounds the way we want -- @M0J0R1S1NG & @basarat, thanks for confirming!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants