Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hg6H3-0006y1-HG for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Jun 2019 11: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 1hg6H2-0000S6-8M for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Jun 2019 11:39:36 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hg6H2-0000Rz-02 for pgadmin-hackers@lists.postgresql.org; Wed, 26 Jun 2019 11:39:36 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hg6Gz-00071B-D2 for pgadmin-hackers@postgresql.org; Wed, 26 Jun 2019 11:39:35 +0000 Received: by mail-wr1-x441.google.com with SMTP id p13so2322933wru.10 for ; Wed, 26 Jun 2019 04:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7S8Ivkf07Nb6xlbrZWBQ3b0XcID/33EttSDMdJcNqWI=; b=HqQBUHM77F0s11FkPLtqhIRDW0SHkZeg5B6doaQ/0m8/ZsDqo6R/lYZLL8CenTNKIE tLGyR4RGl0Q0te5X/0MsU8wHgbbhPi2fMKXMIRuT+bKHgb4fRf94maloiRNtHvC3hSaY Lwue5wnRSd4k4eYnS3cqKrh2SCxNQB4i5Yl3fIdqlHk0bL7pu8S8B0dCXaU/8zfp7QZk 3CuhEmiKibyshaLKHon8kfxLoLokNcjdeUjQwanhx9W0Ha5ZFmFRIBGQQD5igt+KssAn XoZHb1fiS8ur2zt8SRa75M+bp6F0Wp7DUHfK0Okcb+FE0eRCoRGRv0AkiGLdNKpqZ68C Em0Q== 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=7S8Ivkf07Nb6xlbrZWBQ3b0XcID/33EttSDMdJcNqWI=; b=Zo5T/bqzJKMu5U4OFLSLu+3wfo7bwJdYkrrPVY3cyf0V76y8MAhesQ3yGQ+gxfQh3H 7Iu4vpp6iM7SqRVI8KbqJnbfcMC3K2+4+RZCsIARAuuc4JDMAwVb1UBO7imS3nzQA/ZL 9vjAIPvEixHGh6Wk8oS7VICWeqUd8Q9RYz8RiC2z6nTmV0L8GDDPNMgfm2A5dQY0XiyY 4gMHGUlVA1GJlP2UTHDuiXgUzklDQhlCxtfGz/BJe9xYxr6xUE2cqQkPJcZGms0ntck/ utAUswxrjaQ0RADyASq+XT4MHb/IW+Mxzs6Qq7wT2cCe/eSQY9yJF3Gcs1ofxk8eRJPL IL/g== X-Gm-Message-State: APjAAAX/WNGApYd/ZiUFc7inDF9K2Qf8ti53MrG++0KbjK7gmJ7TVc3F esFADWcHUdHWkdafE2/AjmWFy5G8IJyD2Uk9TxVLn3eZU62ehA== X-Google-Smtp-Source: APXvYqxh4fmZfYy6R0VoQo9DUy52RfPjq5vrzKBuZlzkdHFAO/RweOJjklDFvbhNlP2XsKh+QNSj1Y3i6TXEy0p0hCo= X-Received: by 2002:a5d:4086:: with SMTP id o6mr3425226wrp.185.1561549172265; Wed, 26 Jun 2019 04:39:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Wed, 26 Jun 2019 07:39:21 -0400 Message-ID: Subject: Re: [pgAdmin][RM4139] Drag and drop object names in Query Editor from Browser Tree To: Aditya Toshniwal Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000b65d89058c387ff1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000b65d89058c387ff1 Content-Type: text/plain; charset="UTF-8" On Wed, Jun 26, 2019 at 7:38 AM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi, > > On Wed, Jun 26, 2019 at 5:06 PM Dave Page wrote: > >> >> >> On Wed, Jun 26, 2019 at 7:28 AM Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi, >>> >>> On Wed, Jun 26, 2019 at 4:51 PM Dave Page wrote: >>> >>>> Hi >>>> >>>> On Wed, Jun 26, 2019 at 2:24 AM Aditya Toshniwal < >>>> aditya.toshniwal@enterprisedb.com> wrote: >>>> >>>>> Hi Hackers, >>>>> >>>>> Attached is the patch to allow tree nodes to be dragged and dropped in >>>>> query editor wherever you take the drop cursor. The drop text will be fully >>>>> qualified and double quoted if required. >>>>> For functions/procedures it will drop the the label stripping away the >>>>> parameter names, with empty pair of round brackets. It will also set the >>>>> focus cursor inside the brackets if there were params otherwiser to the end >>>>> of text. >>>>> For adding a node type, you need to register it in browser.js along >>>>> with a callback function which will return drop text along with cursor >>>>> positioning and selection. Currently, I have registered for "table >>>>> partition type sequence package view mview foreign_table edbvar schema >>>>> column edbfunc function edbproc procedure". >>>>> >>>>> Please note, the drag design customisation is not supported in IE. >>>>> >>>> >>>> I think for functions/procedures, we should include placeholders for >>>> the parameters, so the user has a hint about what they need to fill in to >>>> complete the call. >>>> >>> I can fill in the parameter names same as tree node, with cursor >>> selection on all the params ? >>> >> >> Can you select the first one, and put the cursor in front of it? >> > Yes. Will do that. So that, just after drop if the user types anything it > will replace the first param name. > Right. > >> >>> >>>> Also; shouldn't there be a doc update? >>>> >>> Yeah :/ >>> Should there be any screenshots ? >>> >> >> I don't see much need. >> > Cool. > :-) > >> Thanks. >> >> >>> >>>> Thanks. >>>> >>>> -- >>>> 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 India | 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 India | 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 --000000000000b65d89058c387ff1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jun 26, 2019 at 7:38 AM Adity= a Toshniwal <aditya= .toshniwal@enterprisedb.com> wrote:
Hi,

