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 1gp9DP-0001Rk-5j for pgadmin-hackers@arkaria.postgresql.org; Thu, 31 Jan 2019 10:04: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 1gp9DN-0002m3-SC for pgadmin-hackers@arkaria.postgresql.org; Thu, 31 Jan 2019 10:04: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 1gp9DN-0002aJ-Ct for pgadmin-hackers@lists.postgresql.org; Thu, 31 Jan 2019 10:04:57 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gp9DK-0002fk-Ad for pgadmin-hackers@postgresql.org; Thu, 31 Jan 2019 10:04:55 +0000 Received: by mail-ot1-x32b.google.com with SMTP id w25so2255021otm.13 for ; Thu, 31 Jan 2019 02:04:54 -0800 (PST) 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=TAV/b7eaFymaJS6RxBDhbZN+5aXHFyLiJ85wq2Vwvgw=; b=kQKXplTvPWmWDQottVUxEuRHlSsZyy5wYKvJgVCL7bd/7gQDJscgpFE6Q05ui4JYlG eMXdimu5O2QTWsBBRoS0cfSNIpMIp+JbQJ9PnjN8SgqGHawqwC1ZNP+BL9C8TeCpY0j+ tshngC9UMeyeodkOWR3x/mrICZuF0RI3Pl0RCrG6aZZxzAMJaUKxtCgRQYMFQ8UpK4Uo RO+tq4Sk1dsIj0ntdkXkryKMlZ5Hjol2qtIY1BWAyTTLaBrrlwl8KKUvypR2w5x9mr+p hgj1sTazsjlULCzk/bOp1ZzF70gvEa/Ik/p9M9osPAurIszojy4cRkdG1q9R6yJYHzQ0 jGOg== 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=TAV/b7eaFymaJS6RxBDhbZN+5aXHFyLiJ85wq2Vwvgw=; b=ZzKMzWTYGI+8bgVS54kRtWPytzo4pF5Czszu9hpTF3GGJMBlJfIJ+G6lqt1vSLQGHE 3irSPMOf1KnscjG1etn0Nft7SARIVD2lQPxuRVoHIXTL3kKjrW56432xDJK4nD1rZpQh pleTKf3Zo0+KKWcDOHonbeF2VNnUYGIXLfcWrmnDaOei8WvPdYz3XWGu3NRcyCtjeKeX Ma7suOufx8QObmcaA2ttgcob9cnl4V+rPFsW5bxssosUuo5IKwq1u5t2TfOzKxQT/zrT nm8OggXwr3IZ3iEZOaIYL+hmnyEStsJ6mxaW0w6F2NhOSXDBcD/hoxvoJsUKUAaUiHa3 pk4w== X-Gm-Message-State: AHQUAuZcLnXR19B8W25x1I0Z8voD0MtKZSNiYCQvz+3aPD/kHrAFS/JM VUzvdPNL1epZ7Yz3QJU9/A+MpF3wGQydhX+05onw2w== X-Google-Smtp-Source: AHgI3IbumJg68+jcoctwRE3Lk+UpTsCYqZf5vCqSTuzuCEsqZrXh9ycPvCSz3KZGUDbiQyeTFZg8YS8h/VNvxpG7ERA= X-Received: by 2002:a9d:6419:: with SMTP id h25mr2466964otl.34.1548929093578; Thu, 31 Jan 2019 02:04:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ashesh Vashi Date: Thu, 31 Jan 2019 15:34:42 +0530 Message-ID: Subject: Re: Remove hacky way to open/close the dropdown-submenu To: Aditya Toshniwal Cc: "khushboo.vashi" , pgadmin-hackers Content-Type: multipart/mixed; boundary="00000000000067eabe0580be288a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000067eabe0580be288a Content-Type: multipart/alternative; boundary="00000000000067eabb0580be2888" --00000000000067eabb0580be2888 Content-Type: text/plain; charset="UTF-8" On Thu, Jan 31, 2019 at 2:38 PM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Ashesh, > > All works good, except one small change. Submenus should be closed if I > press Esc and then reopen the menu. > Please find the updated patch to resolve the review comments. -- Thanks, Ashesh > > On Thu, Jan 31, 2019 at 11:32 AM Ashesh Vashi < > ashesh.vashi@enterprisedb.com> wrote: > >> Hi Aditya, >> >> On Tue, Jan 22, 2019 at 10:25 AM Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Ashesh, >>> >>> I am getting a syntax error on bundle. >>> After fixing that, please look into this scenario: >>> Using keyboard shortcuts open object menu, for eg on table node. Go to >>> any submenu using keyboard and go to any submenu and press enter. >>> Now open object menu again using keyboard shortcut, the submenu remains >>> open. It should be closed. >>> >> Please find the updated patch with all comments fixed. >> Now - whenever the callback for the menu is called (menu toggling), it >> will close the existing submenu(s) too. >> >> Please review it, and let me know. >> >> -- >> >> Thanks & Regards, >> >> Ashesh Vashi >> EnterpriseDB INDIA: Enterprise PostgreSQL Company >> >> >> >> *http://www.linkedin.com/in/asheshvashi >> * >> >> >>> >>> Everything looks fine to me except the above. >>> >>> >>> On Tue, Jan 22, 2019 at 10:07 AM Ashesh Vashi < >>> ashesh.vashi@enterprisedb.com> wrote: >>> >>>> Any update? >>>> >>>> -- >>>> >>>> Thanks & Regards, >>>> >>>> Ashesh Vashi >>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company >>>> >>>> >>>> >>>> *http://www.linkedin.com/in/asheshvashi* >>>> >>>> >>>> >>>> On Thu, Jan 17, 2019 at 7:39 PM Ashesh Vashi < >>>> ashesh.vashi@enterprisedb.com> wrote: >>>> >>>>> Hi Aditya/Khushboo, >>>>> >>>>> I can see a hacky way to open/close the dropdown-submenu in the >>>>> menu.js file. >>>>> I've followed a more general way to open/close any submenu in the >>>>> dropdown list, instead of just 'Objects' menu. >>>>> >>>>> Can you please review it, and let me know your thoughts? >>>>> Let me know if you have any other better approach. >>>>> >>>>> >>>>> -- >>>>> >>>>> Thanks & Regards, >>>>> >>>>> Ashesh Vashi >>>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company >>>>> >>>>> >>>>> >>>>> *http://www.linkedin.com/in/asheshvashi* >>>>> >>>>> >>>> >>> >>> -- >>> 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" > --00000000000067eabb0580be2888 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Thu, Jan 31, = 2019 at 2:38 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:

