Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fYwto-0004O5-RU for pgadmin-hackers@arkaria.postgresql.org; Fri, 29 Jun 2018 17:09:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fYwtm-0000ZS-UD for pgadmin-hackers@arkaria.postgresql.org; Fri, 29 Jun 2018 17:09:30 +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 1fYwtm-0000ZK-9L for pgadmin-hackers@lists.postgresql.org; Fri, 29 Jun 2018 17:09:30 +0000 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fYwti-0001sT-6v for pgadmin-hackers@postgresql.org; Fri, 29 Jun 2018 17:09:28 +0000 Received: by mail-lf0-x232.google.com with SMTP id i15-v6so7301698lfc.2 for ; Fri, 29 Jun 2018 10:09:25 -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=usMhCESBbMi1QcJKQPgjV7tPp7CwkJDDKzP4p3xHRiw=; b=eMOUcTw7Goe/xEtqM0p8BXv8G9gYKC7vLsVrfA445dS+w+KcZW9x0t8KwUVWQ0ohp9 w06aRrIk9qgH3BG3mxaxFHgCjnm5PLI9o1cIfECqrYVCSxXpdjUlw/sQUJYFRHHhcYZ6 VNksC9wTsSdkDzjb1whz8M8K3q8nQBtyOybgBMVHbQk4vLxgkHrgb6Yy49Jaw8jdb0Xt SgBkTTH40iC7oW8Uf/b6wc/VpeicvX6xO42JpsPVTD+G7gys6q6nIzqDm/u9DgzaDDKp C0qo2bYv9+PIl4OJ8+hDlUfWC7Di+yY7VokEswXG7bMLWydYLxx7GjjsB8cIpayCliPA yPzw== 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=usMhCESBbMi1QcJKQPgjV7tPp7CwkJDDKzP4p3xHRiw=; b=Vr21oxdjyOMqsTA+eDGUSqIaSVDLPK5JTpKF4KsJpVIS5gXEthifBsSo0wwQRNb/bg XjVSGt3t+TyAeyvXrxw2lb1/yDeffViqxtX26RBdgFFkaTCPaqznKnHuohNpbFW5XhTq V2Yvcv5qD1Z6+YMstHsCLBlhwrBjHFxSB7Ai8fUPc6OGBmWVHiMjUFXs1L2VB45z49gz +C6TqdkVyyEuBJIJV66mh52ug0KIlavSTUMTlsEqy+AcBxr2/QCPyZCMFwIeqiYvd7Ao hw648m5lGO/+U27KULV8Q+mW5JLqHtk9NIr4fbVsmTrmABK9JROinQ3uQNSbAv+AlKrT a00Q== X-Gm-Message-State: APt69E25DiW909xqaq4Iflw2TzTWypic+Wp3Gfa7arEnQ0ytWvarcr/b ztuR5tyodU0lQs3jQeEQdTjBhhIIfzriq8jHMVIOXw== X-Google-Smtp-Source: AAOMgpeUKys5E7UEMUO9bzROKnkZJ6dwshm/Igtg+TgLIIGlV+rQ35Ea4iUcrCYHaKDVxa7hTsEx68b0R+IoI1CJvgk= X-Received: by 2002:a19:df43:: with SMTP id q3-v6mr7792172lfj.53.1530292164149; Fri, 29 Jun 2018 10:09:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:850b:0:0:0:0:0 with HTTP; Fri, 29 Jun 2018 10:09:23 -0700 (PDT) In-Reply-To: References: From: Aditya Toshniwal Date: Fri, 29 Jun 2018 22:39:23 +0530 Message-ID: Subject: Re: [pgAdmin4][RM3294] User need to reset the layout to see the changed preferences parameters To: Dave Page Cc: Akshay Joshi , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000d8e7a9056fcae8a7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000d8e7a9056fcae8a7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dave, On Fri, Jun 29, 2018 at 9:30 PM, Dave Page wrote: > Hi > > On Fri, Jun 29, 2018 at 3:14 PM, Aditya Toshniwal enterprisedb.com> wrote: > >> Hi Hackers, >> >> Attached is the updated patch. >> > > This seems to work for the most part, however I saw what seemed like odd > behaviour. If I have 2 query tool windows open; > > - Changing a preference from the Preferences dialogue updates both query > tools. > > - Changing a preference from a Query Tool updates the Preferences dialogu= e. > > - Changing a preference from a Query Tool does *not* update the other > Query Tool. > > The last point seems odd to me, though it also kinda makes sense to not > have one query tool affect the other. The problem with that is that it > could get quite confusing when they get out of sync. I think it would be > better for a change in one Query Tool to update the other(s). > > What do you think? Was this behaviour intentional? > =E2=80=8BNo this was not intentional. It should reflect in other query tool= s as well because changing the flags like Auto Commit changes the preferences config and is not local to a Query tool. I missed the fact that some preferences can be changed from other than preference dialog.=E2=80=8B =E2=80=8BWill send the updated patch with the fix.=E2=80=8B > > (FYI, in case this was a one-off bug, I was testing using "Auto Commit?") > > >> >> On Fri, Jun 29, 2018 at 4:46 PM, Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Akshay, >>> >>> On Fri, Jun 29, 2018 at 3:42 PM, Akshay Joshi < >>> akshay.joshi@enterprisedb.com> wrote: >>> >>>> Hi Aditya >>>> >>>> I have applied your patch and run pgAdmin4. I have found following two >>>> issue in the browser: >>>> >>>> - Found error while open Preferences dialog. Refer >>>> Open_Preferences_Dialog.png >>>> >>>> =E2=80=8BThis error occurs even with the latest pull without changes.= =E2=80=8B >>> >>> >>>> >>>> - Set the preferences setting "Open in new browser tab" to True and >>>> open the query tool. Refer "Open_In_New_Broswer.png". >>>> >>>> =E2=80=8BWill look into this.=E2=80=8B >>> >>> >>>> I haven't review the code. >>>> >>>> On Thu, Jun 28, 2018 at 8:04 PM, Aditya Toshniwal < >>>> aditya.toshniwal@enterprisedb.com> wrote: >>>> >>>>> Hi Hackers, >>>>> >>>>> Attached is the patch for making preferences realtime and applying >>>>> without reseting the layout. Please note, the patch is only for one m= odule >>>>> - SQL Editor and is the first part for the RM. There are lot of chang= es to >>>>> be done to cover all and hence sending in parts. This will not affect= /break >>>>> existing code. Further patches will cover other modules. >>>>> >>>>> Highlights of this patch include: >>>>> - Changes will affect SQL Editors in Create dialog boxes, SQL tab of >>>>> the main screen, Query tool, History entries in the query tool, Query= tool >>>>> opened in New Tab/Window >>>>> - All the components of SQL editor will refer to single source of >>>>> preferences which is cached in the Browser object. All other redundan= t ajax >>>>> get preference calls are removed. >>>>> - SQL editor will not refer template JS variables anymore, once all >>>>> the references are removed the template variables will also be remove= d. >>>>> - Code refactoring wherever possible. >>>>> - Covered JS test cases wherever possible. >>>>> >>>>> Request you to kindly review. >>>>> >>>>> -- >>>>> Thanks and Regards, >>>>> Aditya Toshniwal >>>>> Software Engineer | EnterpriseDB Software Solutions | Pune >>>>> "Don't Complain about Heat, Plant a tree" >>>>> >>>> >>>> >>>> >>>> -- >>>> *Akshay Joshi* >>>> >>>> *Sr. Software Architect * >>>> >>>> >>>> >>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* >>>> >>> >>> >>> >>> -- >>> Thanks and Regards, >>> Aditya Toshniwal >>> Software Engineer | EnterpriseDB Software Solutions | Pune >>> "Don't Complain about Heat, Plant a tree" >>> >> >> >> >> -- >> Thanks and Regards, >> Aditya Toshniwal >> Software Engineer | EnterpriseDB Software Solutions | Pune >> "Don't Complain about Heat, Plant a tree" >> > > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --=20 Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB Software Solutions | Pune "Don't Complain about Heat, Plant a tree" --000000000000d8e7a9056fcae8a7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Dave,

