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 1f3gcy-0000yF-Ng for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Apr 2018 11:30:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3gcx-0004xM-Nx for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Apr 2018 11:30:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3gcx-0004xC-BC for pgadmin-hackers@lists.postgresql.org; Wed, 04 Apr 2018 11:30:55 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f3gct-0003hw-CY for pgadmin-hackers@postgresql.org; Wed, 04 Apr 2018 11:30:54 +0000 Received: by mail-wm0-x233.google.com with SMTP id f125so41503907wme.4 for ; Wed, 04 Apr 2018 04:30:51 -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=Z5iJWokV455SXAKoEscn+Vv6U7tZuzqHDwx6Q1uYvgo=; b=tXesY9UANTd1veG8djBWrcXViEO3zDTZIHsfGSe0HckUMmAGfoZSxE92aqt3nXdyFf nh1whtxaZVBBvUOh6R+5qC386+219LZgq5cA0a0CrRkqqqHDK1BjMF0IbTJtzItsX2fy UTp9UorArGloDxGHGWhPNSvUTlYOULRImIflBtzEWLbcFayr5wLPGrI2U6VaFlzo+nj7 pvRFVKH62Fn/9weNtEzn9wLzx2xkzV3IuBK8y2TlK9cVw4Zd83LUetR+8ssc04VLoxxe 7X8It+1WnNvb3di/fwPVwMj7MD+fkO0ccsjuAN5Nrwmdem39yNaKxuycS1u/+1zSm6qM 26Ag== 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=Z5iJWokV455SXAKoEscn+Vv6U7tZuzqHDwx6Q1uYvgo=; b=F3x5Mr7Cx30pd95bu5hn25xaNbUaAUeaTA64E2sImPdLk6qVpETSwg2VwdbD6Z+8yq Im2a4mES8DiEOP8/pZWtEBNAux+kUtxYz5qv0UafJmgGvYkdLTYiZ5PiIZF0hXDrm2/j eLFd0bHGyQMmqqfyiv55FJVD+dmY7RokTF9UahGXbfHsY23SFCGbWtNQV3WzT8Gz9HJo oC2G3jAk8VDB7KWZwBDScEobOgNL4QO6mGEeBpshomfFMYfK/53s/xWp9md8Hgiqw/om 0wLxtbDwZyuG7TL3+rdH5Q7/NJDh1dexGVErzl5JJvHABvAvB9oh2uXSVlLcuLwio5xK HjMw== X-Gm-Message-State: ALQs6tAMFmoXFRXRwULK8ZquJp76AlR0wuLfVowjyyWaLhFGgu2rClJv 7WCXs6T3YLAfMiTCjdfn4ySxlFkiXhThw54E3DkyxKOs X-Google-Smtp-Source: AIpwx48rJvBXfblMlNoyqhx8z9VLA8WQYuzendXbwtAKZHZh/5ZbG5GL7Wen/HE+LN7OCnbm9gR5amJlxZpIQLVf2lI= X-Received: by 10.28.98.69 with SMTP id w66mr7771271wmb.64.1522841449863; Wed, 04 Apr 2018 04:30:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.69.220 with HTTP; Wed, 4 Apr 2018 04:30:49 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Wed, 4 Apr 2018 12:30:49 +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="001a1148e3d2ab34b30569042783" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a1148e3d2ab34b30569042783 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 4, 2018 at 10:45 AM, Murtuza Zabuawala < murtuza.zabuawala@enterprisedb.com> wrote: > On Wed, Apr 4, 2018 at 2:47 PM, Dave Page wrote: > >> >> >> 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 ca= che >>>>>>> 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= that >>>>>> 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) bu= t I'm >>>>>>> facing an issue while handling the Browser tree section, It is a wc= Docer >>>>>>> frame and not >>>>>>> a wcDocker panel >>>>>>> . Like wcDocker >>>>>>> panel, wcDocker frame do not provide any API so that a developer ca= n >>>>>>> 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 >>>> to 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 = panel out of the >>> group of Panels then it becomes individual Frame, That is what the auth= or >>> 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 arrangemen= t of >>> elements depending. This feature should only ever be used within the >>> onCreate method of the panel. I should probably have been more clear ab= out >>> this limitation in the documentation."* >>> >>> >> So does it become a panel again if a second panel is added to the new ta= b >> group? >> > =E2=80=8BNo, it stays Frame.=E2=80=8B > > As far as I understand Panel needs a Frame to render itself if it is not > attached to the main docker instance.=E2=80=8B > >> >> There must be some way we can lock a tab that's not part of a group. >> > At a moment there is no way of =E2=80=8B > locking frames out of the box :( > =E2=80=8B > Hmm, so the question becomes: do we include the lock feature, but rename it to "Lock Tabs" or something similar, or leave it out altogether? It clearly doesn't do everything we want right now. --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a1148e3d2ab34b30569042783 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Apr 4, 2018 at 10:45 AM, Murtuza Zabuawala &l= t;m= urtuza.zabuawala@enterprisedb.com> wrote:
On Wed, Apr 4, 2018 at 2:47 PM, Dave Page <dpage@pgad= min.org> wrote:
=


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 P= age <dpage@pgadmin.org> wrote:
Hi

On Tue, Apr 3, 2018 at 12:56 PM, Murtuza Zabuaw= ala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,<= /div>

=
Tha= nks Joao for reviewing.

PFA updated 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,

<= div><= div style=3D"display:inline">Please find updated patch,=C2=A0
<= /font>

Now layout will be locked after user updates it= s preferences, w
e have used =E2= =80=8B
templated variable in the javascr= ipt file
=
=
=E2=80=8B because we do not have preference module or preference cach= e available when the page loads and panels gets rendered,=C2=A0
=E2=80= =8BI
=E2=80=8B also=C2=A0
made changes in JS tests as per Joao= 9;s review comments.
=
Looks like everything is working when w= e change the lock.
As a personal preferences I would prefer to se= e this in at least 2 commits, one that is related to the preference issue a= nd another one that 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)=C2=A0
1=C2= =A0
=E2=80=8BFixed=E2=80=8B=
=C2=A0
<= div dir=3D"ltr">


