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 1f35LK-0005zv-Va for pgadmin-hackers@arkaria.postgresql.org; Mon, 02 Apr 2018 19:42:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f35LJ-0000M4-Ij for pgadmin-hackers@arkaria.postgresql.org; Mon, 02 Apr 2018 19:42:13 +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 1f35LJ-0000Ls-0t for pgadmin-hackers@lists.postgresql.org; Mon, 02 Apr 2018 19:42:13 +0000 Received: from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f35LA-00015F-8c for pgadmin-hackers@postgresql.org; Mon, 02 Apr 2018 19:42:11 +0000 Received: by mail-it0-x241.google.com with SMTP id h143-v6so20218425ita.4 for ; Mon, 02 Apr 2018 12:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=32mJnXjlreYMf/aHDzZ0q+L+brjkEAD6qk15/se5MoQ=; b=W59c049+VvLTlrMZ9KJVYPtJGvqYyebWezcKfgF36FTF+TNw2VPCtgexhL6I3Wv2nn wYFYfKBujCX5HOJ9N4v0bJALKk5MARlaPLsVeutU2klUpDzTEfkcrNUdLdCA2+QP05/1 Tb4omfeS83E64MKHT3G53dhHgnHSI5JR1tpKUyEj6k4dBU4Sv/oUUVvqmHrz0S9G+wEG SqyHJM6GI7f1JzkPkqZpIXgaPcSFAS4HS9+OA6fJKjKgGPp6UWS2QUGleEzGst5j/pjq 1IqUe4l2a61KaAD6eaAl5ybDXlfzkpY2sVFhONlX6Gk0kYmId+S2ZICOrDlYmSVr8yLi Hvxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=32mJnXjlreYMf/aHDzZ0q+L+brjkEAD6qk15/se5MoQ=; b=ekuZdywgk4C56LyCR3+nnJNTjhoUwCzKjf+Gwwks5AkUrJg3nAY1HyOF6Avr3BN6Bs oKbnDjcbrqNSAlpJvNNVNXewoNBGCa1kUFMPcj+hHNnTFqc9JSorY0MD9ruXvjtsq/wt kJ4doniwjTrC9MOamgh/tBr2WKnzp8orRAPzU7DBnbFUhypasAzQZT5jNvJAOqFDC8N9 tCIrqH4Dlcw4QBkgTBXAsCBfrKB38z4Q1E6dq7n7jgZZM0E5MDf5aCLKHwc6PWGnaylf F2Y1rDUFktO32VEBYalEIt6Mt9UVqY4t0sF33waOv3UqX/lmAv6Wy0zwEbXDBQ6l1Est JjNQ== X-Gm-Message-State: ALQs6tB49RfCb/Nf92lhvROhRosVguzmtMNFvmOrzNs91OZZwP61MJs8 uPv3coidcShoV1KlQYopoQAALY1tyxwOAbtslGVQUQ== X-Google-Smtp-Source: AIpwx48t4KZN31VVa6qx/9c2y+nVCbe1rKAnIFD3rTgbeKB9qHxnpaUMbqlyn8U5y4dvJ/1SEUAdGErccgyFS5r3ff8= X-Received: by 2002:a24:c281:: with SMTP id i123-v6mr2331507itg.146.1522698123145; Mon, 02 Apr 2018 12:42:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Joao De Almeida Pereira Date: Mon, 02 Apr 2018 19:41:52 +0000 Message-ID: Subject: Re: [pgAdmin4][RM#3155] Allow user to lock the Layout To: Murtuza Zabuawala Cc: Dave Page , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000bb0f860568e2c847" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000bb0f860568e2c847 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 av= ailable > 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 > @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 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. > > By visiting wcDocker github page I= t > looks like it not actively maintained. > What do you suggest how should we tackle this issue? > > I think this should be moved to a different thread, because at this point 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.11.2 because it stopped being actively developed and supported after May 20 of 2016. > 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 t= o >> reset the layout or refresh the app to see it working. It only looks the >> right side. Was this the intended behavior? >> >> Not sure if this is the expected behavior or not. I would expect that an= y >> change I do in the preferences would start working after I press the Sav= e >> button. This also happens with other preferences that only take effect >> 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 for >> the panels, you can reuse it, because the beforeEach will run for every = 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 hav= e >>> 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 >>> >> > --000000000000bb0f860568e2c847 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

= On Mon, Apr 2, 2018 at 10:07 AM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>= wrote:

=E2=80=8BHello,
<= div><= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif;color:r= gb(68,68,68);display:inline">
Please find updated patch,=C2=A0

Now layout will be locked after user updates its preferences, w
e have used= =E2=80=8B
<= div dir=3D"ltr">
templated var= iable 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
=E2=80=8BI
=E2=80=8B also=C2=A0
made changes in JS tests as = per Joao's review comments.
<= /div>
Looks like everything is wor= king when we change the lock.
As a personal preferences I would p= refer to see this in at least 2 commits, one that is related to the prefere= nce issue and another one that is related to this story.


All the tests are working, but he linter is failing:<= /div>
/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


@Dave/Pivotal team,
The given patch is workin= g 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 th= e Browser tree section, It is a wcDocer frame and not a w= cDocker panel.=C2=A0Like wcDocker panel, wcDocker frame do not provide = any API so that a developer can prevent drag-drop functionality on it.

By visiting=C2=A0wcDocker github page= =C2=A0It looks like it not actively maintained.
What do= you suggest how should we tackle this issue?


I think this should be moved to a different thread= , because at this point 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= =C2=A01.11.2 because it stopped being actively developed and supported afte= r May 20 of 2016.
=C2=A0
For time being, I've created subtask for this iss= ue=C2=A0https://redmine.postgresql.org/issues/3243
Thanks,
Murtuza
=C2=A0=E2=80=8B
<= /div>
On Thu, Mar 29, 2018 at 8:57 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi Murtuza,

<= /div>
After changing the setting in the preferences nothing happened, w= e had to reset the layout or refresh the app to see it working. It only loo= ks 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 the Save b= utton. This also happens with other preferences that only take effect 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 o= n the tests?

At the testing file you do not need t= o create 3 different variables for the panels, you can reuse it, because th= e beforeEach will run for every test

Thanks
<= div>Joao

On Thu,= Mar 29, 2018 at 9:48 AM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Thu, Mar 29, 2018 at= 2:15 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprise= db.com> wrote:
Hi,

PFA patch which will allow user to lock the panels and it w= ill not allow user to drag & drop them.
Tests pass, but when I lock the layout, I can st= ill drag panels and adjust the splitters etc. After doing so,=C2=A0 reset t= he layout and now have the broken layout seen in the attached screenshot. I= have rebuilt the bundle, reloaded etc.=C2=A0

--
Dave PageBlog: http://pg= snake.blogspot.com
Twitter: @pgsnake

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

--000000000000bb0f860568e2c847--