Subject: [pgAdmin][Patch] #4059 Query Tool button in Query Tool to open a new Query Window

From: Rahul Shirsat <[email-masked]>
Date: Thu, 27 Aug 2020 20:10:30 +0530

Hi Hackers,

Please find the attached patch below which adds the functionality of the
query tool button in the query tool sqleditor.

*Acceptance criteria:*
- For sqleditor on same window & on new tab:

   - When a query tool connection is initiated, as expected it will open
   the connection based on the selected database in the treeview. Now, when
   the user clicks the query tool connection button on the query tool window,
   irrespective of the selected database in treeview, it should open a
   connection based on the query tool connected database.
   - Similarly, for a new tab, clicking on the query tool connection
   button, it should open a connection based on the query tool connected
   database, instead of selected treeview node.

Additionally, an error is handled in the form of message dialog prompting
the user to initiate the connection, when sqleditor is opened in the new
tab with the main application window kept closed. This can be reviewed by
refreshing the window as well as clicking on the query tool connection
button.

A prompt dialog message box is seen as:

-- 
*Rahul Shirsat*
Software Engineer | EnterpriseDB Corporation.

---

From: Rahul Shirsat <[email-masked]>
Date: Thu, 27 Aug 2020 20:15:29 +0530

Please find the update patch attached here.

---

From: Akshay Joshi <[email-masked]>
Date: Fri, 28 Aug 2020 18:24:14 +0530

Thanks, patch applied.

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*

---

From: Rahul Shirsat <[email-masked]>
Date: Wed, 9 Sep 2020 18:23:13 +0530

Hi Akshay,

Please find the attached patch which adds / corrects following features /
issues :

1. Added tooltip & keyboard shortcut for query tool button
2. Corrected the *Uncaught TypeError: Cannot read property ‘i’ of undefined*
    This issue can be reproduced by :
     *Keeping the click on any node other than database, refresh the page,
open the same server (it should navigate to the previously selected node),
open query tool, now open query tool via sqleditor query tool button, issue
should be reproduced* - *Resolved*
3. Aditya's changes for *popups are blocked* are now extended for the new
tab query tool too.

On Fri, Aug 28, 2020 at 6:24 PM Akshay Joshi <[email-masked]>
wrote:

>>>    - When a query tool connection is initiated, as expected it will
>>>    open the connection based on the selected database in the treeview. Now,
>>>    when the user clicks the query tool connection button on the query tool
>>>    window, irrespective of the selected database in treeview, it should open a
>>> Additionally, an error is handled in the form of message dialog
>>> prompting the user to initiate the connection, when sqleditor is opened in
>>> the new tab with the main application window kept closed. This can be
>>> reviewed by refreshing the window as well as clicking on the query tool
>>> connection button.
>>>

---

From: Akshay Joshi <[email-masked]>
Date: Wed, 9 Sep 2020 20:13:23 +0530

Thanks, patch applied.

On Wed, Sep 9, 2020 at 6:23 PM Rahul Shirsat <[email-masked]>
wrote:

>      *Keeping the click on any node other than database, refresh the
> page, open the same server (it should navigate to the previously selected
> node), open query tool, now open query tool via sqleditor query tool
> button, issue should be reproduced* - *Resolved*
> On Fri, Aug 28, 2020 at 6:24 PM Akshay Joshi <
> [email-masked]> wrote:
>
>> Thanks, patch applied.
>>
>>>> Please find the attached patch below which adds the functionality of
>>>> the query tool button in the query tool sqleditor.
>>>>
>>>> *Acceptance criteria:*

---

From: Rahul Shirsat <[email-masked]>
Date: Wed, 9 Sep 2020 21:45:15 +0530

Hi Akshay,

Issue is fixed for alerts getting popped up on the main window instead of
the current window.

On Wed, Sep 9, 2020 at 8:13 PM Akshay Joshi <[email-masked]>
wrote:

> Thanks, patch applied.
>
> On Wed, Sep 9, 2020 at 6:23 PM Rahul Shirsat <
>> 3. Aditya's changes for *popups are blocked* are now extended for the
>> new tab query tool too.
>>
>>

---

From: Akshay Joshi <[email-masked]>
Date: Thu, 10 Sep 2020 12:10:59 +0530

Thanks, patch applied.

On Wed, Sep 9, 2020 at 9:45 PM Rahul Shirsat <[email-masked]>
wrote:

>>> Please find the attached patch which adds / corrects following features
>>> / issues :
>>>