SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[12.0.191 Pro] - ER: expanding with keyboard instead of mous

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[12.0.191 Pro] - ER: expanding with keyboard instead of mous
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [12.0.191 Pro] - ER: expanding with keyboard instead of mous Reply with quote
When expanding the popup items, SA behaves differently depending on the expanding "tool" (mouse or keyboard). Both tools have their downsides, the mouse is fundamentally flawed (it's slow), and the keyboard does not always behave as expected.

I've made a few short videos, each starting with a popup a SELECT gives. In each case, I'm trying to locate the table supplement_product in schema cs. These are the things I tried:

Expand with the mouse, filter with keyboard
1. filter on schema, expand schema => no further filtering on tables is possible
2. expand schema, filter on tables => no further filtering on columns is possible
3. expand schema, filter on tables, selecting the table or expanding it and selecting columns work with both keyboard or mouse

Expand with the keyboard (right arrow key):
4. filter on schema, expand schema, filter on tables, select table => history lost (the popup no longer shows/allows filtering on schema) selecting a table works (adds all columns)
5. filter on schema, expand schema, filter on tables, expand table => see case #4 plus history for tables is not lost, selecting a column yields strange results (and no checkboxes anymore)

Notice, that while using the mouse for expansion, the popup retains its current state/history and you can also collapse anything back. You can also (slightly) influence where the filtering will happen (even though that filtering seems to be somewhat "inconsistent"): when you expand the schema, the filtering works on tables, but expanding the table does not move the filtering another level down to the columns. Strangely, when the expansion happens at a lower level (table), it doesn't matter if it is done by mouse or keyboard, the history is kept (Case #3 expanding the table in SELECT #1 was done by mouse, in SELECT #2 by keyboard). Also notice, that in case #3, the columns have checkboxes, so further using the right arrow key only selects a column and does not close the popup.

Case #4 is the one I use most (I hate the mouse, did I mention how looooow it is?), but I'd be using case #5 almost all the time if it was working as case #3 does (just with the keyboard).

But that's only a minor bump. The major issue that popup-context-maiming-when-expanding-with-keyboard causes is the loss of checkboxes on the column level. It immediately slaughters the $OBJECT(ins_column, column)$ and $COLUMN$ macros as it's no longer possible to select columns. Both of these macros behave as if all the columns were selected, even if you only select one of them (or their table).

In contrast to the plain SELECT, which loses its column level checkboxes when the schema level is expanded by keyboard, these macros are screwed even if the keyboard expansion happens only on the table node, therefore they won't work properly unless you keep switching between the keyboard and the mouse just for the sake of expanding the current node. That makes it even slower :(

What's the idea/reason behind changing the popup/popup-contents when expanding the schema with the keyboard (instead of working the same way doing the same thing with the mouse)? Could you make the two work the same way?
Wed Jan 26, 2022 8:54 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7842

Post Reply with quote
I'm not sure if my explanation would help. But here it's. The internal mechanics are complicated and based on the expansion level there are different feeds that into the popup. When you type your filter, you actually continue your previous keystroke sequence, and that text you type for the filter is actually what you type in the editor, not in the popup. This is it. As soon as you click the popup window, you move input focus and break the input sequence. So now, if you click the editor again, the original context is lost, the editor window gets activated and it's like the input starts from scratch. What intellisense finds in the editor at that time is "SELECT supplenamm" which it doesn't recognize as a valid object name, nor as a beginning of a valid object name as there is no such objects.. This loss of input context is what leads to behavior differences, the intellisense is basically gets reset. That's not the case when using the navigation keys, there are no focus/context switches. After watching your videos I believe you use "Name Contains Characters from Key String, Order Alphabetically" or similar"...Best Match" name matching option, which makes the behavior more difficult to understand in this particular case because the characters typed are not matched sequentially.

What I wrote above is an attempt to explain what happens behind the scenes, and not a statement about correct or incorrect behavior. As you noticed already there are some rough edges, and I'm sure they can be smothered. We are working on making incremental improvements in the Intellisense improving something in each maintenance release and I hope they can be improved soon.

By the way, the last video demonstrates a valid case - fully qualified column name may include 3 parts starting with the schema name.
Thu Jan 27, 2022 9:47 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
Cases #1 and #2 are not really interesting here, I tried those out of curiosity. Using the more sophisticated name matching method doesn't complicate it either, that works perfectly, switching to the most basic one (Name Starts with Key String) behaves exactly the same, you just have to type way more for the same result.

I can follow you but it seems that our conclusions are rather different. I'll try to clarify what my problem is. The context-switch/loss is, you say, connected to losing focus by clicking popup and that there's no context-switch when using the keyboard. That would be my dream scenario, as I couldn't care less about using the mouse but what I see tells me exactly the opposite, and that's my woe and sorrow.

Let's prescind now from filtering which can only be done by keyboard. Using the mouse you can traverse back and forth (or rather up and down) in the hierarchy the popup shows after the SELECT. You can expand/collapse the items on different levels (schemas and tables) and you have checkboxes for selecting columns. You can select columns from one table and that table will be immediately added to the generated code for the SELECT statement. You can check columns from another table, multiple tables even, without losing that initial popup, and they will all be added to the code. You can also uncheck columns to remove them from the query. Though when you uncheck all of them for a table, that table will still be there. That means there's no context loss at all, SA is completely aware of everything you're doing the whole time until you close the popup. That's great, that's what I need, that's what those macros ($COLUMN$, $OBJECT$) need. But that only works consistently when you use the mouse.

When you have the table in the active/default schema, that is, you don't have to expand the schema, using the right arrow key to expand that table works the same as it would using the mouse. Check this short video here. You can use the checkboxes (and the right/left arrow keys) to select/check columns and they will be added/removed to the query as they would using the mouse. You can even use filtering. That's expected, it's fast and it's great.

The problems arise when you need tables that are in other schemas than your current/default. And let's drop filtering now so that it does not interfere in any way. You're only using the keyboard to navigate and expand items in the popup. Expanding the schema with the mouse still works (but is slow, if I haven't said yet), and in spite of what you said there won't be a context switch. On the other hand, expanding it with the keyboard instantly removes the schemas from the picture. You cannot collapse it again, as the popup now contains only tables (and perhaps other items in that schema). The popup also no longer has checkboxes for table columns, regardless of they are being expanded using the mouse or the keyboard. It behaves as if I haven't expanded that schema but hit enter on it to insert it into the editor and immediately slammed the period key that triggered another, completely different, generic popup that has absolutely no knowledge of the fact that it has been invoked for a SELECT statement and that it ought to have checkboxes. This kills the performance gain on the keyboard. It also severely maims the mentioned macros.

And this is the cause of most of my grief.
Thu Jan 27, 2022 12:41 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.