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 1fAtmX-0001HI-Qm for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 Apr 2018 08:58:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fAtmW-0004Ta-Gw for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 Apr 2018 08:58:36 +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 1fAtmV-0004TQ-UY for pgadmin-hackers@lists.postgresql.org; Tue, 24 Apr 2018 08:58:36 +0000 Received: from mail-qk0-x234.google.com ([2607:f8b0:400d:c09::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fAtmS-0007kg-3D for pgadmin-hackers@postgresql.org; Tue, 24 Apr 2018 08:58:34 +0000 Received: by mail-qk0-x234.google.com with SMTP id c70so10035571qkg.0 for ; Tue, 24 Apr 2018 01:58:31 -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=gde+13CJTQYfla/af/nytZMyGzGMnCWJhcSXiwt2mfw=; b=YOfEC3O1sV6lXQW7cs96iSZpGPif0iU5FXisMWTgSPDzNo7XU5U+wsprbME8OPS1W3 I2GpnDSvU41pISnN3gYHII4kB+9t+GrFtDvw+VvK4sc2UKH9+GolcmKJzTgAfYMId+oP Bl14XH9vnjIY4ttraM0gKs+9ZYLZSHbVD/+xyBLRrPcLh0mls4HQ6TB02MBhkwbVhePQ X9EJq6MJ0NsZnXriBt1/fd0HECQjP6OgxWnpgkfKJPOJcg5hbdsmfW3GYABj2Gd8Rw5R JqJJLyK/S7MbtzV9IkKKLLwaeTXB4qovJktSK3C4d3+9Q3QONYFl79lPKFnNgnD/zXWW ARvA== 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=gde+13CJTQYfla/af/nytZMyGzGMnCWJhcSXiwt2mfw=; b=kbUkyXlTsLZuAsxqvgVt9hqueg8cXvq0I8np5hgWui2zvsf3sjRLiOo5T+f7ghF8TK P3rQgKe3pAl7BvVxLWSoC0cVmCP8NE7L7nUvDa3Q8i7SYrHKGq1Gvup/qFLS+dkc/hKj bHTIZjKAg6mwWl+nJ2/MVvqqzniNUvTXbqQYN4ZVQMcOmQ61vGdBBlvSXDXcGes6o+6D ltFFmX8j0GyMhC/d0yZwrEMpZQBAdDZssJq0CMLW8fM6X1v3fvtDuiujcSEInTvuwCbv gddIVIXem7NAexPAUB50mt6WqOsgtVybNIodjxJXKF1q9hQg+sNq5YhEkwopLPUBMulP DREw== X-Gm-Message-State: ALQs6tDThzaAwuaBS3Pp210tgX/DkZI+XyP/A3QDCXK77g0isytDpO6E rlzFqZsopKZGgSkhLuSwrqC0s0Wso36FC9K98GX/oQ== X-Google-Smtp-Source: AB8JxZpH9C0z9Oje5jTKiXosF3w05lIcIP9m702t3Dl4Exatt+BtR6J7yM/wflULGxvuPZGfKN7CcmvmEySh6Couxk0= X-Received: by 10.55.140.130 with SMTP id o124mr24820414qkd.187.1524560310593; Tue, 24 Apr 2018 01:58:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.182.1 with HTTP; Tue, 24 Apr 2018 01:58:30 -0700 (PDT) In-Reply-To: References: From: Akshay Joshi Date: Tue, 24 Apr 2018 14:28:30 +0530 Message-ID: Subject: Re: [pgAdmin4][RM#3155] Allow user to lock the Layout To: Dave Page Cc: Murtuza Zabuawala , pgadmin-hackers Content-Type: multipart/alternative; boundary="001a114f8cfac08b5a056a945bca" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a114f8cfac08b5a056a945bca Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 24, 2018 at 1:17 PM, Dave Page wrote: > Akshay, could you review/commit this please? > > Please also update the release_notes_3_1.rst file when you commit > user-visible changes, to make it easier to build the release notes. > Sure > > Thanks. > > On Tue, Apr 24, 2018 at 8:45 AM, Murtuza Zabuawala enterprisedb.com> wrote: > >> Hi Dave, >> >> Please find the updated patch, Now we are able to lock wcFrame and >> wcPanel both. >> >> -- >> Regards, >> Murtuza Zabuawala >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> >> On Thu, Apr 5, 2018 at 6:32 PM, Robert Eckhardt >> wrote: >> >>> >>> >>> On Wed, Apr 4, 2018 at 11:31 PM, Khushboo Vashi < >>> khushboo.vashi@enterprisedb.com> wrote: >>> >>>> >>>> >>>> On Wed, Apr 4, 2018 at 8:09 PM, Dave Page wrote: >>>> >>>>> >>>>> >>>>> On Wed, Apr 4, 2018 at 12:54 PM, Murtuza Zabuawala < >>>>> murtuza.zabuawala@enterprisedb.com> wrote: >>>>> >>>>>> On Wed, Apr 4, 2018 at 5:00 PM, Dave Page wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> 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 prefer= ence >>>>>>>>>>>>>> cache 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 D= ebugger) but >>>>>>>>>>>>>> I'm facing an issue while handling the Browser tree section,= It is a wcDocer >>>>>>>>>>>>>> frame >>>>>>>>>>>>>> and not a wcDocker panel >>>>>>>>>>>>>> . Like >>>>>>>>>>>>>> wcDocker panel, wcDocker frame do not provide any API so tha= t a developer >>>>>>>>>>>>>> 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 look= s 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 f= rame as you >>>>>>>>>>> say. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> =E2=80=8BThat is expected behaviour =E2=80=8Bbecause once you dr= ag the panel 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 diff= erent >>>>>>>>>> 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 about 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 >>>>>>>> >>>>>>> >>>>>>> Hmm, so the question becomes: do we include the lock feature, but >>>>>>> rename it to "Lock Tabs" or something similar, or leave it out alto= gether? >>>>>>> It clearly doesn't do everything we want right now. >>>>>>> >>>>>> =E2=80=8BI would say lets include the feature by adding warning note= that >>>>>> this feature works with default layout only, And I don't think most = user >>>>>> will try to drag drop Browser panel =E2=80=8B >>>>>> anyway, meanwhile I'll check what changes are required in main sourc= e >>>>>> code to make the Frame lock. >>>>>> >>>>> >>>>> Anyone else have any thoughts on this? Personally I don't like >>>>> including half-baked features. >>>>> >>>>> +1, but we need to find out the way as this feature is requested by >>>> many users. >>>> >>> >>> 100% agree. I can convince my self that this feature request has to do >>> with locking panels into a certain layout. I can also convince myself t= hat >>> the same request is simple because users are frustrated with the fact t= hat >>> the tabs and panes move around and they find that behavior annoying. >>> >>> -- Rob >>> >>> >>>> -- >>>>> Dave Page >>>>> Blog: http://pgsnake.blogspot.com >>>>> Twitter: @pgsnake >>>>> >>>>> EnterpriseDB UK: http://www.enterprisedb.com >>>>> The Enterprise PostgreSQL Company >>>>> >>>> >>>> >>> >> > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --=20 *Akshay Joshi* *Sr. Software Architect * *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* --001a114f8cfac08b5a056a945bca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Apr 24, 2018 at 1:17 PM, Dave Page <dpage@pgadmin.org><= /span> wrote:
Akshay, co= uld you review/commit this please?

Please also update th= e release_notes_3_1.rst file when you commit user-visible changes, to make = it easier to build the release notes.

=C2=A0 =C2=A0Sure=C2=A0

Thanks.

On T= ue, Apr 24, 2018 at 8:45 AM, Murtuza Zabuawala <murtuza.z= abuawala@enterprisedb.com> wrote:
Hi Dave,

Please find the updated patch, Now we are able to lock wcFrame an= d wcPanel both.

--
Regards,
Murtuza Zabuawa= la
EnterpriseDB:=C2=A0http://www.enterprisedb.com
The Ent= erprise PostgreSQL Company
<= font face=3D"verdana, sans-serif" color=3D"#444444">

On Thu, Apr 5, 2018 at 6:32 PM, Robert Eckha= rdt <reckhardt@pivotal.io> wrote:


On Wed, Apr 4, 2018 at 11:31 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:

On Wed, Apr 4, 2018 at 8:09 PM, Dave Page <dpage@pgadmin.org&= gt; wrote:


On Wed, Apr 4, 20= 18 at 12:54 PM, Murtuza Zabuawala <murtuza.zabuawala@ente= rprisedb.com> wrote:
<= div dir=3D"ltr">
On Wed, Apr 4, 2018 at 5:00 PM, Dave Page <dpage@pgadmin.org><= /span> wro= te:


On W= ed, Apr 4, 2018 at 10:45 AM, Murtuza Zabuawala <murtuza.z= abuawala@enterprisedb.com> wrote:
On Wed, Apr 4, 2018 at 2:47 PM, Dave Page <<= a href=3D"mailto:dpage@pgadmin.org" target=3D"_blank">dpage@pgadmin.org= > wrote:


On Wed, Ap= r 4, 2018 at 7:20 AM, Murtuza Zabuawala <murtuza.zabuawal= a@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 Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:<= br>
Hi,

Thanks Joao f= or 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>

Please find updated patch,=C2=A0
<= div><= div style=3D"display:inline">
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 hav= e preference module or preference cache available when the page loads and p= anels gets rendered,=C2=A0
=E2=80=8BI
=E2=80=8B also=C2=A0
ma= de changes in JS tests as per Joao's review comments.
Lo= oks like everything is working when we change the lock.
As a pers= onal 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/4a5630c= 2/pivotal-rm-3155/web /tmp/build/4a5630c2
./pgadmin/misc/__init__.py:78: [E303] too many blank lin= es (2)
1 E303 too many blank lines (2)=C2=A0
1=C2=A0
=E2=80=8BFixed=E2=80=8B
=C2= =A0

=
<= br>
= @Dave/Pivotal team,
The given patch is working fine for all the Tabs/Panels (al= l 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 wcDocer frame and not a wcDocker panel.=C2=A0Like wcDocke= r panel, wcDocker frame do not provide any API so that a developer can prev= ent drag-drop functionality on it.

It's not working fi= ne for me. For example, if I put the SQL Panel on it's own below the pr= operties/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, pr= obably because it's a frame as you say.
=C2=A0
=E2=80=8BThat is expected behaviour =E2=80=8Bbecau= se once you drag the panel out of the group of Panels then it becomes indiv= idual Frame, That is what the author of the wcDocker replied on my question= ,=C2=A0
"A panel must either b= e initialized as movable or non-movable from the beginning and never change= d 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 about this limitation in the document= ation."

So does it become a panel again if a second panel is added to t= he 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 it is not attached = to the main docker instance.=E2=80=8B

There must be some way we can lock a tab that= 9;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 ev= erything we want right now.=C2=A0
=E2=80=8BI would say lets include the feature by adding w= arning note that this feature works with default layout only, And I don'= ;t think most user will try to drag drop Browser panel =E2=80=8B
anyway, meanwhile I'll check what changes are required in main source = code to make the Frame lock.

Anyone else have any thoughts on this? Personal= ly I don't like including half-baked features.=C2=A0
<= div>
+1, but we n= eed to find out the way as this feature is requested by many users.=C2=A0

100% agree. I can co= nvince my self that this feature request has to do with locking panels into= a certain layout. I can also convince myself that the same request is simp= le because users are frustrated with the fact that the tabs and panes move = around and they find that behavior annoying.=C2=A0

-- Rob=C2=A0
--
Dave Page
B= log: http://pgsna= ke.blogspot.com
Twitter: @pgsnake

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






--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB= UK: http://www.e= nterprisedb.com
The Enterprise PostgreSQL Company



--
=
Akshay Joshi
Sr. Software Architect
<= /font>

=

Phone: +91 20-3058= -9517
Mobile: +91 976-788-8246
= --001a114f8cfac08b5a056a945bca--