Saving PatternComboBox values when losing focus

18 views
Skip to first unread message

anatoly techtonik

unread,
May 16, 2012, 8:08:55 AM5/16/12
to spyd...@googlegroups.com
Hi,

What everybody think about saving PatternComboBox values when the element losses focus (look find in files widget for example)?
Right now they are only saved when you hit enter or an dialog action.

The issue is here http://code.google.com/p/spyderlib/issues/detail?id=918

I personally +1 on this change, but I am not sure if loosing focus will be enough. For example, when editor is closed or PatternComboBox value is assigned by helper control, such as path picker.

Jed Ludlow

unread,
May 16, 2012, 10:12:33 AM5/16/12
to spyd...@googlegroups.com

-1. No other PatternComboBox in Spyder behaves this way. What if I'm entering text in the combo box but I decide I need to scroll back through code in the editor because I decide to copy and paste something. Now my partial search term is saved in the stack. I guess it's not that bad, but from a usability perspective hitting the Enter key is a pretty common way to signal that you're finished editing and you're ready for the editor to accept your results and do something with them. In my mind, that would include "remembering" my entry.

anatoly techtonik

unread,
May 16, 2012, 12:40:40 PM5/16/12
to spyd...@googlegroups.com
s/not preserving incomplete/preserving incomplete/

Sorry for confusion.

Jed Ludlow

unread,
May 16, 2012, 12:59:55 PM5/16/12
to spyd...@googlegroups.com
I understand your concerns, because I've started with the same
conservative position. It may be easier to speak only about `Find in
files` dialog. I looked into Far Manager, which I used for quite a
long time and saw that it uses the approach with saving your input
automatically - if I call dialog, enter value and press cancel - the
old value is saved. This has a benefit that when you return to the
dialog, you can edit the value that you partially entered earlier even
if you searched for a different thing in the middle.

UX issue are not easy to understand, especially with already developed
habits for particular interface. So, to answer that properly, I'll ask
- what do you gain by saving find filters value only by pressing enter
or executing search? What do you sacrifice for that? How often does
your user case happen?

For me it appeared that not preserving incomplete search queries in
history is more important than having pure history (to tell the truth
I don't consider search history as something that needs extra
management from my side in developer tool).
--
anatoly t.


I guess I'm not too emotionally tied to either approach. After looking more closely at your original message, your proposal was to modify PatternComboBox in general, so that would make "Find in Files" and "Search and Replace" behave the same way. In that light, behavior would remain consistent in all instances, so I retract my original -1 and change it to +1.

Sorry for the hasty first reading.

anatoly techtonik

unread,
May 16, 2012, 2:20:40 PM5/16/12
to spyd...@googlegroups.com
On Wed, May 16, 2012 at 7:59 PM, Jed Ludlow <jed.l...@gmail.com> wrote:
>
> I guess I'm not too emotionally tied to either approach. After looking more
> closely at your original message, your proposal was to modify
> PatternComboBox in general, so that would make "Find in Files" and "Search
> and Replace" behave the same way. In that light, behavior would remain
> consistent in all instances, so I retract my original -1 and change it to
> +1.
>
> Sorry for the hasty first reading.

Thank for review. You didn't mistake. I needed to gather some opinions
if it is worth to make the behavior universal for PatternComboBox in
general. Now I see that it might not be good, but as it appears it is
only used in find and replace widgets, I just go for it. If the new
behavior will be too annoying - we can always revert it, so feel free
to ping me any time. ;)
--
anatoly t.

anatoly techtonik

unread,
May 23, 2012, 5:24:24 PM5/23/12
to spyd...@googlegroups.com
I've actually found this behavior to be worthy for all editable ComboBoxes. This guarantees that mouse driven users (who don't use enter) will not lose their history too.

http://code.google.com/p/spyderlib/source/detail?r=efc44f0ab900
Reply all
Reply to author
Forward
0 new messages