On Fri, Jun 29, 2018 at 9:30 PM, Dave Page <<= a href=3D"mailto:dpage@pgadmin.org" target=3D"_blank">dpage@pgadmin.org= > wrote:
Hi

On Fri, Jun 29, 2018 at 3:14 PM, Aditya Toshniwal <aditya= .toshniwal@enterprisedb.com> wrote:
Hi Hackers,=C2=A0

Attached is the = updated patch.

This seems to wo= rk for the most part, however I saw what seemed like odd behaviour. If I ha= ve 2 query tool windows open;

- Changing a prefere= nce from the Preferences dialogue updates both query tools.

<= /div>
- Changing a preference from a Query Tool updates the Preferences= dialogue.

- Changing a preference from a Query To= ol does *not* update the other Query Tool.

The las= t point seems odd to me, though it also kinda makes sense to not have one q= uery tool affect the other. The problem with that is that it could get quit= e confusing when they get out of sync. I think it would be better for a cha= nge in one Query Tool to update the other(s).=C2=A0

What do you think? Was this behaviour intentional?
=C2=A0
=E2=80=8BNo this was not intentional. It= should reflect in other query tools as well because changing the flags lik= e Auto Commit changes the preferences config and is not local to a Query to= ol. I missed the fact that some preferences can be changed from other than = preference dialog.=E2=80=8B
=C2=A0
=E2=80=8BWill send the u= pdated patch with the fix.=E2=80=8B
<= div>
(FYI, in case this was a one-off bug, I was testing usin= g "Auto Commit?")
=C2=A0

