Omnibox API WebExtensions - "content" is not supposed to be shown in the urlbar panel
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
People
(Reporter: eking, Unassigned)
References
Details
(Whiteboard: [sng-scrubbed] [search-papercut])
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:83.0) Gecko/20100101 Firefox/83.0
Steps to reproduce:
I am working on a simple browser extension that allows you to search your bookmarks from the omnibox. However, it does not treat the "content" and "description" strings equally.
You can try this with any extension that uses the omnibox SearchInputs. For example:
https://addons.mozilla.org/en-US/firefox/addon/omnibox-bookmark-search/
Omnibox Bookmark Search - just search for a bookmark with a long URL.
https://addons.mozilla.org/en-US/firefox/addon/custom-search-engine/
Custom Search Engine - just mash your keyboard a bunch.
Actual results:
If the "content" URL is too long, it will take up all the space, and not show the attached description. See the attached image.
Expected results:
I would expect there to be a minimum number of characters for the description, or a minimum width.
For example, it could stop being covered when it is only ten characters long, or 25%.
Comment 1•5 years ago
|
||
I can observe in your demo pic that you have used the "Ombibox Bookmark Search" addon to search your other addons, specifically, you have searched by going into the address bar, typed "b " and the search term "job". You get 2 results: one "Job Search" extension and one that lacks a page title, but has some google spreadsheets link.
I cannot reproduce your issue. I do not understand why the google spreadsheet link is displayed as a test result; Furthermore, I can't find any Job Search addon (probably because of my region). Can you list all the addons you are having installed on your profile?
Comment 2•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
I can observe in your demo pic that you have used the "Ombibox Bookmark Search" addon to search your other addons, specifically, you have searched by going into the address bar, typed "b " and the search term "job". You get 2 results: one "Job Search" extension and one that lacks a page title, but has some google spreadsheets link.
I cannot reproduce your issue. I do not understand why the google spreadsheet link is displayed as a test result; Furthermore, I can't find any Job Search addon (probably because of my region).
I see the confusion, my bad. The addon used in that case is the Omnibox Bookmark Search. With this addon, you can type "b [something]", and it will search your bookmarks, then suggest the relevant bookmarks. Here, I typed "b job," and it suggests two results. The two results shown are bookmarks, not extensions.
I have two bookmarks with the word "job" in them. One is "job search" (utc.com), the other is "job search tracker" (docs.google.com). The first suggestion shows some of the description text, and also the URL. The second suggestion has a URL that is very long, and it does not show the description text.
If you wanted to reproduce the issue, make a bookmark with a very long URL. Then use the Omnibox Bookmark Search and type "b [bookmark description]." You should see the URL of the bookmark, but not the description, similar to the last line in my screenshot.
Can you list all the addons you are having installed on your profile?
Hokay. So I tried seeing if it was caused by another extension, and I came across an odd experience. Here are the addons I am using:
- Block Site *
- Custom Search Engine
- Decentraleyes *
- DuckDuckGo Privacy Essentials *
- Google Lighthouse *
- Omnibox Bookmark Search
- Privacy Badger *
- React Developer Tools *
- uBlock Origin *
- Reddit Enhancement Suite
- Terms of Service; Didn't Read
- Redux DevTools
Currently, the search is running as I said above: if a URL is too long, it covers the description.
However, if I disable even one extension that has a star next to it, the omnibox suggestions work correctly! For example, if I disable uBlock Origin and open a new tab then type "b job," the description is not covered by the URL! You can see what I mean by the recent screenshot.
My apologies, I thought this would be a simple enough problem. Now it seems like it is caused by either:
- extensions interacting with each other
- some sort of cache needs to be updated
- too many extensions calling a certain API will cause this problem ..?
But I really have no idea. Is there something else I can do for useful debugging?
Comment 6•5 years ago
|
||
I don't think this has anything to do with those extensions, not sure why they trigger it. I can get the same effect with only an omnibox addon installed.
Marco, is there anything in the urlbar ui layout that would contribute to this? I see some of our own layout places the url under the title rather than on the same line. Should we do the same for entries provided via the omnibox api (the api itself doesn't do anything other than provide data)?
Comment 7•5 years ago
•
|
||
Urlbar results by default have "title - url - action", it looks like we're putting all the stuff in the action box here.
The problem at hand is that action is supposed to be a short string describing the action, something like "Visit", "Search", and thus it's made to never wrap, it is not intended to contain a long url, that should at a maximum be part of the title.
There is definitely a mishandling problem here, we should not be putting content in the action box. I wonder whether we should show it at all, the API definition says content is put in the input field when the result is selected, not that it should be shown. It explicitely says " this entry will not appear in the drop-down list."
It's worth re-evaluating how we present these results, imo.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 8•5 years ago
•
|
||
It would be interesting to see how other browsers handle the same results.
Opera seems to always put the add-on name close to the results, doesn't show content.
Chrome doesn't show content, though they allow xml style markup in description, with <url>, <match>, <dim>, that is nice, I wonder if we have a bug on file to support that.
Updated•2 years ago
|
Updated•2 years ago
|
Description
•