Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJyu7-0008Nh-Pz for pgadmin-hackers@arkaria.postgresql.org; Thu, 02 Apr 2020 12:25:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJyu6-0002mu-F1 for pgadmin-hackers@arkaria.postgresql.org; Thu, 02 Apr 2020 12:25:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJyu5-0002mZ-ST for pgadmin-hackers@lists.postgresql.org; Thu, 02 Apr 2020 12:25:02 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jJyu2-0007wR-EF for pgadmin-hackers@postgresql.org; Thu, 02 Apr 2020 12:24:59 +0000 Received: by mail-ed1-x543.google.com with SMTP id a20so3865786edj.2 for ; Thu, 02 Apr 2020 05:24:58 -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=2YFFwYeu4XjQ753ROQXbf4YPNyC/PC2WXoA8cxy862w=; b=MhGp3QLQGTkTQz3cSJjgHt4hbPPGPDvE6Y3UY/KUXMyRBHPQ2ySi8amqjXETnt66hR NExBzjQMOIYDUk9KMLH3JjMEpgQW3MrEM5BhBLXdlvLZ/TRek+E3CkyfruGud0QPeDtZ bo588COexk+kwJM8f935fKBfjC4+C9r/kDaSNlwKY3VT6FqrhVOlBqWZitzZPsAwoVgN VxDlbOukvNU1QTsJzLA9jPnyN+ErGNQ9wyL5BAb6veWZ7yshTpZN5UQypuGBhR0bR+T4 a4jRXeTXyWkaSadzrroZnMaxKJ9tZeTsNLgVOugbHq1/PvSI9vv12D66317A+BCIpR6f zSpg== 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=2YFFwYeu4XjQ753ROQXbf4YPNyC/PC2WXoA8cxy862w=; b=SpKKVrO+eE5I6d4tWsOF0uCGiDfvdddbLZCIEyKWF/i33W2vqqFttXKiwceB6fgh6K CqxUWNbeKvjVFYOkom0FxEmt++dhZdIPtY/8FO8KpD69QBaILplMw/6d6jVn8tpGwD5O 2TxYNcRmdGaNwKVA46As0Y11OKpGXJ4Bm0kC+lgzRf1P5IQRr0li3AB5xhx5cNsEIeDr 6Q+ncHD/Hrq/REGjza1U8EA0LUdLCL4GFcRzqERZRdG5VMg1ukDQWp5/GzzseQPjVeXY BnYatna6HhHm7j3SiKfv/mFtF3saCe8PhT6qZjNwIgAmg1w5iysXR0u2/ecgMrE4ltgb hJPg== X-Gm-Message-State: AGi0PuZm4QeuKYmrmU71WjMKeO+KWfFDNKcChxrzBgIYm4d8DZCB6V8f wXCB44Z/vsglTtDPuRR23U7GFbJsgmgFEM0mvPLgIS5rP5ok/bTbIPbPZe4CwzJPHiUROSCyc8t +xuZ/dTvTB75ww2RRgLb5rwfq5SCNpbZkUbqhQN3ooVnDwz1NOd32Kkn9Dkf7niAOGfDyn9npCC ghfn4ietL1174MHHYz1ARETvpXvnqEj029uttoUlU8gbgd1B/LE/g= X-Google-Smtp-Source: APiQypJSUwuzFBqmCJx6EXOb9qaxSx95KlbTd79gZf+aKID4fVnjKdkzT1dbo6xT47Z+XKxtDG3J5097h6Vf+itrJR4= X-Received: by 2002:a05:6402:753:: with SMTP id p19mr2634935edy.106.1585830296811; Thu, 02 Apr 2020 05:24:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Thu, 2 Apr 2020 17:54:20 +0530 Message-ID: Subject: Re: [pgAdmin][RM2172] Search Objects Functionality To: Khushboo Vashi Cc: Akshay Joshi , pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000084143205a24de326" X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000084143205a24de326 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Khushboo, On Thu, Apr 2, 2020 at 4:49 PM Khushboo Vashi < khushboo.vashi@enterprisedb.com> wrote: > > > On Thu, Apr 2, 2020 at 4:30 PM Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> Hi Khushboo, >> >> Thank you for reviewing. >> >> >> On Thu, Apr 2, 2020 at 4:09 PM Khushboo Vashi < >> khushboo.vashi@enterprisedb.com> wrote: >> >>> Hi Aditya, >>> >>> Review comments: >>> >>> *UI:* >>> >>> 1. When no object is found, the default message should be given, >>> currently no message displayed. >>> 2. Can we have a tooltip on the row "Double click to locate the object >>> in the browser" ? >>> 3. Full stop is missing in the message column objects are disabled in >>> the browser. You can enable them in the preferences dialog ( :D ) >>> and also, we should start the statement with the capital letter. >>> 4. If possible, use the multilevel partition table symbol same as the >>> browser tree. >>> 5. gettext is missing from the search grid header. >>> >> I'll fix all above. >> >>> 6. Suggestion: The search button should be at the end (after type >>> combobox). The current position of the controls suggest that search fo= r >>> the objects and then filter it out but that's not the case. >>> >> I've actually kept the most frequently used controls together. The >> probability of using the types filter is less and a user would generally= go >> for full search. This is how even we generally do. We search first and t= hen >> apply filter if required >> > Right, so type based search on slickgrid data would be useful. > =F0=9F=91=8D > After changing the type, we have to click on the search button. >>> In the current positioning, we should fetch all the records from the >>> backend and then filter those out depending on the type at the client s= ide >>> only, so that will reduce the server requests and slickgrid is efficien= t it >>> do so. >>> >> I'll look into this. My only concern is the data may be outdated, but I >> agree to filter in slickgrid on type change. The user can hit search aga= in >> if required. >> > >>> *Backend:* >>> >>> 1. We do have the list of blueprint, so we can use that list instead of >>> taking the hard coe list in the init method of SearchObjectsHelper >>> class. >>> >> The reason is, we do not support all objects for search objects. Only >> objects under a database are supported. The probability of node type cha= nge >> is very less. >> > True but we can maintain the skip list (which would be less) and we do > have bluprint start with NODE, so it will be easier to fetch. > I would prefer the "in" list rather than "skip" list. Each time a new node is added to pgAdmin, we will have to update the skip list in search objects. With the "in" list, search objects has better control. > 2. While searching the object, we create an object of SearchObjectsHelper >>> on each request. We can create it once while initializing and utilize i= t on >>> every search. >>> >> The intention is to keep SearchObjectsHelper stateless. The object is >> created based on the request data and it is easier to maintain >> independently. >> >>> >>> Note: The functionality is working fine. >>> >> Great. Thanks. >> >>> >>> Thanks, >>> Khushboo >>> >>> >>> >>> >>> >>> On Thu, Apr 2, 2020 at 9:31 AM Khushboo Vashi < >>> khushboo.vashi@enterprisedb.com> wrote: >>> >>>> >>>> >>>> On Wed, Apr 1, 2020 at 6:00 PM Akshay Joshi < >>>> akshay.joshi@enterprisedb.com> wrote: >>>> >>>>> Hi Khushboo, >>>>> >>>>> Can you please review it. >>>>> >>>> I am on it. >>>> >>>>> >>>>> On Mon, Mar 30, 2020 at 2:39 PM Aditya Toshniwal < >>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>> >>>>>> Hi Hackers, >>>>>> >>>>>> Attached is the patch to implement search objects functionality in >>>>>> pgadmin. >>>>>> The feature will allow a user to search for any object in a database= . >>>>>> Highlights of the feature: >>>>>> 1) Search any object with user input text with at least 3 characters= . >>>>>> 2) Search can be done on a specific object type by selecting from th= e >>>>>> types dropdown. >>>>>> 3) The search results grid will show object name, object type and th= e >>>>>> object path on the browser tree. On double clicking the record, it w= ill >>>>>> locate that object on the browser tree. The columns object name and = type >>>>>> are sortable. >>>>>> 4) The object nodes which are disabled (hidden) using preferences >>>>>> will not be visible in the types dropdown. However, in the case of a= ll >>>>>> types, the search records will be visible for those types greyed out= . >>>>>> 5) You can also access search objects dialog using the button on the >>>>>> browser toolbar. >>>>>> >>>>>> Python and JS test cases added. Docs updated. >>>>>> Please review. >>>>>> >>>>>> -- >>>>>> Thanks and Regards, >>>>>> Aditya Toshniwal >>>>>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune >>>>>> "Don't Complain about Heat, Plant a TREE" >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Thanks & Regards* >>>>> *Akshay Joshi* >>>>> >>>>> *Sr. Software Architect* >>>>> *EnterpriseDB Software India Private Limited* >>>>> *Mobile: +91 976-788-8246* >>>>> >>>> >> >> -- >> Thanks and Regards, >> Aditya Toshniwal >> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune >> "Don't Complain about Heat, Plant a TREE" >> > --=20 Thanks and Regards, Aditya Toshniwal pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE" --00000000000084143205a24de326 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Khushboo,

