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 1fb1fk-0007MJ-Om for pgadmin-hackers@arkaria.postgresql.org; Thu, 05 Jul 2018 10:39:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fb1fj-0002pu-2U for pgadmin-hackers@arkaria.postgresql.org; Thu, 05 Jul 2018 10:39:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fb1fi-0002pl-Sl for pgadmin-hackers@lists.postgresql.org; Thu, 05 Jul 2018 10:39:34 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fb1ff-0006eF-Ks for pgadmin-hackers@postgresql.org; Thu, 05 Jul 2018 10:39:34 +0000 Received: by mail-wr1-x442.google.com with SMTP id b15-v6so904327wrv.10 for ; Thu, 05 Jul 2018 03:39:31 -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=8VFwJMyUfIF8kXgpPFa6UgPxqUl7e7uQQ8t3/aVFsXw=; b=xx6D1DK29tnMR/QzLBunhuwvx5jAF5Ezqx4Q0pyGdENPBvpF8eWIS+kDCMLoy2t/cJ D3nKQiLpb3Z2tN82Hk7n7TAa+vHIdDCp8V5X6fCfcanYEKRqz+47kogW3+QFzMnqTw6D CIv2zRNuwMF+4Zi0rlBJnFX8/TYc4IvkhWLURbi106VUPWgsjome+98hJrsCcLPmHqub BISR/xyWF214RFHuyMyjSY38V/qiV2HNgJvdSCQDgBb7jjgSXkLzhIz6lH8TjNe+vGvq zBSgukirq2lMMdwLRIsQqe9iiy7SPP/z5v1Wl2GNnHx2oaP9gT/kb0AZem014jkCGdWT OqSw== 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=8VFwJMyUfIF8kXgpPFa6UgPxqUl7e7uQQ8t3/aVFsXw=; b=mUm/Ee+oRcj0SlL0TxdMxEJqbnWv7nSEMx/LhfgJ3BalW3u2V95YPNAnqu54LzFp+g bczmYKeE+fSMbKeQ6vg1i53PED7Wt1vl4/AHBznNTMM0OudSRF3fAX/Au/3KJJosBrrP vYuRDqEsQFfv+R5qe2kAJ3DpJi2SuQXDUqXNp93IkdEVbSvBpXsUEVkG7T4UuQ5zgAQ5 IjwSJowWkNwtbGxaBRADkiF0hJkM4GpOj7Wa9fUuWVWNk3NmsIsRg/Np/7pa388lIyR4 50wPipAnaqt6Yk2+2e11cCFN+oVORE8KHTBL5f1bywOQa9xqjngJPm6JAvoBI+p5pZd3 QSVQ== X-Gm-Message-State: APt69E3HYYh3SCCEnCoEYM41oha7r2FjTEDrV9g4+H+H0kB3YGoNeyjH LbS7vFr+GAREvC+lqvaa0O2DI2GC2GXnXrF188GkS7DS X-Google-Smtp-Source: AAOMgpeoRXUCV1YV7Lzl2D4x5xZNCHkcx44Vn91i7faJaP4xrisHvuWrcxYx8hQEWq7G/0z1mNGIa+QIMax77ubXb7M= X-Received: by 2002:adf:e590:: with SMTP id l16-v6mr3864364wrm.190.1530787170524; Thu, 05 Jul 2018 03:39:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:8955:0:0:0:0:0 with HTTP; Thu, 5 Jul 2018 03:39:29 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Thu, 5 Jul 2018 11:39:29 +0100 Message-ID: Subject: Re: [pgAdmin4][RM3294] User need to reset the layout to see the changed preferences parameters To: Aditya Toshniwal Cc: Akshay Joshi , pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000086b05b05703e291d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000086b05b05703e291d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks - patch applied! On Wed, Jul 4, 2018 at 10:19 AM, Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Hackers, > > Attached is the updated patch for the RM. Change of the flags like auto > commit, explain->verbose, etc. will reflect in all other open sql editors= . > Kindly review. > > On Fri, Jun 29, 2018 at 10:39 PM, Aditya Toshniwal enterprisedb.com> wrote: > >> 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 < >>> 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 od= d >>> behaviour. If I have 2 query tool windows open; >>> >>> - Changing a preference from the Preferences dialogue updates both quer= y >>> tools. >>> >>> - Changing a preference from a Query Tool updates the Preferences >>> dialogue. >>> >>> - 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 b= e >>> 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 t= ools 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= module >>>>>>> - SQL Editor and is the first part for the RM. There are lot of cha= nges to >>>>>>> be done to cover all and hence sending in parts. This will not affe= ct/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 o= f >>>>>>> the main screen, Query tool, History entries in the query tool, Que= ry 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 redund= ant 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 remo= ved. >>>>>>> - 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 >>> >> >> >> >> -- >> 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" > --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --00000000000086b05b05703e291d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks - patch applied!
On Wed, Jul 4, 2018 at 10:19 AM, Aditya Toshni= wal <aditya.toshniwal@enterprisedb.com> wrot= e:
Hi Hackers,