@Dave/Pivotal team,
The given patch is working fine for all th= e Tabs/Panels (all the panels from main window as well as from Query tool a= nd Debugger) but I'm facing an issue while handling the Browser tree se= ction, It is a wcDocer frame and not a wcDocker panel.= =C2=A0Like wcDocker panel, wcDocker frame do not provide any API so that a = developer can prevent drag-drop functionality on it.
<= /blockquote>

It= 9;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 to= 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 browse= r tree as well, probably because it's a frame as you say.
=C2=A0
=E2=80=8BThat is expected behavi= our =E2=80=8Bbecause once you drag the panel out of the group of Panels the= n it becomes individual Frame, That is what the author of the wcDocker repl= ied on my question,=C2=A0
"A p= anel must either be initialized as movable or non-movable from the beginnin= g and never changed because it generates a different arrangement of element= s depending. This feature should only ever be used within the onCreate meth= od of the panel. I should probably have been more clear about this limitati= on in the documentation."


So does it become a panel again if a second p= anel is added to the new tab group?
=E2=80=8BNo, it stays Frame.=E2=80=8B
=C2=A0
=
As far as I understand Panel needs a Frame to render itself if i= t is not attached to the main docker instance.=E2=80=8B

There must be some = way we can lock a tab that's not part of a group.
At a moment there is no way of =E2=80=8B
locking frames out of the box :(
=E2=80=8B

= Hmm, so the question becomes: do we include the lock feature, but rename it= to "Lock Tabs" or something similar, or leave it out altogether?= It clearly doesn't do everything we want right now.=C2=A0
<= div>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

E= nterpriseDB UK: h= ttp://www.enterprisedb.com
The Enterprise PostgreSQL Company
--001a1148e3d2ab34b30569042783--