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 1f3NwR-00032R-IO for pgadmin-hackers@arkaria.postgresql.org; Tue, 03 Apr 2018 15:33:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3NwQ-0002vH-G5 for pgadmin-hackers@arkaria.postgresql.org; Tue, 03 Apr 2018 15:33:46 +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 1f3NwQ-0002v7-2V for pgadmin-hackers@lists.postgresql.org; Tue, 03 Apr 2018 15:33:46 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f3NwM-0002Se-9z for pgadmin-hackers@postgresql.org; Tue, 03 Apr 2018 15:33:44 +0000 Received: by mail-wr0-x241.google.com with SMTP id u46so19154122wrc.11 for ; Tue, 03 Apr 2018 08:33:41 -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=8un1WB1Z8LPosgBnJX7nCQn9IoPeu7t3J9MldLcdWmY=; b=JYG4QifiC4DNA0AJ7Od1TRSL0V/Tk8m0n8eIJa3IAuuDbTYVxmcjU4FWla6rLocxJP doVJzkTa8hY+q7sVUTZ/RLdhvsXeHF+ORpSAW1IalQithKFYTwY+K6rD41Isb9o9ZVaE FiDcqV1AAMqoCqjsoL9HHAttw7hD3+lmNezUqh1MpC3VGzhcqiHeSEsHhQURPaQnr/ku PtH8RlpM3IB2DLSpXihKwZM5WpXifLn19GOkbgbTGci0YDzu6wLaYyNNBNjRXIsrkCaG IBBwFVov+pIXcZ0tw3ITAGHt0khEKTbCZWqt7uPtCNIiUYAB2cEQ8Z70BwuMSK310jTf N0xQ== 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=8un1WB1Z8LPosgBnJX7nCQn9IoPeu7t3J9MldLcdWmY=; b=RtucMCRlhjqCijoRCbt+FPxjoRiZPsBD5OKNOq111OnZb3LsOCRlJdPonR5V64NcTK kgGH4r/U7kvE7li2IHaTZWbIM453Bw3QwwWmQ88Fv57P2AJE3sEmYsipbx9HcOE/zuu3 l58tXMB1Z36VKuGYnxThjqjdX45/KNeFZZgP5vJ2j/lnoY+4/tDwgDcaujn9Bx1Tf7q1 T9IktDPe6/JRJg6jkpaIMJLuCJi+QiHz0wzqDkAr4awrHVtgZ7ndkEJMTLwIAxxxaq40 WLqS4SEoIbXtpev8yvKEo7druVupfXWli9pp2Yx6qo0nGQyXIsfbGojtwGQqNbq5aSfF zdqA== X-Gm-Message-State: AElRT7GLopLrj388bQmHMbKmlcEI3Cxdakbq56a5OR/hzOPPt3MEJ7Ng AsmYxQEvYE5bQq+mKxOM7SkgqJJz09CHoV1TTcnYAQ== X-Google-Smtp-Source: AIpwx48iI7hkmuNZiBJ3Ppl/cRpFKLtlYtf8vaAYZWPr/ULbdg9n8jatEWbzrMdrNQmCFyblRh/YVWan7us1ZKyyGH4= X-Received: by 10.223.195.124 with SMTP id e57mr9572822wrg.135.1522769620200; Tue, 03 Apr 2018 08:33:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.69.220 with HTTP; Tue, 3 Apr 2018 08:33:39 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Tue, 3 Apr 2018 16:33:39 +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="f403045c4e224988ea0568f36e56" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f403045c4e224988ea0568f36e56 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 tha= t >> 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 facin= g 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 develop= er >>> 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 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. > >>> By visiting wcDocker github page = It >>> looks like it not actively maintained. >>> What do you suggest how should we tackle this issue? >>> >> It may not have been updated recently, but the lead developer answered your questions pretty quickly. Maybe he'll be open to a pull request if we can figure out how to lock the layout of the frame as well. > >>> >> I think this should be moved to a different thread, because at this poin= t >> in time we have 3 of our core libraries that are no longer >> maintained/supported/under active development that I know out of my head= . >> (ACITree, Backbone and wcDocker). I might even add to the mix jquery 1.1= 1.2 >> because it stopped being actively developed and supported after May 20 o= f >> 2016. >> > =E2=80=8BSure, I'll send separate email.=E2=80=8B > > >> >> >>> For time being, I've created subtask for this issue >>> https://redmine.postgresql.org/issues/3243 >>> >>> Thanks, >>> Murtuza >>> =E2=80=8B >>> On Thu, Mar 29, 2018 at 8:57 PM, Joao De Almeida Pereira < >>> jdealmeidapereira@pivotal.io> wrote: >>> >>>> Hi Murtuza, >>>> >>>> After changing the setting in the preferences nothing happened, we had >>>> to reset the layout or refresh the app to see it working. It only look= s the >>>> right side. Was this the intended behavior? >>>> >>>> Not sure if this is the expected behavior or not. I would expect that >>>> any change I do in the preferences would start working after I press t= he >>>> Save button. This also happens with other preferences that only take e= ffect >>>> after refresh on the browser. >>>> This being said, not sure if having the templated variable in the >>>> javascript file is the best approach in this case. >>>> >>>> Do you think you can remove the requirejs tags on the tests? >>>> >>>> At the testing file you do not need to create 3 different variables fo= r >>>> the panels, you can reuse it, because the beforeEach will run for ever= y test >>>> >>>> Thanks >>>> Joao >>>> >>>> On Thu, Mar 29, 2018 at 9:48 AM Dave Page wrote: >>>> >>>>> Hi >>>>> >>>>> On Thu, Mar 29, 2018 at 2:15 PM, Murtuza Zabuawala < >>>>> murtuza.zabuawala@enterprisedb.com> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> PFA patch which will allow user to lock the panels and it will not >>>>>> allow user to drag & drop them. >>>>>> >>>>> >>>>> Tests pass, but when I lock the layout, I can still drag panels and >>>>> adjust the splitters etc. After doing so, reset the layout and now h= ave >>>>> the broken layout seen in the attached screenshot. I have rebuilt the >>>>> bundle, reloaded etc. >>>>> >>>>> -- >>>>> Dave Page >>>>> Blog: http://pgsnake.blogspot.com >>>>> Twitter: @pgsnake >>>>> >>>>> EnterpriseDB UK: http://www.enterprisedb.com >>>>> The Enterprise PostgreSQL Company >>>>> >>>> >>> > --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --f403045c4e224988ea0568f36e56 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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&= gt; 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 module or preference cache = available when the page loads and panels gets rendered,=C2=A0
<= span style=3D"color:rgb(68,68,68);font-family:verdana,sans-serif">=E2=80=8B= I
=E2=80=8B also=C2=A0
made changes in JS tests as per Joao's= review comments.
Looks like everything is working when we c= hange the lock.
As a personal preferences I would prefer to see t= his 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)=C2=A0
<= a href=3D"https://gpdb-dev.bosh.pivotalci.info/teams/main/pipelines/pgadmin= -feature-branches/jobs/pivotal-rm-3155-python-linter/builds/3#L5ab982d1:11"= style=3D"text-decoration-line:none;color:rgb(236,240,241)" target=3D"_blan= k">
1=C2=A0
=
=E2=80=8BFixed=E2=80=8B
=C2=A0