Attached = is the updated patch for the RM. Change of the flags like auto commit, expl= ain->verbose, etc. will reflect in all other open sql editors.
Kindly re= view.

On Fri, Jun 29, 2018 at 10:39 PM, A= ditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Dave,<= /div>

On Fri= , Jun 29, 2018 at 9:30 PM, Dave Page <dpage@pgadmin.org> wro= te:
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 work for the most part, howe= ver I saw what seemed like odd behaviour. If I have 2 query tool windows op= en;

- Changing a preference from the Preferences d= ialogue updates both query tools.

- Changing a pre= ference from a Query Tool updates the Preferences dialogue.

<= /div>
- Changing a preference from a Query Tool does *not* update the o= ther Query Tool.

The last point seems odd to me, t= hough 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 u= pdate the other(s).=C2=A0

What do you think? Was t= his behaviour intentional?
= =C2=A0
=E2=80=8BNo this was not intentional. It should reflect in = other query tools as well because changing the flags like Auto Commit chang= es the preferences config and is not local to a Query tool. I missed the fa= ct that some preferences can be changed from other than preference dialog.= =E2=80=8B
=C2=A0
=E2=80=8BWill send the updated patch with th= e fix.=E2=80=8B

(FYI, in case this was a one-off= bug, I was testing using "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 To= shniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

Attached is the patch for making preferences realtime and applying wit= hout reseting the layout. Please note, the patch is only for one module - S= QL Editor and is the first part for the RM. There are lot of changes to be = done to cover all and hence sending in parts. This will not affect/break ex= isting code. Further patches will cover other modules.

Highlights of this patch include:
- Changes will affect SQL Editors in Create dialog bo= xes, SQL tab of the main screen, Query tool, History entries in the query t= ool, Query tool opened in New Tab/Window
- All the components of SQL editor will refer to single so= urce of preferences which is cached in the Browser object. All other redund= ant ajax get preference calls are removed.
-=C2=A0SQL editor will not refer template JS variables= anymore, once all the references are removed the template variables will a= lso be removed.
-= Code refactoring wherever possible.
- Covered JS test cases wherever possible.

Request you to kindly review.

--
Thanks and Regards,
Aditya Toshniwal
<= font face=3D"verdana, sans-serif">Software Engineer |=C2=A0Enterp= riseDB Software Solutions |=C2=A0Pune
"Don'= ;t Complain about Heat, Plant a tree"
<= /div>



-- =
Aksh= ay Joshi
Sr. Software Architect


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



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



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



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

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


--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0Enter= priseDB Software Solutions |=C2=A0Pune<= /span>
"Don't Complain ab= out Heat, Plant a tree"



--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0Enter= priseDB Software Solutions |=C2=A0Pune<= /span>
"Don't Complain ab= out Heat, Plant a tree"



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

EnterpriseDB UK: http://www.enterprised= b.com
The Enterprise PostgreSQL Company
--00000000000086b05b05703e291d--