On Thu, Apr 2, 2020 at = 4:49 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:


On = Thu, Apr 2, 2020 at 4:30 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.= com> wrote:
Hi Khushboo,
Thank you for re= viewing.


On Thu, Apr 2, 2020 at 4:09 PM Khushboo Vashi <khushboo= .vashi@enterprisedb.com> wrote:
Hi Aditya,

Revie= w comments:

UI:

1. When no object is found, the default mess= age should be given, currently no message displayed.
2. Can we have a tooltip on the row "Doubl= e click to locate the object in the browser" ?
3. Full stop is missing in the message=C2=A0column objects are disabled in the browser. You can enable them in the p= references dialog ( :D )
and als= o, we should start the statement with the capital letter.
= 4. If possible, use the multilevel partiti= on table symbol same as the browser tree.
5. gettext is missing from the search grid header.<= /div>
I'll fix all above.=C2=A0
6. Suggestion: The search button should be at the en= d (after type combobox).=C2=A0 The current position of the controls suggest= that search for the objects and then filter it out but that's not the = case.
I've actually kept the most frequ= ently used controls together. The probability=C2=A0of using the types filte= r is less and a=C2=A0user would generally go for full search. This is how e= ven we generally do. We search first and then apply filter if required
Right, so type based search on slickg= rid data would be useful.=C2=A0
=F0=9F= =91=8D=C2=A0
After changing=C2=A0the type, we have to click on the search b= utton.
In the current pos= itioning, we should fetch all the records from the backend and then filter = those out depending on the type at the client side only, so that will reduc= e the server requests and slickgrid is efficient it do so.
I'll = look into this. My only concern is the data may be outdated, but I agree to= filter in slickgrid on type change. The user can hit search again if requi= red.

