public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] ui: fix zero-sized panels on fresh chrome start
@ 2023-11-20  8:02 Dominik Csapak
  2023-11-20  8:07 ` Dominik Csapak
  2023-11-20  9:15 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 5+ messages in thread
From: Dominik Csapak @ 2023-11-20  8:02 UTC (permalink / raw)
  To: pve-devel

it seems in new versions of chrome , this triggers too early on a fresh
start (when autostarting a pve tab), resulting in the
'viewWidth'/'viewHeight' being zero pixels. This means we set the width
of the left and the height of the bottom panel to zero pixels, making
them functionally invisible.

To prevent that, check that the 'viewWidth'/'viewHeight' is big enough
so that the panels still have least 50 pixels left before setting their
size.

reported on the pve-user list:
https://lists.proxmox.com/pipermail/pve-user/2023-November/017292.html

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
this plaged me for at least a week, but it seems no one else ran into
this, so i blamed my local install, until the report on pve-user

we should probably backport this to stable-7, can send a separate fix
should it not cleanly apply/be cherry-pickable

 www/manager6/Workspace.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index 6e465f8d..89ca47b7 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -485,7 +485,7 @@ Ext.define('PVE.StdWorkspace', {
 		    listeners: {
 			resize: function(panel, width, height) {
 			    var viewWidth = me.getSize().width;
-			    if (width > viewWidth - 100) {
+			    if (width > viewWidth - 100 && viewWidth > 150) {
 				panel.setWidth(viewWidth - 100);
 			    }
 			},
@@ -506,7 +506,7 @@ Ext.define('PVE.StdWorkspace', {
 		    listeners: {
 			resize: function(panel, width, height) {
 			    var viewHeight = me.getSize().height;
-			    if (height > viewHeight - 150) {
+			    if (height > viewHeight - 150 && viewHeight > 200) {
 				panel.setHeight(viewHeight - 150);
 			    }
 			},
-- 
2.30.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH manager] ui: fix zero-sized panels on fresh chrome start
  2023-11-20  8:02 [pve-devel] [PATCH manager] ui: fix zero-sized panels on fresh chrome start Dominik Csapak
@ 2023-11-20  8:07 ` Dominik Csapak
  2023-11-20  8:26   ` Thomas Lamprecht
  2023-11-20  9:15 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 1 reply; 5+ messages in thread
From: Dominik Csapak @ 2023-11-20  8:07 UTC (permalink / raw)
  To: pve-devel

On 11/20/23 09:02, Dominik Csapak wrote:
> it seems in new versions of chrome , this triggers too early on a fresh
> start (when autostarting a pve tab), resulting in the
> 'viewWidth'/'viewHeight' being zero pixels. This means we set the width
> of the left and the height of the bottom panel to zero pixels, making
> them functionally invisible.
> 
> To prevent that, check that the 'viewWidth'/'viewHeight' is big enough
> so that the panels still have least 50 pixels left before setting their
> size.
> 
> reported on the pve-user list:
> https://lists.proxmox.com/pipermail/pve-user/2023-November/017292.html


this actually is a different issue, i misunderstood the message
from the user...

anyway it's a problem i can reproduce here quite easily, so
i guess somebody else will trigger it sooner or later

> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> this plaged me for at least a week, but it seems no one else ran into
> this, so i blamed my local install, until the report on pve-user
> 
> we should probably backport this to stable-7, can send a separate fix
> should it not cleanly apply/be cherry-pickable
> 
>   www/manager6/Workspace.js | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
> index 6e465f8d..89ca47b7 100644
> --- a/www/manager6/Workspace.js
> +++ b/www/manager6/Workspace.js
> @@ -485,7 +485,7 @@ Ext.define('PVE.StdWorkspace', {
>   		    listeners: {
>   			resize: function(panel, width, height) {
>   			    var viewWidth = me.getSize().width;
> -			    if (width > viewWidth - 100) {
> +			    if (width > viewWidth - 100 && viewWidth > 150) {
>   				panel.setWidth(viewWidth - 100);
>   			    }
>   			},
> @@ -506,7 +506,7 @@ Ext.define('PVE.StdWorkspace', {
>   		    listeners: {
>   			resize: function(panel, width, height) {
>   			    var viewHeight = me.getSize().height;
> -			    if (height > viewHeight - 150) {
> +			    if (height > viewHeight - 150 && viewHeight > 200) {
>   				panel.setHeight(viewHeight - 150);
>   			    }
>   			},





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH manager] ui: fix zero-sized panels on fresh chrome start
  2023-11-20  8:07 ` Dominik Csapak
