ssborbis / ContextSearch-web-ext

Search engine manager for modern browsers
315 stars 35 forks source link

suggestion for drag and drop search feature #279

Open Amin884 opened 3 years ago

Amin884 commented 3 years ago

Is it possible to have a drag and drop search feature like Captain Caveman's Web Search Pro?I am currently using Simple Drag & Drop Search alongside ContextSearch for some of my most used search engines but it is very limited.for me it is the only feature that is missing from ContextSearch to make it perfect.

hg42 commented 3 years ago

ok, I see the iframe changed class names to a more compact naming scheme (like .empty instead of .pageTilesEmptyTile)

so my tiles formatting mostly works now

but I'm already using the quickmenu...very nice...thank's a lot

actually, dragging is one action more after selecting (you have to release the button, then click again, needs some training), but right click is for context menu and I seem to be unable to learn the "hold" button method...no clue why. I think with web sites we are now used to do simpler actions all the time, even double clicking starts to feel clumsy. So dragging fit's the gap...and it is still a much underrated action.

I also like, that you enabled dragging images and links (though, pure "View Image" "pages" cannot have javascript...and sometimes it's difficult to distinguish between image and url). In this context, I noticed, that dragging an image(url?) sometimes isn't the same as using the context menu, which is not really unexpected, but you don't always think like that. E.g. the avatars here in github (on the left of each comment) are not usable by google or yandex image search, but right clicking and using CS context menu works with the image. That's because, the underlying link (that is dragged) is: https://github.com/hg42 while right clicking gives me: https://avatars.githubusercontent.com/u/4707597?s=88&v=4

hg42 commented 3 years ago

is it ok to discuss small quickmenu "issues" here, that are related to dragging (but also global)? or should I better open a new issue?

as an example: hovering over a folder usually results in the back button placed below the mouse (at least in my configuration) and when waiting (depending on the timeout) it switches back again. The same if you hover over the back button, it sometimes switches back to the folder. It happens more often with a short timeout. It would be more convenient, if the you have to leave the area before you can hover again (not sure if that's possible, may be a matter on which occasions the handler is set).

another one: the configurable action buttons seem not to be drop targets. I tried "find in page", "copy to clipboard", "" and "instant search"...

third: tooltips are not shown while dragging (if possible), which would be useful

ssborbis commented 3 years ago

Do you have a trick? any tricky way to stop dragging without closing the tiles? maybe a Modifier-Escape or similar? It's the same problem for screenshots.

If you're on very recent repo code, check under the Hotkeys tab. I've started putting some commands accessible by keyboard shortcuts. If you enable pageTilesOpen, you can select text, press a keyboard combo and get the menu open - no drag required.

With choosing a much bigger menu (and comparing features to the tiles), there could be some more for quick menus: "unfolded" folders (didn't we have this at some time in the past?)

Is that what I'm calling group folders?

engine titles

???

ok, I see the iframe changed class names to a more compact naming scheme (like .empty instead of .pageTilesEmptyTile)

I moved page tiles to an iframe for security. It causes all kinds of complications, however. Especially in chrome

but right click is for context menu and I seem to be unable to learn the "hold" button method...no clue why

Can you check the advanced menu as see if you have a value for quickMenuHoldTimeout . Another user had that field blank, and I don't know why. But if it's a trend...

I noticed, that dragging an image(url?) sometimes isn't the same as using the context menu, which is not really unexpected, but you don't always think like that.

There's a built-in API for distinguishing between element types in the context menu. I made my own for the quick menu. They don't always match. I did some accounting for background images which may result it some different behavior.

hovering over a folder usually results in the back button placed below the mouse (at least in my configuration) and when waiting (depending on the timeout) it switches back again. The same if you hover over the back button, it sometimes switches back to the folder. It happens more often with a short timeout. It would be more convenient, if the you have to leave the area before you can hover again (not sure if that's possible, may be a matter on which occasions the handler is set).

When dragging or just normal hover?

the configurable action buttons seem not to be drop targets. I tried "find in page", "copy to clipboard", "" and "instant search"...

Most tools don't. I'd say most shouldn't because they don't deal with search terms (which presumably are being dragged), but I'll look into the ones that do.

tooltips are not shown while dragging (if possible), which would be useful

dragenter, dragexit to the rescue.

hg42 commented 3 years ago

you can select text, press a keyboard combo and get the menu open - no drag required

and then DON'T click a folder with many items :-)))

nice, I was quite sure, you already had a solution like that :-)

Is that what I'm calling group folders

there's an option called "Group Layout" in search engines. This is nice...especially with coloring (I once had such a configuration). Sorry, I forgot about that option...(and didn't get the naming, though it's reasonable, maybe add a hint, keywords: flat, unfolded).

It's interesting psychologically, because each kind of invoking CS is a little bit different. I removed the group layout when my 3 column sidebar on a 23" screen became to long, the was more space before on the same screen in vertical orientation. In the context menus I always want subfolders...while on lots of tiles I would use group layout. Since then I switched from a 3 screen configuration to a single 43" (cheap 200EUR TV). So everything is now kind of small :-) But I didn't reconfigure CS, yet...

I found, that I tend to use the same method of invocation most of the time. Once I loved the sidebar, but nowadays I mostly use the toolbar button (mainly because I now search from there and it is more prominent on the toolbar, a single button with lots of space on both sides. I sometimes use context menu, when I want to see the titles (rarely used engines), but the grid is more convenient in daily searching (less distance so faster for well known engines).

I think, with my big screen I could probably use group layout for everything.

I currently use a mix of both. Each group has a folder with rarely used engines on the left and important engines follow outside of the folder. So the folder gives the title of the group. This way I am missing the colors but I have the folders for a group title (short...e.g. srch instead of search etc.).

engine titles ???

in tiles there are titles for each engine (there is enough space), if I use quickmenu I don't have titles, even if I scale the menu. This is why I need tooltips and sometimes use the context menu.

quickMenuHoldTimeout

it's 250

built-in API [...] my own for the quick menu

ah, I understand

When dragging or just normal hover?

interesting, when normal hovering, it switches faster and when dragging I need to move the mouse a little bit. This only happens in the top left corner, where the back button lives and because I have a folder at the same place. Theoretically a similar problem could also happen, when hovering over a folder and the submenu has another folder at the same place (I remember I had this at least once and didn't understand, because it can only happen at that single position in my menu structure).

Most tools don't

yepp :-) and some probably should

[tooltips] dragenter, dragexit to the rescue

do you mean as a workaround? I tried that, but it doesn't work

ssborbis commented 3 years ago

@hg42

It's nice to hear how others are using this addon. I don't get much feedback in that regard, and there are no analytics of any kind to tell me what's being used and what isn't.

[tooltips] dragenter, dragexit to the rescue do you mean as a workaround? I tried that, but it doesn't work

I didn't actually do anything about that. title= tooltips are handled by the browser and don't show on drag, and rolling my own will be a bit messy because they will overflow the menu iframe container at times, so they need to be shown on the parent window inside their own iframe to keep engines hidden from malicious websites, Doable,but a pain.

quickMenuHoldTimeout it's 250

k, different problem then

Most tools don't yepp :-) and some probably should

They do now. All tools respond to drop as if it were a click

interesting, when normal hovering, it switches faster and when dragging I need to move the mouse a little bit. This only happens in the top left corner, where the back button lives and because I have a folder at the same place. Theoretically a similar problem could also happen, when hovering over a folder and the submenu has another folder at the same place (I remember I had this at least once and didn't understand, because it can only happen at that single position in my menu structure).

Can you post a gif?

hg42 commented 3 years ago

@ssborbis

As a developer, I know of that lack of detailed user scenarios. Sometimes I think I'm talking too much :-) so it's nice to get feedback like this

tooltip: I already thought it's a browser thingy...

hover: back-and-forth note, I am not clicking buttons, in the first case (opened by a hotkey), I can leave the mouse alone and it switches forever. In the dragging case, I have to move the mouse but not leave the button area...

hg42 commented 3 years ago

If hover is disabled, hovering still works while dragging (nice!). In fact, for me, it's more natural to click the buttons when not hovering. I guess, this may be a matter of taste.

ssborbis commented 3 years ago

Oh ok, you must have a value set for openFoldersOnHoverTimeout. The problem is the back button activating on hover as well, gotcha.

If hover is disabled, hovering still works while dragging (nice!).

Yep, drag and mouse have separate event handlers ( a pain sometimes )

hg42 commented 3 years ago

btw, I use it like this currently:

image

and I'm quite happy. Though, for an unfolded folder it's questionable, if it should open on hover, why should one want this? And I cannot disable this while dragging, nor can I set the timeout, so I often land inside it accidentally.

(note: I hadn't a chance to try your latest changes, in case you already have a solution)

ssborbis commented 3 years ago

Though, for an unfolded folder it's questionable, if it should open on hover, why should one want this?

You probably wouldn't. It's just the default behavior. The group folders and flat layout were tacked on without much design consideration. They need work