Backend:

1. We do have the list of blueprint, so we can use that li= st instead of taking the hard coe list in the init method of=C2=A0SearchObjectsHelper class.
The reason is, we do not support all objects for search obje= cts. Only objects under a database are supported. The probability of node t= ype change is very less.
True but= we can maintain the skip list (which would be less) and we do have bluprin= t start with NODE, so it will be easier to fetch.
I would prefer the "in" list rather than "skip" l= ist. Each time a new node is added to pgAdmin, we=C2=A0will have to update the skip list in search objects. With the "in" list, s= earch objects has better control.
2. = While searching the object, we create an object of=C2=A0SearchObject= sHelper on each request. We can create it once while initializing and utili= ze it on every search.
The intention is to keep SearchObjectsHelper state= less. The object is created based on the request data and it is easier to m= aintain independently.

Note:=C2=A0The functionality is working fine.=
Great. Thanks.

Thanks,
Khushboo




On Thu, Apr 2, 2020 at 9:31 AM Khushboo Vash= i <= khushboo.vashi@enterprisedb.com> wrote:


On W= ed, Apr 1, 2020 at 6:00 PM Akshay Joshi <akshay.joshi@enterprisedb.com> w= rote:
Hi Khushboo,

Can you please review it.
I am on it.=C2=A0

On Mon, Mar 30, 2020 at 2:39 PM Aditya Toshniwal <aditya.tosh= niwal@enterprisedb.com> wrote:
Hi Hackers,
Attached is the patch= to implement search objects functionality in pgadmin.
The feature will allow a user to search for = any object in a database.
Highlights=C2=A0of the feature:
1) Search any object with user input text with at least 3 charact= ers.
2) Search can be do= ne on a specific object type by selecting from the types dropdown.
3) The search results grid will = show object name, object type and the object path on the browser tree. On d= ouble clicking the record, it will locate that object on the browser tree. = The columns object name and type are sortable.
4) The object nodes which are disabled (hidden) = using preferences will not be visible in the types dropdown. However, in th= e case of all types, the search records will be visible for those types gre= yed out.
5) You can also access search=C2=A0objects dialog using the but= ton on the browser toolbar.

Python and JS t= est cases added. Docs updated.
Please review.
--
=
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer = |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain about Heat, Plant a TREE&qu= ot;


--
Thanks & Regards
Akshay Joshi
<= font color=3D"#3333FF">Sr. Software Architect=
<= font color=3D"#000000" face=3D"arial, sans-serif">EnterpriseDB Software = India Private Limited
Mobile: +91 976-788-8246=


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer |=C2=A0Ent= erpriseDB India |=C2=A0Pune<= /span>
"Don't Complain about Heat, Plant a TREE"=


--
Thanks and Regards,Aditya Toshniwal
pgAdmin Hacker | Sr. S= oftware Engineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain about Heat= , Plant a TREE"
=
--00000000000084143205a24de326--