Code Monkey home page Code Monkey logo

Comments (12)

MPLew-is avatar MPLew-is commented on July 17, 2024 1

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.

from desktop.

bb441db avatar bb441db commented on July 17, 2024 1

I think we should just omit this line

minHeight: this.minHeight,
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).

from desktop.

asianjakepaul avatar asianjakepaul commented on July 17, 2024

Have you tried to reproduce this issue with different electron based applications like atom?

from desktop.

ipkpjersi avatar ipkpjersi commented on July 17, 2024

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.

from desktop.

asianjakepaul avatar asianjakepaul commented on July 17, 2024

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.

from desktop.

ipkpjersi avatar ipkpjersi commented on July 17, 2024

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.

from desktop.

asianjakepaul avatar asianjakepaul commented on July 17, 2024

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: 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.

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

The relevant parts to this issue...

  • We set an absolute minimum height and width for Desktop here:

private minWidth = 960
private minHeight = 660

  • We combine this with the remembered values from electron-window-state:

const savedWindowState = windowStateKeeper({
defaultWidth: this.minWidth,
defaultHeight: this.minHeight,
})

  • These are then provided to the Electron BrowserWindow constructor:

const windowOptions: Electron.BrowserWindowConstructorOptions = {
x: savedWindowState.x,
y: savedWindowState.y,
width: savedWindowState.width,
height: savedWindowState.height,
minWidth: this.minWidth,
minHeight: this.minHeight,
show: false,
// This fixes subpixel aliasing on Windows
// 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)

from desktop.

ipkpjersi avatar ipkpjersi commented on July 17, 2024

@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.

from desktop.

ipkpjersi avatar ipkpjersi commented on July 17, 2024

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. πŸ˜ƒ

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

@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.

I'll also call out this comment from desktop#1702

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.

from desktop.

ipkpjersi avatar ipkpjersi commented on July 17, 2024

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.

from desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.