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 1hg6GR-0006x2-6X for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Jun 2019 11:38:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hg6GP-00081k-Ta for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Jun 2019 11:38:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hg6GP-00081d-FH for pgadmin-hackers@lists.postgresql.org; Wed, 26 Jun 2019 11:38:57 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hg6GH-0000g4-S2 for pgadmin-hackers@postgresql.org; Wed, 26 Jun 2019 11:38:56 +0000 Received: by mail-lf1-x144.google.com with SMTP id y17so1361812lfe.0 for ; Wed, 26 Jun 2019 04:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gV3H/0nX4zZdKCu0c4n1ixOsn+g7Npq40Q66sBZsdPg=; b=eZ8jlV9aLGL14yI5po8Rwacn3i43rWEivf+9ISiOu6XWwx/E0QrhN2Np7tHgrH1WPa Vx7d7PbABQCCic/8pCMv/wtNvnOfxtoNRffPQ/UcKM9Y+vIeaEbKC455/J3lDP1c7YmP 50C2gnqWjN/ThOcHWSkp4OOzvWqKe8RXu6Mg6uvK+FNy0mshvaEpjSH+ugfenvcIrSrq 5DFdi9wJWFTRAnxB+OXncQKnaSY694p3YmavV+aYASF9PUb7A2PdowKSec2tD3qjiwbG 3hMU2/Seu7wsy92xmg44JyRoP4+nobFmWQNKK39gakKTyDEtg/vBRegreRHNIGXZPf+O MTRQ== 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=gV3H/0nX4zZdKCu0c4n1ixOsn+g7Npq40Q66sBZsdPg=; b=eRMLo8jSBevGI2jxgdKmt3r4KCUYArsS6P6kch4aQyUzyMU972nENHRjta9ZQezgWC sLC+/hytaRJTE/zLQZOMgUBg7j2zbfvU7XYHpqENHkOFBLT0Ie3zuDeaXbfFp9QB9wEA yv7+qMvifWM6zF/Ja+eo6yaCNlHksSkQZXB9/nOpc0Qz3tLA9tkMmT81Rdp/Tx70DEQJ sI/M6nrhhHfVQLRMCLsCKvOKQf+iBSPMdGDaum3hXFsCq6Wu09dNvVC2DfRyMLqR/BOh eZrGP312fKsv+nDQwx2erWOXGLy85UPA5z66aJn/0pp96nC3rOrfJ1m3Iv0uKCtvIQ3j pTBw== X-Gm-Message-State: APjAAAXtlE45vxJfMLOluruV66t6naA3lmcYqL1lzTYtUV0yCfV14XRe EMh6AncJqMrxwCcw/NE5NPz8awjvZfIjUDIqF6pnAw== X-Google-Smtp-Source: APXvYqxCI2L23SBGvnMgizO9pvh5HbwG4PQ7S1LwhuwILeHnGNi6UJnT/km24WILrRosamBQR91S9icl7U1nC35HrwM= X-Received: by 2002:ac2:4990:: with SMTP id f16mr2351428lfl.93.1561549128034; Wed, 26 Jun 2019 04:38:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Wed, 26 Jun 2019 17:08:12 +0530 Message-ID: Subject: Re: [pgAdmin][RM4139] Drag and drop object names in Query Editor from Browser Tree To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000138836058c387dd7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000138836058c387dd7 Content-Type: text/plain; charset="UTF-8" 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. > > >> >>> 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" --000000000000138836058c387dd7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

=
On Wed, Jun 26, 2019 at 5:06 PM Dave = Page <dpage@pgadmin.org> wro= te:


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 <dp= age@pgadmin.org> wrote:
Hi

On Wed, Jun 26, 2019 at 2:24 AM Adit= ya 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 full= y qualified and double quoted if required.
For functions/procedures it will drop the the label stri= pping away the parameter names, with empty pair of round brackets. It will = also set the focus cursor inside the brackets if there were params otherwis= er to the end of text.
For adding a node type, you need to register it in browser.js along wi= th a callback function which will return drop text along with cursor positi= oning and selection. Currently, I have=C2=A0registered for "table partition type sequence package view = mview foreign_table edbvar schema column edbfunc function edbproc procedure= ".

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

<= /div>
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 para= meter names same as tree node, with cursor selection on all the params ?

Can you select the f= irst 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.
=C2= =A0

Also; sh= ouldn't there be a doc update?
Yeah :/
Should there be any screenshots ?=C2=A0

I don't see much need.
Cool.=C2=A0

=
Thanks.
=C2=A0
<= div>
Thanks.
=C2=A0
--
Dave Page
Blog: http://pgsnake.blogspot.com
Tw= itter: @pgsnake

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


--
Thanks and Regards= ,
Aditya Toshniwal
Software E= ngineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain about Heat, Plant a= TREE"


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

EnterpriseDB UK: http://www.enterprisedb.comThe Enterprise PostgreSQL Company


--
Adi= tya Toshniwal
Software Engineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain a= bout Heat, Plant a TREE"
--000000000000138836058c387dd7--