Re: PATCH: Enable backwards search in SQL Box

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
Cc: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, "J(dot)F(dot) Oster" <jinfroster(at)mail(dot)ru>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Enable backwards search in SQL Box
Date: 2014-02-25 20:56:51
Message-ID: CA+OCxowa0670grhAK_6Wubt2b9o3hdeF5ZQcp5TpZMp89Fzf2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, Feb 25, 2014 at 9:38 AM, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com
> wrote:

> Hi Dave
>
> Ashesh asked me to review the patch. I have reviewed the patch and tested
> it. Found one behavior which gets change after applying the patch.
>
> *Behavior Before*:- When search direction is forward and user press F3,
> it searches the string in forward direction. Similarly if search direction
> is backward and user press F3, it searches the string in the backward
> direction. Nothing will be happen when user press Shift-F3.
>
> *Behavior After *:- When user press F3, it searches the string in
> forward direction while on pressing Shift-F3, it searches the string in
> backward direction. It is not dependent on the search direction selected
> from the dialog. Also the selection of radio button is dependent on the key
> press, if F3 is pressed then forward button is selected and if Shift-F3 is
> pressed then backward is selected.
>
> Is this behavior acceptable?
>

No, I don't think so (if I'm understanding correctly). I believe what
should happen is that:

- F3 should honour the search direction on the radio buttons, in all cases.
If the Forward button is selected, F3 searches forward, and if the
Backwards button is selected, F3 searches backwards.

- Shift-F3 should always do the opposite of what the radio buttons are set
to. So, by default with the Forward radio button selected, Shift-F3 will
search backwards, whilst if the Backwards radio button is selected,
Shift-F3 should search forwards.

The reason for this is that the radio buttons give the most obvious visual
cue, so F3 (Find Next) should follow what they are set to.

>
>
> On Thu, Feb 20, 2014 at 5:09 PM, Ashesh Vashi <
> ashesh(dot)vashi(at)enterprisedb(dot)com> wrote:
>
>> Sure.
>> I will do that.
>>
>>
>> On Thu, Feb 20, 2014 at 4:52 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>>> Ashesh, can you look at, and if appropriate, commit this please?
>>>
>>> Thanks.
>>>
>>> On Mon, Feb 17, 2014 at 5:46 PM, J.F. Oster <jinfroster(at)mail(dot)ru> wrote:
>>> > Hello!
>>> >
>>> > Pressing F3 in query editor makes the previously started search
>>> > continue forwards.
>>> > This patch adds expected behavior for Shift-F3.
>>> >
>>> > There is a minor inconvenience when just changing the search direction
>>> > - you have to press (Shift-)F3 *twice* for the (previous)next occurence
>>> > to get highlighted. That's because first time goes for cursor movement
>>> > to the corresponding boundary of current occurence. But that also
>>> > happens when search direction is changed with dialog radio-buttons, so
>>> > I think it's ok.
>>> >
>>> > --
>>> > Best regards,
>>> > J.F.
>>> >
>>> > --
>>> > Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
>>> > To make changes to your subscription:
>>> > http://www.postgresql.org/mailpref/pgadmin-hackers
>>> >
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company<http://www.enterprisedb.com>
>>
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*<http://www.linkedin.com/in/asheshvashi>
>>
>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517> Mobile: +91 976-788-8246
> <%2B91%20976-788-8246>*
>

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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message David E. Wheeler 2014-02-25 21:23:49 Re: Add CREATE EXTENSION Support
Previous Message Dave Page 2014-02-25 20:22:06 Re: Add CREATE EXTENSION Support