You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
adjust minimum height/width constraints for smaller screen sizes #65
I believe the minimum height is too large for my setup and causes the GitHub Desktop to open up with maximum height on the wrong monitor.
Version
GitHub Desktop: 1.4.0-linux2 (also happened on 1.3.x and earlier) snap
Operating system: Ubuntu 16.04 with Xfce 4.12
Steps to Reproduce
Open GitHub desktop on Ubuntu 16.04 Xfce 4.12 with a 768p screen with a 48 pixel tall bottom panel/bar/dock and a 30 pixel tall top panel/bar/dock (whatever you want to call it)
It now opens on my second monitor (a 1080p screen)
Expected Behavior
I expect it to open minimum size for height and width as it does on two 1080p monitors.
Actual Behavior
The minimum height of GitHub desktop is too large. Is there any way to decrease the minimum height - even if just for the Linux port, or maybe upstream? Or, perhaps fixing it so that it opens with the correct minimum height on my second monitor? I am not sure if this issue belongs upstream or in the Linux port.
Keep in mind, when I launch GitHub desktop with my mouse on my second (1080p) screen, the minimum height and width are what they should be - it is only when I keep my mouse on my primary (768p) screen that the height becomes maximum.
Sorry for my very strange use-case, but, these things happen in life.
Here are some (horizontally cropped to redact info) pictures that show what I am talking about.
Here is an example of the issue I am talking about:
Here is what it should look like:
Notice the 713px height instead of the 1080px height.
I have not. However, this is only really particularly an issue for me on GitHub Desktop as I start Atom maximized - I understand that may be useful troubleshooting information.
Can you test this with atom, I doubt this is an issue in github desktop but more like an electron issue or even your desktop environment / window manager.
I am not sure if I will be able to effectively test this with Atom - Atom doesn't have a minimum size like GitHub Desktop does - if GitHub Desktop reduced the minimum size (or removed it altogether) - it would likely solve this issue for me entirely, since it would fit on my second monitor and I believe this would not be an issue anymore since it would save the dimensions. I cannot resize GitHub Desktop smaller than 714 pixels tall which I believe is what causes this issue.
I didn't notice github desktop always starts with a height of 960px, It looks like there is an API for getting primary screen size, not sure if this should only be in the linux fork.
My personal preference for a fix would be to launch the app using the last window state, for example if you close the window with height: 600, width: 1000 it would use those values the next time it launches.
Best would be to fix this upstream, I guess there are windows and osx user's that could benefit from this feature.
// See https://github.com/atom/atom/commit/683bef5b9d133cb194b476938c77cc07fd05b972
backgroundColor: '#fff',
webPreferences: {
// Disable auxclick event
// See https://developers.google.com/web/updates/2016/10/auxclick
disableBlinkFeatures: 'Auxclick',
// Enable, among other things, the ResizeObserver
experimentalFeatures: true,
},
acceptFirstMouse: true,
}
The last time I looked at these values it was related to desktop#4320 (comment) which was in reference to Aero Snap on Windows (which lets you easily move a window to a quarter of the screen) and we talked about the downsides of just relaxing this constraint here: desktop#1702 (comment)
@asianjakepaul The app does launch with the last window state - the problem is, with the minimum height being set to what it is, I can't set it to small enough that it doesn't cause this issue.
@shiftkey Is this something you might be willing to fix? Perhaps you could leave the default size (on very first launch before it is resized) the same but decrease the minimum height? This might be more common than you think, since it does happen on 768p monitors - and there's a surprising number of laptops with 1366x768.
As another use case that is currently being prevented by the sizing being what it is, it's difficult to use the app on a MacBook Pro 13" with effective resolution of 1680x1050; I would prefer to have my screen split to left and right halves, meaning I would want GitHub Desktop to be 840 pixels wide, which is prevented by the current configuration.
@shiftkey Is this something you might be willing to fix?
@ipkpjersi changing numbers around isn't hard, but I don't really have the bandwidth or right setup to dig into this currently. I'd love for someone who is actually feeling this pain to dig into it and suggest a way forward.
While I could see us perhaps allowing a slightly lower minimum height (say ~600) the current values were definitely chosen deliberately to work on the absolute majority of our users screens while guaranteeing us the screen real-estate we need and are going to need for the features we're planning.
So what I'd love to see from someone affected by this issue:
propose a new minimum height/width default for the app, and how you came to that conclusion
build the app from source with these new values. The setup instructions will help with this.
testing out locally what the app looks like at this new minimum size in the changes tab (so you see the list of files and the diff). Does that feel like enough space for the app? Can you share a screenshot or two of things so others can follow along?
test out the app in the history view when comparing a feature branch to your default branch. Again, does it feel like there's enough space? Can you share some screenshots too?
Rather than just changing values and having to go through lots of testing to uncover the impact, having someone do this now will give us an idea of the overall impact to reducing the minimum dimensions of the app. And if we feel like shipping some Linux-specific builds to test this we can do this out of band and get even more insight before we take this upstream.
it will still launch with a height of 660, but users are at least able to resize the window to something that fits their screen (right now its 660 and not resizable).
That seems like a great idea, making it resizeable below that minimum height would fix this issue because then I could resize it to below the minimum height after launching it and then it would save that height for any launches after that - which would fix the problem.
changed the title [-]Opening GitHub Desktop on 768p monitor forces it to open maximum height on 1080p monitor[/-][+]adjust minimum height/width constraints for smaller screen sizes[/+]on Nov 2, 2018
Activity
asianjakepaul commentedon Sep 22, 2018
Have you tried to reproduce this issue with different electron based applications like atom?
ipkpjersi commentedon Sep 22, 2018
I have not. However, this is only really particularly an issue for me on GitHub Desktop as I start Atom maximized - I understand that may be useful troubleshooting information.
asianjakepaul commentedon Sep 22, 2018
Can you test this with atom, I doubt this is an issue in github desktop but more like an electron issue or even your desktop environment / window manager.
ipkpjersi commentedon Sep 22, 2018
I am not sure if I will be able to effectively test this with Atom - Atom doesn't have a minimum size like GitHub Desktop does - if GitHub Desktop reduced the minimum size (or removed it altogether) - it would likely solve this issue for me entirely, since it would fit on my second monitor and I believe this would not be an issue anymore since it would save the dimensions. I cannot resize GitHub Desktop smaller than 714 pixels tall which I believe is what causes this issue.
asianjakepaul commentedon Sep 22, 2018
I didn't notice github desktop always starts with a height of 960px, It looks like there is an API for getting primary screen size, not sure if this should only be in the linux fork.
https://github.com/electron/electron/blob/master/docs/api/screen.md
My personal preference for a fix would be to launch the app using the last window state, for example if you close the window with
height: 600, width: 1000it would use those values the next time it launches.Best would be to fix this upstream, I guess there are windows and osx user's that could benefit from this feature.
shiftkey commentedon Sep 23, 2018
The relevant parts to this issue...
desktop/app/src/main-process/app-window.ts
Lines 21 to 22 in a0e25e0
electron-window-state:desktop/app/src/main-process/app-window.ts
Lines 32 to 35 in a0e25e0
BrowserWindowconstructor:desktop/app/src/main-process/app-window.ts
Lines 37 to 56 in a0e25e0
The last time I looked at these values it was related to desktop#4320 (comment) which was in reference to Aero Snap on Windows (which lets you easily move a window to a quarter of the screen) and we talked about the downsides of just relaxing this constraint here: desktop#1702 (comment)
ipkpjersi commentedon Sep 23, 2018
@asianjakepaul The app does launch with the last window state - the problem is, with the minimum height being set to what it is, I can't set it to small enough that it doesn't cause this issue.
@shiftkey Is this something you might be willing to fix? Perhaps you could leave the default size (on very first launch before it is resized) the same but decrease the minimum height? This might be more common than you think, since it does happen on 768p monitors - and there's a surprising number of laptops with 1366x768.
MPLew-is commentedon Sep 24, 2018
As another use case that is currently being prevented by the sizing being what it is, it's difficult to use the app on a MacBook Pro 13" with effective resolution of 1680x1050; I would prefer to have my screen split to left and right halves, meaning I would want GitHub Desktop to be 840 pixels wide, which is prevented by the current configuration.
ipkpjersi commentedon Sep 24, 2018
I am glad to see it's not just me having issues with this, hopefully that means it will be more likely for this to get fixed. 😃
shiftkey commentedon Sep 24, 2018
@ipkpjersi changing numbers around isn't hard, but I don't really have the bandwidth or right setup to dig into this currently. I'd love for someone who is actually feeling this pain to dig into it and suggest a way forward.
I'll also call out this comment from desktop#1702
So what I'd love to see from someone affected by this issue:
Rather than just changing values and having to go through lots of testing to uncover the impact, having someone do this now will give us an idea of the overall impact to reducing the minimum dimensions of the app. And if we feel like shipping some Linux-specific builds to test this we can do this out of band and get even more insight before we take this upstream.
bb441db commentedon Sep 24, 2018
I think we should just omit this line
desktop/app/src/main-process/app-window.ts
Line 43 in 6621825
660, but users are at least able to resize the window to something that fits their screen (right now its 660 and not resizable).ipkpjersi commentedon Sep 25, 2018
That seems like a great idea, making it resizeable below that minimum height would fix this issue because then I could resize it to below the minimum height after launching it and then it would save that height for any launches after that - which would fix the problem.
[-]Opening GitHub Desktop on 768p monitor forces it to open maximum height on 1080p monitor[/-][+]adjust minimum height/width constraints for smaller screen sizes[/+]