Comments (24)
Great. Looks good, works like a charm. Thank you! :)
from contextsearch-web-ext.
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.
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.
from contextsearch-web-ext.
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.
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.
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.
Good idea. I'll add the listener
from contextsearch-web-ext.
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.
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.
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.
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.
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? :)
from contextsearch-web-ext.
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.
search bar live in v1.5.6
from contextsearch-web-ext.
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.
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.
I've got the tab working to cycle through search engines. i might leave it at that. The more pressing problem is this
from contextsearch-web-ext.
nice, you are the fastest dev ever...
and now I am missing shift+tab (backwards) :-)
from contextsearch-web-ext.
That change is in the repo, but not in a release yet
from contextsearch-web-ext.
even faster :-) thanks
from contextsearch-web-ext.
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.
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.
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.
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.
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)
- Version 1.46.25 (latest?) not working HOT 10
- There is no pop-up newtab after my selecting words on any webpage and hitting any search engine on the right-click menu.
- CS Toolbar as a major Browser Search Engine HOT 9
- CTRL+Click Issue and Tools Menu Issue HOT 4
- Content Security Policy Issue? HOT 4
- Is it possible to make the outline of the 'quick menu' square? HOT 2
- About auto copy text. HOT 9
- Search Engine Issues with React framework? HOT 8
- the highlight feature doesn't work anymore? HOT 6
- searchTerms with multi lines selection problem? HOT 9
- "Search engines manager" invisible buttons HOT 1
- Input Cursor HOT 8
- "Quick Menu" should be hidden in a text field when I type HOT 8
- link search doesn't get disabled HOT 4
- feature request: enable filtering based on element for recent search engines. HOT 1
- Open Image in external Viewer HOT 7
- Feature request: Automatically select Google as search engine after selecting text HOT 3
- How to disable items for non-images? HOT 2
- Make quick menu also appear on PDF files in Firefox HOT 3
- Exporting ContextSearch to search.json.mozlz4 doesn't work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contextsearch-web-ext.