On Fri, Jun 29, 2018 at 4:46 PM, Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:<= br>
Hi Akshay,

On Fri, Jun 29, 2018 at 3:42 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Aditya=C2=A0

=
I have applied your patch and run pgAdmin4. I have found following two= issue in the browser:
  • Found error while open Preferences= dialog. Refer Open_Preferences_Dialog.png
= =E2=80=8BThis error occurs even with the latest pull without changes.=E2=80= =8B
=C2=A0
=
  • Set the preferences setting "Open in new browser tab"= ; to True and open the query tool. Refer "Open_In_New_Broswer.png"= ;.
=E2=80=8BWill look into this.=E2=80=8B=C2=A0
I haven't = review the code.

On Thu, Jun 28, 2018 at 8:04 PM, Aditya Toshniwal <= span dir=3D"ltr"><aditya.toshniwal@enterprisedb.com> wrot= e:
Hi Hackers,

Attach= ed is the patch for making preferences realtime and applying without reseti= ng the layout. Please note, the patch is only for one module - SQL Editor a= nd is the first part for the RM. There are lot of changes to be done to cov= er all and hence sending in parts. This will not affect/break existing code= . Further patches will cover other modules.

Highlights of this patch include:
- Changes will affect SQL Editors in Create dialog boxes, SQL ta= b of the main screen, Query tool, History entries in the query tool, Query = tool opened in New Tab/Window
- All the components of SQL editor will refer to single source of pre= ferences which is cached in the Browser object. All other redundant ajax ge= t preference calls are removed.
-=C2=A0SQL editor will not refer template JS variables anymore, o= nce all the references are removed the template variables will also be remo= ved.
- Code refac= toring wherever possible.
- Covered JS test cases wherever possible.

Request you to kindly review.

--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software So= lutions |=C2=A0Pune
"Don't Complain about = Heat, Plant a tree"



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


<= b>Phone: +91 20-3058-9517
Mobile: +91 976-788= -8246



--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Solutions |= =C2=A0Pune
"Don't Complain about Heat, Plant a tree"=



--
Thanks and Regar= ds,
Aditya Toshniwal=
= Softwa= re Engineer |=C2=A0EnterpriseDB Software Solutions |=C2=A0Pune
&qu= ot;Don't Complain about Heat, Plant a tree"



--
Dav= e Page
Blog: h= ttp://pgsnake.blogspot.com
Twitter: @pgsnake

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



--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Sol= utions |=C2=A0Pune
"Don't Complain about Heat, Plant a tr= ee"
--000000000000d8e7a9056fcae8a7--