First Last Prev Next    No search results available
Details
: Execute quickJump / quickMove with [Enter] if unique match
Bug#: 26565
: QuickFolders
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Linux
: unspecified
: P3
: enhancement
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Arian Bloodwood <arian@bloodwoodaccounting.com>
Assigned To: Axel Grude <axel.grude@gmail.com>
:

Attachments
Example for some "unwanted" child folders (9.63 KB, image/png)
2018-07-10 06:11, Axel Grude
no flags Details
4.10.1 prerelease 37 (758.34 KB, application/x-xpinstall)
2018-07-10 06:20, Axel Grude
no flags Details
4.11 prerelease 252 (765.95 KB, application/x-xpinstall)
2018-10-07 11:42, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2018-07-10 04:18
When I select an email and hit Shift + M which pulls up the "Folder name" data
entry box, when I type in a few letters of a folder and only one folder is
found, would it be possible to automatically highlight that folder as selected,
so that then all I need do is hit Return, and the email is moved to that
folder?
Thanks!
------- Comment #1 From Axel Grude 2018-07-10 04:30:55 -------
(In reply to comment #0)
> When I select an email and hit Shift + M which pulls up the "Folder name" data
> entry box, when I type in a few letters of a folder and only one folder is
> found, would it be possible to automatically highlight that folder as selected,
> so that then all I need do is hit Return, and the email is moved to that
> folder?
> Thanks!
> 
We can't "highlight" the menu item because it will take the focus away from the
textbox and you won't be able to finish typing. But we can probably catch the
"Enter" keystroke from the textbox. At the moment you can use Arrow-Down to
access the target folders on the menu, so no mouse interaction is required, but
it's awkward.

It may also be a good idea to turn the enter into a signal to jump into the
menu if there are multiple options.
------- Comment #2 From Tony Mechelynck 2018-07-10 05:16:05 -------
If I'm not mistaken, the down-arrow key is used many places to open a
completion rolldown widget for an entry box. Wouldn't it be more consistent
here also, to intercept <Down> for data completion and <Enter> to terminate
entry?
------- Comment #3 From Axel Grude 2018-07-10 05:28:08 -------
(In reply to comment #2)
> If I'm not mistaken, the down-arrow key is used many places to open a
> completion rolldown widget for an entry box. Wouldn't it be more consistent
> here also, to intercept <Down> for data completion and <Enter> to terminate
> entry?
> 

we already use the DOWN key for selecting the first item on the folder list. I
feel it shouldn't be used for completing the action (Jump To Folder / Move
Mail).

I am currently debugging, and I do recall having coded the behavior of
auto-jumping (but not moving mail) with Enter, but it doesn't appear to work
anymore. Keyboard focus with drop downs is devilishly difficult to debug /
implement.
------- Comment #4 From Axel Grude 2018-07-10 06:00:32 -------
(In reply to comment #1)
> (In reply to comment #0)
> > When I select an email and hit Shift + M which pulls up the "Folder name" data
> > entry box, when I type in a few letters of a folder and only one folder is
> > found, would it be possible to automatically highlight that folder as selected,
> > so that then all I need do is hit Return, and the email is moved to that
> > folder?
> > Thanks!
> > 
> We can't "highlight" the menu item because it will take the focus away from the
> textbox and you won't be able to finish typing. But we can probably catch the
> "Enter" keystroke from the textbox. At the moment you can use Arrow-Down to
> access the target folders on the menu, so no mouse interaction is required, but
> it's awkward.
> 
> It may also be a good idea to turn the enter into a signal to jump into the
> menu if there are multiple options.
> 
One more bigger question:

at the moment the code only works if there is only one result, which means if
the folder has child folders it will not work. Should it work in this case as
well? I suggest it should only if the full name of the folder is entered and
not just a partial match.

The current behavior will also match the _beginnings_ of strings if the folder
name contains spaces, e.g:

Folder: "Open Invoices"

user types "inv" => will match

My suggestion is to only match the full string for the [Enter] shortcut if the
search turns additionally up its child folders. (hence more than one search
result is encountered)
------- Comment #5 From Axel Grude 2018-07-10 06:04:07 -------
(In reply to comment #4)
> (In reply to comment #1)
> > (In reply to comment #0)
> > > When I select an email and hit Shift + M which pulls up the "Folder name" data
> > > entry box, when I type in a few letters of a folder and only one folder is
> > > found, would it be possible to automatically highlight that folder as selected,
> > > so that then all I need do is hit Return, and the email is moved to that
> > > folder?
> > > Thanks!
> > > 
> > We can't "highlight" the menu item because it will take the focus away from the
> > textbox and you won't be able to finish typing. But we can probably catch the
> > "Enter" keystroke from the textbox. At the moment you can use Arrow-Down to
> > access the target folders on the menu, so no mouse interaction is required, but
> > it's awkward.
> > 
> > It may also be a good idea to turn the enter into a signal to jump into the
> > menu if there are multiple options.
> > 

> 
> The current behavior will also match the _beginnings_ of strings if the folder
> name contains spaces, e.g:

forget that, I made a mistake when testing - child folders are only listed if
the string is ended with a forward slash [/] - there are additional complicated
matching rules involved for child folders (e.g. "in string search" is not
allowed for parent folders) but this is it in a nutshell

> 
------- Comment #6 From Axel Grude 2018-07-10 06:11:24 -------
Created an attachment (id=8500) [details]
Example for some "unwanted" child folders

Here is an example I have the folders

Areneco
  areneco-dev
  Areneco-Trello

[the reason for naming the child folders was to make them unique, as I have
multiple "Trello" / "Dev" folders in my folder tree]

The 2nd and 3rd are child folders of "Areneco". So the question is whether we
should using [Enter] as move / jump command if other folders are listed that
"contain" the search string but the folder is a *full* match (ie the folder
name is typed in its entirety) ? 

In this case it seems less complicated & more consistent (even if it's
potentially more keystrokes) to use [Enter] than [DOWN][Enter]
------- Comment #7 From Axel Grude 2018-07-10 06:14:29 -------
(In reply to comment #6)
> Areneco
>   areneco-dev
>   Areneco-Trello
> 
> The 2nd and 3rd are child folders of "Areneco". So the question is whether we
> should using [Enter] as move / jump command if other folders 

I should have written *child folders*

> are listed that
> "contain" the search string but the folder is a *full* match (ie the folder
> name is typed in its entirety) ? 

just to clarify, if there are more related matches elsewhere (that are *not*
children of the main match) then [Enter] should not work. Unless we change it
and make [Enter] work on the first match in the menu generally (which may be
potentially dangerous).

I may be overthinking stuff here...
------- Comment #8 From Axel Grude 2018-07-10 06:20:26 -------
Created an attachment (id=8501) [details]
4.10.1 prerelease 37

Here is a test version for using [Enter] - works for both quickJump and
quickMove.

# I removed the restriction of working for "quickJump only"
# I added code for supporting folder names that contain spaces
------- Comment #9 From Axel Grude 2018-10-07 11:42:09 -------
Created an attachment (id=8531) [details]
4.11 prerelease 252

If a subfolder is selected using the Slash command, e.g.

customers/fred

then QF normally displays the menu item offering to create that folder. This
version removes this menu item if a unique full match has been found (the
folder fred already exists in the parent folder "customers"). Note that this
even works if the parent folder name is not fully entered [e.g. cust/fred] as
long as the first match returned matches the full name (regardless of case).

The [Enter] key will work if only 1 match is found, but it makes the now
shortened menu more intuitive.
------- Comment #10 From Axel Grude 2018-10-16 05:21:40 -------
Fixed in 4.11, released on 16/10/2018

First Last Prev Next    No search results available