On Wed, Jun 26, 2019 at 5:06 PM Da= ve Page <dpage@pg= admin.org> wrote:


On Wed, Jun 26, 2019 at 7:= 28 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
=
Hi,

On We= d, Jun 26, 2019 at 4:51 PM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Wed, Jun 2= 6, 2019 at 2:24 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com&g= t; wrote:
Hi Hackers,
<= div style=3D"font-family:verdana,sans-serif">
Attached is the patch to allow tree nodes to be d= ragged and dropped in query editor wherever you take the drop cursor. The d= rop text will be fully qualified and double quoted if required.
For functions/procedures it will dr= op the the label stripping away the parameter names, with empty pair of rou= nd brackets. It will also set the focus cursor inside the brackets if there= were params otherwiser to the end of text.
For adding a node type, you need to register it i= n browser.js along with a callback function which will return drop text alo= ng with cursor positioning and selection. Currently, I have=C2=A0registered for "table partition type s= equence package view mview foreign_table edbvar schema column edbfunc funct= ion edbproc procedure".

Please note,= the drag design customisation is not supported in IE.

I think for functions/procedures, we should = include placeholders for the parameters, so the user has a hint about what = they need to fill in to complete the call.
I= can fill in the parameter names same as tree node, with cursor selection o= n all the params ?

Can you select the first one, and put the cursor in front of it?
Yes. Will do that. So that, just after drop if the us= er types anything it will replace the first param name.
<= /div>

Right.
=C2=A0
=C2=A0

Also; shouldn't there be a doc update?
Yeah :/
Should there be any scree= nshots ?=C2=A0

I d= on't see much need.
Cool.=C2=A0

:-)
=C2=A0
=

Thanks.
=C2=A0

Than= ks.
=C2=A0
--
Dave Page
Blog: http://pgsnake.blogspot.com<= br>Twitter: @pgsnake

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


--
<= div>
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB India |=C2=A0<= /span>Pune
"Don't Co= mplain about Heat, Plant a TREE"
<= /div>


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

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


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


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

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