@ 2023-11-20  8:26   ` Thomas Lamprecht
  2023-11-20  8:26     ` Dominik Csapak
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Lamprecht @ 2023-11-20  8:26 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 20/11/2023 um 09:07 schrieb Dominik Csapak:
> On 11/20/23 09:02, Dominik Csapak wrote:
>> it seems in new versions of chrome , this triggers too early on a fresh
>> start (when autostarting a pve tab), resulting in the
>> 'viewWidth'/'viewHeight' being zero pixels. This means we set the width
>> of the left and the height of the bottom panel to zero pixels, making
>> them functionally invisible.
>>
>> To prevent that, check that the 'viewWidth'/'viewHeight' is big enough
>> so that the panels still have least 50 pixels left before setting their
>> size.
>>
>> reported on the pve-user list:
>> https://lists.proxmox.com/pipermail/pve-user/2023-November/017292.html
> 
> this actually is a different issue, i misunderstood the message
> from the user...
> 
> anyway it's a problem i can reproduce here quite easily, so

Is this related to:
https://forum.proxmox.com/threads/web-portal-rendering-issues-vivaldi-brower.136636/#post-606233
?




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH manager] ui: fix zero-sized panels on fresh chrome start
  2023-11-20  8:26   ` Thomas Lamprecht
@ 2023-11-20  8:26     ` Dominik Csapak
  0 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2023-11-20  8:26 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox VE development discussion

On 11/20/23 09:26, Thomas Lamprecht wrote:
> Am 20/11/2023 um 09:07 schrieb Dominik Csapak:
>> On 11/20/23 09:02, Dominik Csapak wrote:
>>> it seems in new versions of chrome , this triggers too early on a fresh
>>> start (when autostarting a pve tab), resulting in the
>>> 'viewWidth'/'viewHeight' being zero pixels. This means we set the width
>>> of the left and the height of the bottom panel to zero pixels, making
>>> them functionally invisible.
>>>
>>> To prevent that, check that the 'viewWidth'/'viewHeight' is big enough
>>> so that the panels still have least 50 pixels left before setting their
>>> size.
>>>
>>> reported on the pve-user list:
>>> https://lists.proxmox.com/pipermail/pve-user/2023-November/017292.html
>>
>> this actually is a different issue, i misunderstood the message
>> from the user...
>>
>> anyway it's a problem i can reproduce here quite easily, so
> 
> Is this related to:
> https://forum.proxmox.com/threads/web-portal-rendering-issues-vivaldi-brower.136636/#post-606233
> ?

yes it seems to be the same issue




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] applied: [PATCH manager] ui: fix zero-sized panels on fresh chrome start
  2023-11-20  8:02 [pve-devel] [PATCH manager] ui: fix zero-sized panels on fresh chrome start Dominik Csapak
  2023-11-20  8:07 ` Dominik Csapak
@ 2023-11-20  9:15 ` Thomas Lamprecht
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2023-11-20  9:15 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 20/11/2023 um 09:02 schrieb Dominik Csapak:
> it seems in new versions of chrome , this triggers too early on a fresh
> start (when autostarting a pve tab), resulting in the
> 'viewWidth'/'viewHeight' being zero pixels. This means we set the width
> of the left and the height of the bottom panel to zero pixels, making
> them functionally invisible.
> 
> To prevent that, check that the 'viewWidth'/'viewHeight' is big enough
> so that the panels still have least 50 pixels left before setting their
> size.
> 
> reported on the pve-user list:
> https://lists.proxmox.com/pipermail/pve-user/2023-November/017292.html
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> this plaged me for at least a week, but it seems no one else ran into
> this, so i blamed my local install, until the report on pve-user
> 
> we should probably backport this to stable-7, can send a separate fix
> should it not cleanly apply/be cherry-pickable
> 
>  www/manager6/Workspace.js | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
>

applied, with the link swapped out to the one that's actually a report about
this issue in the forum, thanks!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-20  9:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20  8:02 [pve-devel] [PATCH manager] ui: fix zero-sized panels on fresh chrome start Dominik Csapak
2023-11-20  8:07 ` Dominik Csapak
2023-11-20  8:26   ` Thomas Lamprecht
2023-11-20  8:26     ` Dominik Csapak
2023-11-20  9:15 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal