Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3eYQ-00085L-D7 for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Apr 2018 09:18:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3eYN-0001M5-PP for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Apr 2018 09:18:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3eYN-0001Lv-IU for pgadmin-hackers@lists.postgresql.org; Wed, 04 Apr 2018 09:18:03 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f3eYJ-0000eg-EI for pgadmin-hackers@postgresql.org; Wed, 04 Apr 2018 09:18:02 +0000 Received: by mail-wr0-x244.google.com with SMTP id c24so21424275wrc.6 for ; Wed, 04 Apr 2018 02:17:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xsDOceA65JwE4pfaLScbdjjzunJOwhjB3oMz7hF3cVw=; b=JnoPj+N5kggzzUQ9GaXHZsFAoWmKiRaHGJj2PMU5CeOaJBJzfRW0K3VYqizIkERu4i V+ZFmgrTI8F1Ig3JSAr7ssukHDoPqmDFsfx3q9zLUqmY+MUAUuTHOL+2tUClEjp1D55A xiq3kuIkMhvPOKIHxNNW1IOyTOoTZPLhjwBDUpVYRRZ1KptMtKkTRkV73UZcmj6y/i8h nxZHMjylAjFbcONsN3mLy/ykVF5O/46D3MgEgQjuxrigk39y2Vr2WlhDNpeT0LWQD3Eo M2LozIDPkji432ivw8c17WEM2YtV7nmsUOrstur8zVEdi4SoMYiYBJbobhKHYFAqDchO 3miw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xsDOceA65JwE4pfaLScbdjjzunJOwhjB3oMz7hF3cVw=; b=CmFz3Rs8ME079vOTkcmNvKw6JGF9rM/J26d1tUjEVE5S8MWT2BZ2CZGkZWur+Qv1NR z5VQjTiPw7Cpsxo8HMWqPZiRjwZiNMTlai7w3fL/cLFILj42VJtVWxO0poQvFBx27FxG MIliX0EtlRvUGZ7GftaElSaT4s7G9IAwPY+HbxMcKh8zymQdAwYr19T+PzEdNjrHSOnS ULaqilajpquAgu66CpkGS/LLdZwCagYe9YbunMdy4jslWQZ1gdkvaL2ZIRYsir246NOE 3GxwAwPgyLNu82GFoa+/tQ0tTV2wonG4yomFuqdqxHr/pJlhN0WJkhU4U8EcP5vETVQc nkgQ== X-Gm-Message-State: ALQs6tBfBmxYxXwYA9sSwtJYVZLzXZYBwlY0BWCK3TtZ4oublbVRiUVK eptKAk5hnoa1K8u26oIOIT4BHCf1qWoMxBsJvTziFA== X-Google-Smtp-Source: AIpwx4+ZFTfRLoRB8U9zjXNKPSrlBipH0Mj9+BVpSypV0Wrlzwe1QRhe3vGB3pso0v6mhBN5bJeVGmAZ2nKdKgWzdvo= X-Received: by 10.223.196.212 with SMTP id o20mr12158186wrf.144.1522833478056; Wed, 04 Apr 2018 02:17:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.69.220 with HTTP; Wed, 4 Apr 2018 02:17:57 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Wed, 4 Apr 2018 10:17:57 +0100 Message-ID: Subject: Re: [pgAdmin4][RM#3155] Allow user to lock the Layout To: Murtuza Zabuawala Cc: Joao De Almeida Pereira , pgadmin-hackers Content-Type: multipart/alternative; boundary="f403045f7dbc83107d0569024c6c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f403045f7dbc83107d0569024c6c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 4, 2018 at 7:20 AM, Murtuza Zabuawala < murtuza.zabuawala@enterprisedb.com> wrote: > Hi Dave, > > On Tue, Apr 3, 2018 at 9:03 PM, Dave Page wrote: > >> Hi >> >> On Tue, Apr 3, 2018 at 12:56 PM, Murtuza Zabuawala < >> murtuza.zabuawala@enterprisedb.com> wrote: >> >>> Hi, >>> >>> Thanks Joao for reviewing. >>> >>> PFA updated patch. >>> >>> On Tue, Apr 3, 2018 at 1:11 AM, Joao De Almeida Pereira < >>> jdealmeidapereira@pivotal.io> wrote: >>> >>>> Hello, >>>> >>>> On Mon, Apr 2, 2018 at 10:07 AM Murtuza Zabuawala < >>>> murtuza.zabuawala@enterprisedb.com> wrote: >>>> >>>>> >>>>> =E2=80=8BHello, >>>>> >>>>> Please find updated patch, >>>>> >>>>> Now layout will be locked after user updates its preferences, w >>>>> e have used =E2=80=8B >>>>> templated variable in the javascript file >>>>> =E2=80=8B because we do not have preference module or preference cach= e >>>>> available when the page loads and panels gets rendered, >>>>> =E2=80=8BI >>>>> =E2=80=8B also >>>>> made changes in JS tests as per Joao's review comments. >>>>> >>>> Looks like everything is working when we change the lock. >>>> As a personal preferences I would prefer to see this in at least 2 >>>> commits, one that is related to the preference issue and another one t= hat >>>> is related to this story. >>>> >>>> >>>> All the tests are working, but he linter is failing: >>>> >>>> /tmp/build/4a5630c2/pivotal-rm-3155/web /tmp/build/4a5630c2 >>>> >>>> ./pgadmin/misc/__init__.py:78: [E303] too many blank lines (2) >>>> >>>> 1 E303 too many blank lines (2) >>>> >>>> >>>> 1 >>>> >>> =E2=80=8BFixed=E2=80=8B >>> >>> >>>> >>>> >>>>> @Dave/Pivotal team, >>>>> The given patch is working fine for all the Tabs/Panels (all the >>>>> panels from main window as well as from Query tool and Debugger) but = I'm >>>>> facing an issue while handling the Browser tree section, It is a wcDo= cer >>>>> frame and not a = wcDocker >>>>> panel . Like >>>>> wcDocker panel, wcDocker frame do not provide any API so that a devel= oper >>>>> can prevent drag-drop functionality on it. >>>>> >>>> >> It's not working fine for me. For example, if I put the SQL Panel on it'= s >> own below the properties/stats panels (so it looks like pgAdmin 3 used t= o >> by default), and then lock the layout, I can un-dock the SQL panel into = a >> dialogue, but then cannot re-dock it. I can do weird things with the >> browser tree as well, probably because it's a frame as you say. >> > > =E2=80=8BThat is expected behaviour =E2=80=8Bbecause once you drag the pa= nel out of the > group of Panels then it becomes individual Frame, That is what the author > of the wcDocker replied on my question, > *"A panel must either be initialized as movable or non-movable from the > beginning and never changed because it generates a different arrangement = of > elements depending. This feature should only ever be used within the > onCreate method of the panel. I should probably have been more clear abou= t > this limitation in the documentation."* > > So does it become a panel again if a second panel is added to the new tab group? There must be some way we can lock a tab that's not part of a group. --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --f403045f7dbc83107d0569024c6c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Apr 4, 2018 at 7:20 AM, Murtuza Zabuawala <= ;mu= rtuza.zabuawala@enterprisedb.com> wrote:
Hi Dave,

On Tue, Apr 3, 2018 at 9:03= PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On T= ue, Apr 3, 2018 at 12:56 PM, Murtuza Zabuawala <murtuza.z= abuawala@enterprisedb.com> wrote:
Hi,

Thanks Joao for reviewing.
<= div style=3D"font-family:verdana,sans-serif;color:rgb(68,68,68)">
=
PFA updat= ed patch.

On Tue, Apr 3, 2018 at 1:11 AM, Joao D= e Almeida Pereira <jdealmeidapereira@pivotal.io> = wrote:
Hello,

On Mon, Apr 2, = 2018 at 10:07 AM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com= > wrote:
=

=E2=80=8BHello,
<= font size=3D"2">
=
Please find upd= ated patch,=C2=A0
Now layout will b= e locked after user updates its preferences, w
e have used =E2=80=8B
<= /div>
templated variable in the javascript file=
=E2=80=8B because we do not have preference modul= e or preference cache available when the page loads and panels gets rendere= d,=C2=A0
=E2=80=8BI
=E2=80=8B also=C2=A0
made changes in JS t= ests as per Joao's review comments.
Looks like everythin= g is working when we change the lock.
As a personal preferences I= would prefer to see this in at least 2 commits, one that is related to the= preference issue and another one that is related to this story.
=

All the tests are working, but he linter is f= ailing:
/tmp/build/4a5630c2/piv=
otal-rm-3155/web /tmp/build/4a5630c2
./pgadmin/mi= sc/__init__.py:78: [E303] too many blank lines (2)
1 E= 303 too many blank lines (2)=C2=A0
1=C2=A0
<= div>
=E2=80=8BFixed=E2=80=8B
=C2=A0


@Dave/Pivotal team,
The given patch is working fine for all the Tabs/= Panels (all the panels from main window as well as from Query tool and Debu= gger) but I'm facing an issue while handling the Browser tree section, = It is a wcDocer frame and not a wcDocker panel.=C2=A0Li= ke wcDocker panel, wcDocker frame do not provide any API so that a develope= r can prevent drag-drop functionality on it.
<= /div>

It's not = working fine for me. For example, if I put the SQL Panel on it's own be= low the properties/stats panels (so it looks like pgAdmin 3 used to by defa= ult), and then lock the layout, I can un-dock the SQL panel into a dialogue= , but then cannot re-dock it. I can do weird things with the browser tree a= s well, probably because it's a frame as you say.
=C2=A0
=E2=80=8BThat is expected behaviour =E2= =80=8Bbecause once you drag the panel out of the group of Panels then it be= comes individual Frame, That is what the author of the wcDocker replied on = my question,=C2=A0
"A panel mu= st either be initialized as movable or non-movable from the beginning and n= ever changed because it generates a different arrangement of elements depen= ding. This feature should only ever be used within the onCreate method of t= he panel. I should probably have been more clear about this limitation in t= he documentation."


So does it become a panel again if a second panel is= added to the new tab group?

There must be some wa= y we can lock a tab that's not part of a group.
=C2=A0
<= /div>--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

Enterprise= DB UK: http://www= .enterprisedb.com
The Enterprise PostgreSQL Company
--f403045f7dbc83107d0569024c6c--