ssborbis / ContextSearch-web-ext

Search engine manager for modern browsers
343 stars 37 forks source link

how to switch to text mode when not finding the target icon #218

Closed hg42 closed 3 years ago

hg42 commented 5 years ago

I'll continue the discussion here:

Originally posted by @hg42 in https://github.com/ssborbis/ContextSearch-web-ext/issues/215#issuecomment-539282649

when thinking about it, I don't have text mode when expanding the "+" in flat mode, so my problem was transformed into another space now.

I am not sure how this could be handled in flat mode.

Eventually, the expanded icons could be shown in single column with title, but this mixed mode seems to be weird and implementation should be difficult.

When hovering over an icon, I get a display of the title below the search box and after some time I get a tooltip. However, when dragging a selection, both title displays and even Ctrl + . do not work.

The most useful option would probably be to have an area or button working as mode switch when hovering over it. May be, a button in the titlebar (with settings and close) would do best.

my main usage scenario:

I see several possibilities (while still dragging):

When switching the whole menu to text mode, it could also expand all (flat) folders, because the next action would be to open one or several folders (using "+"). Scrolling may be easier.

hg42 commented 5 years ago

well, this option would first need an implementation of the tools in the sidebar :-)

  • a tool to switch on hover
ssborbis commented 5 years ago

So the shortcut (ctrl+ . ) doesnt work while dragging... Not sure why that is, but ok. Also, it looks the the title bar doesn't update while dragging ( except folders ). I can probably fix the latter, but dunno about the keyboard shortcut + dnd. I'll have to look up how keyboard events are handled during dnd. Would either of those options get you what you need?

hg42 commented 5 years ago

it looks the the title bar doesn't update while dragging

In further investigations, I found, that the title isn't shown, when moving the mouse between icons, but it is shown, when entering an icon from the outside of the icon list. So it doesn't seem to be a dragging problem. May be the "enter" event is handled for the list instead of for each button?

For the usual case, this title display would be more helpful than Ctrl+. , because I usually don't use the keyboard in this operation and the main purpose is to distinguish similar icons (or even identical ones).

Though in some cases, when I don't have any clue where I should look, the Ctrl+. may also be useful. But if I already break the "flow" by using the keyboard, I can also drop the text on the search box and then press Ctrl+. , I think this doesn't make much difference. So don't waste the time on that.

ssborbis commented 5 years ago

I can relatively easily add a tool for toggling the view. That should get it done unless you're set on your layout and don't want to add another tool tile

ssborbis commented 5 years ago

Bah. Just realized tools don't show in subfolders. I'll have to think on it

ssborbis commented 5 years ago

pushed a fix for the title bar. Looks like recent code or recent FF revisions are causing a mixup in mouseenter / mouseleave events, clearing the title bar when moving from one tile to the next. I put in a 1ms timeout and it seems to have corrected the problem. I'm still thinking on a good way to handle the layout toggle.

hg42 commented 5 years ago

Bah. Just realized tools don't show in subfolders. I'll have to think on it

when you think already...the sidebar wants to have tools, too :-)

hg42 commented 5 years ago

pushed a fix for the title bar

nice, works well...makes me happy :-)

ssborbis commented 5 years ago

I've added a toggle tool to the tools list. Currently, it will only show on the top menu tier, and only in the sidebar if using the right settings ( tools position = top, display as separate toolbar = disabled, qm cols = sb cols ), but it should activate on dragover with a 1s pause.

edit: also, tools don't display in single column mode. I'll have to add more settings for tools display. A few tools at least are useful to the qm and the sb now.

hg42 commented 4 years ago

unfortunately these settings are all the opposite of mine :-) Especially the same column number is a problem for my usage. My sb is 3 columns, so it usually doesn't overlay any element of the page and can stay open. qm is 9, nearly width = height for shorter distances. But I guess this is all temporary...

testing:

With switching via hover while dragging, the text mode should probably be temporary (reset automatically to icon mode after usage). And while saying this, the sb could also close automatically after usage. In fact auto-close combined with the new collapsed flat folders (but also with normal folders) could completely remove the need for icons, because the sidebar would only be open while dragging and thus never be in the way.

When I use the tool in qm, it always closes the menu after the switch (not sure it kind of flickers and closes very quickly).

ssborbis commented 4 years ago

Just for testing right now. I'll eventually get an option for tools in the sidebar like the qm has.

With switching via hover while dragging, the text mode should probably be temporary (reset automatically to icon mode after usage)

There are a ton of settings I'd have no problem adding to the Advanced menu for users to tweak. I just need a better process to actually add them to the options page / config. My current approach is a bit tedious.

And while saying this, the sb could also close automatically after usage.

Shit, I thought I had an option to close the sb after search. Must just be the Toolbar. I'll add it.

When I use the tool in qm, it always closes the menu after the switch (not sure it kind of flickers and closes very quickly).

I'm not seeing that on my config, but I haven't checked without animations. I'll take a look.

ssborbis commented 4 years ago

I've rewritten the code to display the tools in menus and they should be available in all menus now. Each tools is enabled / disabled based on which menu they appear in. All are available in the qm. Some are disabled in the sb and tb.

Added an option to close after search in the sb

Fixed the menu closing when using the view toggle

FYI, there may be an issue when loading the newer pushes as temp addons where the menus will not work. If you sideload and that happens, let me know.

ssborbis commented 4 years ago

It's been a while, but did this issue ever get taken care of or do I need to include more display options for tools?

hg42 commented 3 years ago

sorry that I didn't react for such a long time... adding the tool for switching between text and icons solved the problem perfectly.

Btw. the tools need to wrap like the other icons, because if I have 4 columns (which is nice for the sidebar), the tools get clipped. I'll add an issue for this...