brandon1024 / find

A find-in-page extension for Chrome and Firefox that supports regular expressions.
https://chrome.google.com/webstore/detail/find%2B-regex-find-in-page/fddffkdncgkkdjobemgbpojjeffmmofb
GNU General Public License v3.0
416 stars 54 forks source link

More Omnibox features #303

Closed Madis0 closed 3 years ago

Madis0 commented 4 years ago

Issue Description

It's nice that we can use Find+ from the Omnibox, but it should have a little more parity with the main box.

Tasks

brandon1024 commented 4 years ago

The omnibox has a very limited functionality, and I'm not sure how I could implement the features you requested. Could you give more details?

I enabled omnibox support as a way to find occurrences quickly. It was never designed to replace the extension popup.

Madis0 commented 4 years ago

Well, the Omnibox API supports suggestResult, so think that could be used to add additional data (count, errors) and actions (next, previous, close).

brandon1024 commented 4 years ago

@Madis0, I've been playing around with the omnibox API and I can't find an elegant way to implement some of the features you requested. It's easy enough to show occurrence count and report errors (i'll be opening a PR for that shortly), but implementing actions in the omnibar is a bit hacky and I anticipate confusion if that was merged in. So for now, I'll only implement count and error reporting.

Madis0 commented 4 years ago

Oops, forgot what I said previously. Could you at least add the "unhighlight" bit when the user selects either of the options?

brandon1024 commented 4 years ago

I'm not sure I follow, what do you mean by "selects either of the options"?

Madis0 commented 4 years ago

I was referring to this

So for now, I'll only implement count and error reporting.

so clicking either counter or error would just disregard the search.

brandon1024 commented 4 years ago

Ahh ok, yes that's how it works as implemented. You're welcome to pull down my changes here and try it, wouldn't hurt to have a second opinion on these changes.

Madis0 commented 4 years ago

Right now tested on Edgium and the counter works, but clicking it does nothing. Not seeing any errors on iframe pages either (while it correctly shows a warning triangle on find+ popup).

brandon1024 commented 4 years ago

That's right, clicking it will have no effect. Typically the omnibox is used to suggest search results, and clicking a suggestion will just populate text in the box. There's nothing to populate in the omnibox when displaying counts, so this will have no effect.

At first, I thought reporting iframes would be a bit tricky to do but it might be easier than I anticipated. Will update.