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 1f3ez2-0002R3-7e for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Apr 2018 09:45:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3ez0-0003U9-DB for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Apr 2018 09:45:34 +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 1f3ez0-0003Tz-2O for pgadmin-hackers@lists.postgresql.org; Wed, 04 Apr 2018 09:45:34 +0000 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f3eyv-0001I8-Fw for pgadmin-hackers@postgresql.org; Wed, 04 Apr 2018 09:45:33 +0000 Received: by mail-oi0-x243.google.com with SMTP id u141-v6so18677016oif.1 for ; Wed, 04 Apr 2018 02:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=r29HD419PSvNrNoIF0JDr0WyStmrW5udEZBDYvlDDZY=; b=dXjVFG6vIkwi/84Pa42fxoiD7v1cSz4a9RsuvpnJmlibSdI2VVWBNj/DPeB7Uqwbkq MghNeMOah4EMOZSTiRiLZP41rri5+APkry20jweaOcbBUoUJyCZYWSKcnqL1eSFLvLtn Q+XXDfybs6M1x9wVJK6zlXfx6w/9/IPC8/N9X8kA8M1tGR/tyOzBEbnNVSDTGStp3UqG zYTohfPQP6MwLE9l3jxtzwD39xlXOZB4Nt5qBVSpksEb6XVipLQp1aWJSpBs2pKxxaIR wN3vg3uHSF8wfzT4FZJl9U55DL07rfdz7pVWf9fuGGlQ6Mfatu9i9/xtmOZ7Zfe9V3Og aKJA== 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=r29HD419PSvNrNoIF0JDr0WyStmrW5udEZBDYvlDDZY=; b=OHh78ksHxACZmSgJMrxfLZ/C7MFL/0MNmOQv5bIdc6pYkhehiCjlUNxDXr4ef5EVdL 5SSF7cf13Z2jrFdDG5XuxUATZW3qTpFDkqfbRbjvPolOyRt5qskFkLM2d9MZm7U9KfHh i7BSnYhj53Qj2yw83J9LMWpzFxnytHu3nXlE+g0QAyw7sDOOJVs6DGDMxtUmet5aNQED l/zRrSC9ZxuYvdTnkPTAU4ODoSqOGnDYyk0gMttuVmNGaFvuR/8pztMIu5Uf4E2ba+As hzNQ+XMQZToyoLwsPAb+gLSsfO3qYPUyqrSpG06jZJ6DfKKzh42SKpEwvokKEsJFhR0H /0+A== X-Gm-Message-State: ALQs6tC+6QYYe0mCruVTJnIR9cWIAMGCnpS6LJZP3PkxIaui89of1dsh +qFVNzEG6Td8vS1Fr+199hkgD0JOSgG+MM8ifZWFBw== X-Google-Smtp-Source: AIpwx489QeBRMro7hGORGf2Y8R/jS2bxKq6orD4Ry3MJG4k3GC15wOpuAVPPlxLMLSX/Ddg3/O9RQmIo4YoexgqoD5I= X-Received: by 2002:aca:cc50:: with SMTP id c77-v6mr8959157oig.307.1522835127235; Wed, 04 Apr 2018 02:45:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.6.138 with HTTP; Wed, 4 Apr 2018 02:45:06 -0700 (PDT) In-Reply-To: References: From: Murtuza Zabuawala Date: Wed, 4 Apr 2018 15:15:06 +0530 Message-ID: Subject: Re: [pgAdmin4][RM#3155] Allow user to lock the Layout To: Dave Page Cc: Joao De Almeida Pereira , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000cf90fd056902ae4f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000cf90fd056902ae4f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 4, 2018 at 2:47 PM, Dave Page wrote: > > > On Wed, Apr 4, 2018 at 7:20 AM, 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 cac= he >>>>>> 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) but= I'm >>>>>> facing an issue while handling the Browser tree section, It is a wcD= ocer >>>>>> frame and not a= wcDocker >>>>>> panel . Like >>>>>> wcDocker panel, wcDocker frame do not provide any API so that a deve= loper >>>>>> 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 >>> to by default), and then lock the layout, I can un-dock the SQL panel i= nto >>> 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 p= anel out of the >> group of Panels then it becomes individual Frame, That is what the autho= r >> 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 abo= ut >> this limitation in the documentation."* >> >> > So does it become a panel again if a second panel is added to the new tab > 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 > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --000000000000cf90fd056902ae4f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Apr 4, 2018 at 2:47 PM, Dave Page <dpage@pgadmin.org&g= t; = wrote:


On Wed, Apr 4, 2018 at 7:20 AM, Murtuz= a Zabuawala <murtuza.zabuawala@enterprisedb.com&= gt; wrote:
Hi Dave,
<= div class=3D"gmail_extra">
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 Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,

Thanks Joao for reviewi= ng.
=
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,

Please find updated patch,=C2=A0

Now layout will be locked after user updates its preferences, w
<= /font>
e have used =E2=80=8B
templ= ated variable in the javascript file
=E2=80=8B because we do not have preference module or prefer= ence cache 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's review comments.
Looks like everything is workin= g when we change the lock.
As a personal preferences I would pref= er 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.

<= div>
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
=



There must be some way we can lock a t= ab 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
= =C2=A0
--
Dave Page
Blog:
http://pgsnake.blogspot.com
Twitter: @pgsna= ke

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Co= mpany

--000000000000cf90fd056902ae4f--