Hi=C2=A0Ashesh,

All w= orks good, except one small change. Submenus should be closed if I press Es= c and then reopen the menu.
Please find the up= dated patch to resolve the review comments.

-- Tha= nks, Ashesh=C2=A0
On Thu, = Jan 31, 2019 at 11:32 AM Ashesh Vashi <ashesh.vashi@enterprisedb.com> wro= te:
Hi Aditya,

On Tue, Jan 22, 2019 at= 10:25 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:=
Hi Ashesh,

I am getting a syntax erro= r on bundle.=C2=A0
After= fixing that,=C2=A0 please look=C2=A0into this scenario:
Using keyboard shortcuts open object menu,= for eg on table node. Go to any submenu using keyboard and go to any subme= nu and press enter.
Now = open object menu again using keyboard shortcut, the submenu remains open. I= t should be closed.
Please find the updated pa= tch with all comments fixed.
Now - whenever the callback for the = menu is called (menu toggling), it will close the existing submenu(s) too.<= /div>

Please review it, and let me know.

--

Tha= nks & Regards,

Ashesh Vashi
EnterpriseDB INDI= A:=C2=A0E= nterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi

=C2=A0

Everything lo= oks fine to me except the above.


On Tue, Jan 22, 2019 at 10:07 AM Ashesh Vashi <ashesh.vas= hi@enterprisedb.com> wrote:
Any update?

--

Thanks & Regards,<= /span>

Ashesh Vashi

EnterpriseDB INDIA: Enterprise PostgreSQL Co= mpany


http://www.linkedin.com/in/asheshvashi



O= n Thu, Jan 17, 2019 at 7:39 PM Ashesh Vashi <ashesh.vashi@enterprisedb.com&g= t; wrote:
Hi Aditya/Khushboo,

I can see a hacky way to = open/close the dropdown-submenu in the menu.js file.
I've fol= lowed a more general way to open/close any submenu in the dropdown list, in= stead of just 'Objects' menu.

Can you plea= se review it, and let me know your thoughts?
Let me know if you h= ave any other better approach.
=C2=A0

--<= /span>

= Thanks & Regards,

Ashesh Vashi
Enterpr= iseDB INDIA: Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi



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


--
=
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Sol= utions |=C2=A0Pune
"Don't Complain about Heat, Plant a tr= ee"
--00000000000067eabb0580be2888-- --00000000000067eabe0580be288a Content-Type: application/octet-stream; name="pgadmin_submenu_open_v3.patch" Content-Disposition: attachment; filename="pgadmin_submenu_open_v3.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jrkgd8jk0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc3RhdGljL2pzL2Jyb3dzZXIuanMgYi93 ZWIvcGdhZG1pbi9icm93c2VyL3N0YXRpYy9qcy9icm93c2VyLmpzCmluZGV4IDJhY2NkMTguLjUx OTliYzggMTAwNjQ0Ci0tLSBhL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc3RhdGljL2pzL2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biBwZ0FkbWluLkJyb3dzZXIuTWVudUl0ZW07CiB9KTsK --00000000000067eabe0580be288a--