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 1f3keD-0002L1-6F for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Apr 2018 15:48:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3keC-0001J9-Ds for pgadmin-hackers@arkaria.postgresql.org; Wed, 04 Apr 2018 15:48:28 +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 1f3kcG-0000Lg-9N for pgadmin-hackers@lists.postgresql.org; Wed, 04 Apr 2018 15:46:28 +0000 Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f3kcB-000193-Vq for pgadmin-hackers@postgresql.org; Wed, 04 Apr 2018 15:46:26 +0000 Received: by mail-it0-x235.google.com with SMTP id f6-v6so17561666ita.2 for ; Wed, 04 Apr 2018 08:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=b3kdzFy9EBM0nbvvcKrhUMRMPbG5Hb2lBIBV3PXvKms=; b=HR7m4YBYIFPp4DFSSq46+26Dh5aS6McFlX3pJ8wOhuHplguTl4sdCzgDEF0QbD/nzD 86hoqQpMo3nanYb+nHEeQGtUBBKUqNRvSbsJTWsCRsWCG8fvW2VDRbBo5qGcgN1LTi4L rRQiJBuLpil29tnK/Zlic/dEbgELZ9K7/+1PFYrieBkiwsLkMwGnXLFT1pvqa6Hc2F90 ScU4bu2pFaPuN87Mh88FivtiaQP2R6Dq+T4j3TcCQ+9DnUzQD9Tq/bn0sLU6BRtTctW0 1a9vDt59K3f2z9o+z4ISOtP9A2emxfDGgiezXoUy5FeiQ8BxLlsPj8Fl+BGAOe9za2ED s/GQ== 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=b3kdzFy9EBM0nbvvcKrhUMRMPbG5Hb2lBIBV3PXvKms=; b=BzVH2Cn7ZFaPGVjgtSlnSGjfjgtaAXwT7KcYimLyXeMeDWYmtOfklP8R9jJqrnKoTk MbuHBztUMCqUpZljfmOr42i2Y0hEp8ncTt5MBhd1L0g5anoajhG1l/gabuMoRfwoyxVx bizbNI2YQgHoHIBNaXTARi982slIVqtxdCdgINGu13T0LzRO+lCKmzWa8gMAsi8L1xc0 JgAYsO8eB7SiMJRfj9W2MDH4a0t8KCoZn4jt7PKeMFeS0AyQOJdK7+lq9FmUagEvgSO4 msseOtYpnWCeMzNNCkz1qRskzke8AMq1C8/rsNQliUx/ClFd94SHqiJog03Z73qTco6K FrfQ== X-Gm-Message-State: ALQs6tAg1xxpHScHHU3H9X1TnN/wai8aQ9j5dIrxAtvJnoy+VZ8LAzor BD8Cx8z1o1eBiqYQlZKWl6VlrpCjzuukEnNOl6FQUg== X-Google-Smtp-Source: AIpwx483JSiaZ43p7eyqBJWSFPVkk49CufK/8Zeafy8oBUnxRNZGWwRU+pF8NH1THHFqPOLOV6BhSznCbST2zipWQ9g= X-Received: by 2002:a24:fe0b:: with SMTP id w11-v6mr9833321ith.109.1522856781909; Wed, 04 Apr 2018 08:46:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.141.58 with HTTP; Wed, 4 Apr 2018 08:46:21 -0700 (PDT) In-Reply-To: References: From: Victoria Henry Date: Wed, 4 Apr 2018 11:46:21 -0400 Message-ID: Subject: Re: [pgAdmin4][RM#3155] Allow user to lock the Layout To: Ashesh Vashi Cc: Dave Page , Murtuza Zabuawala , Joao De Almeida Pereira , pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000087a4d8056907b944" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000087a4d8056907b944 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Hackers, We just reread the issue in Redmine, and our take is a little bit different. Looks like the problem the person is complaining the tabs sticking to the mouse when clicked. We also experience that problem while developing. How hard would it be to eliminate the Drag and Drop of tabs in the current implementation? Do we think this might be a problem for the majority of the users? Thanks Victoria & Joao On Wed, Apr 4, 2018 at 10:41 AM, Ashesh Vashi 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 preferenc= e 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 anoth= er 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 th= e >>>>>>>>>>> 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 >>>>>>>>>>> . Like >>>>>>>>>>> wcDocker panel, wcDocker frame do not provide any API so that 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 looks like pg= Admin 3 >>>>>>>> used to by default), and then lock the layout, I can un-dock the S= QL 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 >>>>>>> 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 bee= n more >>>>>>> clear about this limitation in the documentation."* >>>>>>> >>>>>>> >>>>>> So does it become a panel again if a second panel is added to the ne= w >>>>>> 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 altoget= her? >>>> It clearly doesn't do everything we want right now. >>>> >>> =E2=80=8BI would say lets include the feature by adding warning note th= at this >>> feature works with default layout only, And I don't think most user wil= l >>> 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? Personally I don't like including >> half-baked features. >> > +1 > > -- Thanks, Ashesh > >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > --00000000000087a4d8056907b944 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hackers,

We just reread the issue in= Redmine, and our take is a little bit different. Looks like the problem th= e person is complaining the tabs sticking to the mouse when clicked. We als= o experience that problem while developing.

How ha= rd would it be to eliminate the Drag and Drop of tabs in the current implem= entation?
Do we think this might be a problem for the majority of= the users?

Thanks
Victoria & Joao

On Wed,= Apr 4, 2018 at 10:41 AM, Ashesh Vashi <ashesh.vashi@enterpris= edb.com> wrote:
On Wed, Apr 4, 2018 at 8:09 PM, Dave Page <dpage@pgadmin.org&g= t; 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 <dpage@pgadmin= .org> wrote:


On Wed, Apr 4, 2018 at 1= 0:45 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprised= b.com> wrote:
On Wed, Apr 4, 2018 at 2:47 PM, Da= ve Page <dpage@pgadmin.org> wrote:


On Wed, Apr 4, 2018 = at 7:20 AM, Murtuza Zabuawala <murtuza.zabuawala@enterpri= sedb.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:
Hi,

Thanks 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,
<= 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?
=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 no= t 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 questi= on becomes: do we include the lock feature, but rename it to "Lock Tab= s" or something similar, or leave it out altogether? It clearly doesn&= #39;t do everything we want right now.=C2=A0
=E2=80=8BI would say lets include the feature = by adding warning note that this feature works with default layout only, An= d 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 m= ain source code to make the Frame lock.

Anyone else have any thoughts on thi= s? Personally I don't like including half-baked features.
+1

-- Than= ks, Ashesh=C2=A0

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

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


--00000000000087a4d8056907b944--