@Dave/Pivotal team,
The given patch is wor= king 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 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.
<= br>
It's not working fine for me. For example, if I put the S= QL Panel on it's own below the properties/stats panels (so it looks lik= e pgAdmin 3 used to by default), and then lock the layout, I can un-dock th= e SQL panel into a dialogue, but then cannot re-dock it. I can do weird thi= ngs with the browser tree as well, probably because it's a frame as you= say.
=C2=A0
B= y visiting=C2=A0wcDocker github page=C2=A0It looks like it not actively maintai= ned.
What do you suggest how should we tackle this issue?
=

It m= ay not have been updated recently, but the lead developer answered your que= stions pretty quickly. Maybe he'll be open to a pull request if we can = figure out how to lock the layout of the frame as well.
=C2=A0
=

=

I think this should be moved to a different thread, because at this p= oint in time we have 3 of our core libraries that are no longer maintained/= supported/under active development that I know out of my head. (ACITree, Ba= ckbone and wcDocker). I might even add to the mix jquery=C2=A01.11.2 becaus= e it stopped being actively developed and supported after May 20 of 2016.
=E2=80=8BSure, I'll send= separate email.=E2=80=8B
=C2=A0
=C2=A0
For time being, I've created subtask for this issue=C2=A0https://redmin= e.postgresql.org/issues/3243

Thanks,
Murtuza
=C2=A0=E2=80=8B
=
--
Dave Page
Blog: http://pgsnake.blogspot.com
= Twitter: @pgsnake

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

=



--
Dave Page
Blog: = http://pgsnake.bl= ogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com<= br>The Enterprise PostgreSQL Company
--f403045c4e224988ea0568f36e56--