Coder Social home page Coder Social logo

Comments (24)

tzeumer avatar tzeumer commented on June 28, 2024 1

Great. Looks good, works like a charm. Thank you! :)

from contextsearch-web-ext.

hg42 avatar hg42 commented on June 28, 2024 1

wow, that's really useful, thanks!

Now this creates new wishes :-)

When typing something, it would be nice to select a search engine with the keyboard.
Intuitively I tried the tab key and would have expected to scan through the buttons with additional tabs.
Alternatively I tried cursor down (or may be up when the input field is at the bottom, btw. does anyone use this?) and would have expected to move around with the arrow keys (and wrapping at the last or first button in a row).

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

I've got the basics down. I added a title bar of sorts to the quick menu that displays the current search terms. Click it and it becomes an input field.

searchbar

from contextsearch-web-ext.

tzeumer avatar tzeumer commented on June 28, 2024

Wow, that was a fast response. Thanks! :)

I'm just wondering, if there is a specific reason or advantage that you have to click the title bar first instead of using an input field with a focused cursor right away?

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

Aesthetics. Centered text looks better when you're not editing the terms, but longer terms require left alignment to prevent some text from being hidden. I figured you would probably want the input being focused on launch so I'm making it an option. We'll see how it works and modify accordingly

from contextsearch-web-ext.

tzeumer avatar tzeumer commented on June 28, 2024

Ah, this is a good reason. Maybe it could work this way: It's always a title bar, but onKeyDown it just becomes an input field. At least I can't think of a case where on would select text and type somewhere else in the browser while the Quick Menu is open.

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

Good idea. I'll add the listener

from contextsearch-web-ext.

tzeumer avatar tzeumer commented on June 28, 2024

After thinking a minute, I thought of a case. If the menu pops up in an input or textarea field you can just type on currently. Maybe the listener should only work if the focus is not in one of these fields (then you just would have to click the titlebar).

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

maybe use a specific key to listen for like Tab to focus input and select all text making it readily replaced vs appended. I'll play around with some settings

from contextsearch-web-ext.

tzeumer avatar tzeumer commented on June 28, 2024

I think it is a very special case that only "might" bother people who use the auto popup and have the option for input/textarea enabled (which is my use case, too). I think, ignoring the onKeyDown for just these cases would be a good compromise between "intuitive" usability and not having to add an extra option.

But I think there might be a wide spread between how people prefer to use the menu and so it's never easy to tell what's best. Thanks a lot for considering at all :)

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

After some testing, it works well just setting focus on quick menu open with left-aligned text. I think I might have needed to do some background messaging to capture keydowns from the parent window anyway so this simplifies things and still looks good. The search bar can be turned off via options. I'm updating the repo as I go so feel free to grab the src , load up as a temp addon and see what you think

from contextsearch-web-ext.

tzeumer avatar tzeumer commented on June 28, 2024

This looks and works great! I can't find a possible way there could be any trouble using it; works well with Input and Textarea, too. I like it very much :)

Maybe there could a little bit more padding top/bottom from the text and the contrast white/blue might be a little too low for some people. But that are just details and I'm just guessing. Overall it's cool.

Off topic: I guess the things in the Screenshot (minimal vertical scrollbar when viewing the options via button and two "undefined" options at the bottom) are just work in progress? :)

2018-05-27_181214-contextsearch

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

Yep, just a test area for some code. It'll be gone soon. The horizontal scroll a css glitch from the wider divs required for the german translation. I'll get around to it sometime

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

search bar live in v1.5.6

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

Pushing the idea a bit further, it would be nice if the extension button would open with a Quick Menu tab (right before the Menus tab) - this way one nearly would have a second search field with probably another default search engine than the Firefox search field.

browseraction

I've converted the browser action button to mimic Firefox's search toolbar. The current config shows all search engines, hidden as well, in the same format as the quick menu. Works pretty well. I've also added the ability in both the quick menu and the browser action menu to click a search engine with an empty string, taking the user to the search engine website without running a query. Let me know what you think

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

I've got the tab working to cycle through search engines. i might leave it at that. The more pressing problem is this

#45

from contextsearch-web-ext.

hg42 avatar hg42 commented on June 28, 2024

nice, you are the fastest dev ever...
and now I am missing shift+tab (backwards) :-)

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

That change is in the repo, but not in a release yet

from contextsearch-web-ext.

hg42 avatar hg42 commented on June 28, 2024

even faster :-) thanks

from contextsearch-web-ext.

tzeumer avatar tzeumer commented on June 28, 2024

Just gone for a few hour and already a new version. I like it very much. The status bar in the button version is nice - it's a good way too quickly distinguish between identical icons (for example "Wikipedia DE" and "Wikipedia EN"). Maybe it could be added to the "inline" QuickMenu too? Maybe it would also serve as a nice visual separator between the tools and the engine icons? But it's really just a thought and nothing I'm really missing :)

I think all new strings are translated too already. Only one is missing for german. Maybe it could be added ad hoc :)
"hidden": {"message": "Ausgeblendet"},

Well, I think this concludes this ticket in a best time? :)

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

Often I just select some random text, because it's such a quick and convenient way to search with any search engine.

I added the optional hotkey Ctrl-Q (disabled by default) to bring up the quick menu anytime with focus set on the empty search bar. You're probably used to selecting random text, but that option is there now if you want it.

I think all new strings are translated too already. Only one is missing for german. Maybe it could be added ad hoc :)
"hidden": {"message": "Ausgeblendet"},

There are a few more strings now in 1.5.8. It's probably best I don't try to translate them. The literal conversion is probably wrong.

from contextsearch-web-ext.

tzeumer avatar tzeumer commented on June 28, 2024

I added the optional hotkey Ctrl-Q (disabled by default) to bring up the quick menu anytime with focus set on the empty search bar. You're probably used to selecting random text, but that option is there now if you want it.

Old habits are hard to get rid of, but it's a good feature nonetheless. On the setting side the hotkey method seems a bit redundant to the keyboard method (the only difference is marked text, no marked text). I don't really mind, but wondered anyway, if extension icons can have a hotkey in Firefox. If the hotkey would open the extension menu, you get practically the same result, but it would even work on pages like addons.mozilla.org.

There are a few more strings now in 1.5.8. It's probably best I don't try to translate them. The literal conversion is probably wrong.

I created a pull request. I hope I didn't miss anything.

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 28, 2024

I had considered using the hotkey for the toolbar action. It's good to get some user input, I'm a little too deep in the woods to be objective.

Merging changes... Thanks for the update.

from contextsearch-web-ext.

tzeumer avatar tzeumer commented on June 28, 2024

Probably there is no objective best and it's often more a matter of subjective preferences. So, maybe for some design choices it's the best to wait until more users ask for a specific change :)

from contextsearch-web-ext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.