Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgAdmin window gets taller when re-opened (MacOS) #6464

Closed
thomasgodart opened this issue Jun 18, 2023 · 16 comments
Closed

pgAdmin window gets taller when re-opened (MacOS) #6464

thomasgodart opened this issue Jun 18, 2023 · 16 comments
Assignees
Milestone

Comments

@thomasgodart
Copy link

thomasgodart commented Jun 18, 2023

Might or might not be connected with the bug #5755 This ticket is about the MacOS version

Every time we open pgAdmin, its window is taller of the menu height (approximately 29 pixels)

Steps to reproduce the behavior:

  1. Open pgAdmin
  2. Size it at any non fullscreen size, and position it anywhere
  3. Close pgAdmin
  4. Open pgAdmin
  5. Note that the size of the window is now approximately 29 pixels higher than previously, and that its position on screen is also 29 pixels higher

Expected behavior:

The window should reopen having the same size and same position as when it was closed

  • OS: MacOS 13.x
  • Version: 7.x
  • Mode: Desktop
  • Package type: dmg

I use Rectangle to position pgAdmin to the bottom left corner of the screen, Chrome goes to the top left corner and VS Code goes on the right. Developper style

@akshay-joshi
Copy link
Contributor

Not able to reproduce with the latest version, hence closing it.

@akshay-joshi akshay-joshi closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
@thomasgodart
Copy link
Author

Hi @akshay-joshi, which version are you testing?

I'm using the v8.5 dated on the 4th of April 2024, and I can still see the bug, nothing changed.
I'm now using:

  • OS: MacOS 14.4.x
  • pgAdmin version: 8.5
  • Mode: Desktop
  • Package type: dmg

@akshay-joshi
Copy link
Contributor

Reopen again will check the cause again.

@akshay-joshi
Copy link
Contributor

Related #5755

@akshay-joshi akshay-joshi self-assigned this May 2, 2024
@akshay-joshi akshay-joshi added this to the 8.7 milestone May 2, 2024
@akshay-joshi
Copy link
Contributor

This seems to be an NWjs issue 7973.
We will try to fix this by implementing the workaround given in the above mentioned issue.

@thomasgodart
Copy link
Author

I'm guessing that the library reads the window size somewhere wrong as it looks like obtaining the outer window size including the OS margins (for displaying the window borders), then asks the OS for a window with this inner window size, hence growing it of the size of the margins. Or something like that. Generally speaking you can't guess the OS margins as they depend on the version of the OS and on settings by the user (font size, screen size, etc)

@akshay-joshi
Copy link
Contributor

@thomasgodart
Can you please test it on the Snapshot Build

@thomasgodart
Copy link
Author

Thank you @akshay-joshi for your time and efforts to try and fix this.

In this new version "/snapshots/2024-05-08/" the window doesn't expand anymore, but now it shrinks the window height of 22px on every opening. As a comparison, the window title height is 30px. If you need screenshots, I can provide some, feel free to ask.

@akshay-joshi
Copy link
Contributor

Yesterday, when I fixed it and debugged the code, the window height remained consistent after multiple reopenings.
I'll have to check again

@akshay-joshi
Copy link
Contributor

@thomasgodart

I have checked multiple times and cannot reproduce the shrink issue. I have tested it on Mac OSX Sonoma 14.4

@thomasgodart
Copy link
Author

@akshay-joshi Oh, interesting, let me see then.

The previous growing window bug was consistent on a MacBook Pro 14'' and a Mac Mini M2 Pro, so today I didn't double check both environments when I tested the new version, but I should have.

Turns out that the shrinking window bug only appears on the MacBook and not on the Mac Mini, and yet they have (supposedly) the exact same settings config, as far as I know.

@pravesh-sharma pravesh-sharma self-assigned this May 16, 2024
@pravesh-sharma
Copy link
Contributor

Issue fixed. Verified on snapshot build.

Env:
macOS Sonoma 14.4.1 on MacBook Pro 16"

@thomasgodart
Copy link
Author

@pravesh-sharma Thank you for your efforts.

On the Mac Mini M2 Pro, the bug is fixed, same as with the snapshot build 2024-05-08

But on the MacBook Pro 14'' the window is still shrinking, like on the build 2024-05-08 but it looks stronger now, and seems to depend on the window height or vertical position. Screenshot attached after closing a full vertical height window and reopening. It's shrinking on every opening

Capture d’écran 2024-05-16 à 13 04 10

@pravesh-sharma
Copy link
Contributor

Hi @thomasgodart,

I have tested today's snapshot build on my MacBook Pro 16" and did not face any shrinking issue.

@thomasgodart
Copy link
Author

@pravesh-sharma Oh really? Interesting...

So I've tried a few more things:

  • changing the screen resolution... doesn't change the outcome for the shrinking bug
  • plugging the HDMI monitor of the Mac Mini... doesn't change the outcome as well

I've tried to look into the OS settings again but couldn't find anything relevant: font size doesn't affect the bug, icon size doesn't affect it, scrollbars hidden or always there don't affect, etc.

And I run out of ideas now, so if you have any test to have me perform, please send them my way and I will be doing them. Thanks

@pravesh-sharma
Copy link
Contributor

pravesh-sharma commented May 20, 2024

Hi @thomasgodart,

There is nothing much we can do about it as this is an issue with nwjs.
We have implemented a workaround given in the issue discussion. We have to wait for nwjs to fix it.

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

No branches or pull requests

3 participants