Commit Graph

3814 Commits

Author SHA1 Message Date
Daisuke Akatsuka
216ea392bd Bug 1929515: Assign id to action button when selecting for accessibility r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D233336
2025-01-08 00:09:26 +00:00
Sandor Molnar
0f6ea66c13 Backed out changeset 5ffec3016dee (bug 1938567) for causing bc failures @ browser_suppressFocusBorder.js CLOSED TREE 2025-01-07 13:35:12 +02:00
Moritz Beier
169c6a16c1 Bug 1938567 - Update Unified Search Button icon after default private engine changes. r=urlbar-reviewers,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D232728
2025-01-07 08:31:59 +00:00
Daisuke Akatsuka
3815909183 Bug 1938040: Contextual search supports multiple words r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D232864
2025-01-07 04:00:13 +00:00
Sebastian Hengst
bab79d48cd Bug 1938330 - wait for search mode switcher to be visible after ScotchBonnet preference got toggled. r=urlbar-reviewers,Standard8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D233159
2025-01-03 14:36:19 +00:00
Goloman Adrian
43c7e21496 Bug 1938244 - disable browser_searchModeSwitcher_telemetry.js for frequent failures on macosx1100. r=urlbar-reviewers,Standard8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D233140
2025-01-03 12:54:54 +00:00
Drew Willcoxon
d798414004 Bug 1938517 - Implement new "simplest" weather suggestion UI. r=fluent-reviewers,desktop-theme-reviewers,urlbar-reviewers,emilio,bolsson,daisuke
This makes a number of changes to support a new UI treatment for weather
suggestions in addition to the two existing treatments. Unfortunately we need
all three to experiment with, but hopefully after experimentation is done we can
remove the two existing treatments.

This patch refers to the new treatment as the "simplest" UI. The Figma is at [1]
although it doesn't reflect some details Josh and I have discussed. One of the
existing treatments is already called "simple", and this patch changes its name
to "simpler". The patch refers to the other existing treatment as "full". These
names are only informal because the Nimbus variable and fallback pref are
integers.

Because the new UI treatment is so simple, we can pretty much use the standard
rich suggestion UI for it. The existing treatments are dynamic. I say "pretty
much" because I did need to add a capability to rich suggestions,
`result.richSuggestionIconVariation`, which lets results set an `icon-variation`
attribute on their rows. Weather suggestions use it to choose the appropriate
weather icon in the CSS.

I also modified l10n string caching in a few ways to address a couple of
problems:

* I like how dynamic results can cache their strings lazily by setting
  `cacheable` in their l10n objects. Standard results can only cache their
  strings by adding them to `UrlbarView.#cacheL10nStrings()`. That method is
  getting pretty big, and it also doesn't work well with strings that have
  arguments since it's called to pre-cache strings before they're used, when
  there are no arguments. So I extended `cacheable` support to all l10n objects,
  not only those from dynamic results.
* Josh's spec calls for the temperature in the suggestion title to be bolded.
  There's no good way to do that right now. We have highlights, but they aren't
  useable for l10n strings. The simplest thing -- and what I've done before in
  cases like this -- is to include `<strong>` tags in the l10n string itself.
  That works except for when we have a cache hit with the l10n cache. In that
  case, we set the `textContent`, which of course renders the tag literally. So
  I added a `parseMarkup` option to l10n objects that says the cached string
  should be set as `innerHTML` instead. Actually, for security I parse the
  string into a sanitized document fragment. We could just always do this and
  get rid of `parseMarkup`, but it seems wasteful since most l10n strings don't
  need it.
* While addressing the previous two points, it made sense to move
  `setElementL10n()` from the view to `L10nCache`. That way all these
  cache-related functions are together.

Finally, Josh noticed one of the dark-mode colors in the icon SVG didn't have
enough contrast with the standard dark-mode panel background, so I updated that
to a new color he chose (from `#80808F` to `#9393A8`).

[1] https://www.figma.com/design/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?node-id=3548-15992&t=f4YUShEe5RkP2KEg-1

Differential Revision: https://phabricator.services.mozilla.com/D232703
2024-12-27 18:11:23 +00:00
Goloman Adrian
4646678471 Backed out changeset 8a0990e5cb45 (bug 1938040) for causing bc failures @browser_tabKeyBehavior.js. 2024-12-26 23:55:53 +02:00
Dale Harvey
de3355f54c Bug 1938102 - Enable actions mode properly and reenable tests r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D232685
2024-12-26 20:19:20 +00:00
Daisuke Akatsuka
633bd14742 Bug 1938040: Contextual search supports multiple words r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D232864
2024-12-25 23:28:17 +00:00
Dale Harvey
fd02dcf56d Bug 1930441 - Add telemetry type for search mode actions. r=daisuke,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D232880
2024-12-25 21:33:53 +00:00
Yazan Al Macki
9724bc1d84 Bug 1936278 - Prevent search mode chiclet from being dismissed when clicking in page content. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D232365
2024-12-25 04:08:06 +00:00
Stanca Serban
5b35d726db Backed out changeset 6e615e9f5457 (bug 1938040) for causing xpcshell failures in test_providerOmnibox.js. 2024-12-25 02:56:19 +02:00
Daisuke Akatsuka
42164a80e5 Bug 1938040: Contextual search supports multiple words r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D232864
2024-12-24 23:56:24 +00:00
mcheang
f8ea71ac19 Bug 1933003 - Add support to use restricted search keywords in both en-US and the localized language. r=mak,fluent-reviewers,settings-reviewers,urlbar-reviewers,mossop
This patch adds English restrict keyword strings to the enUS-searchFeature.ftl
file. The restrictKeywords providers return an array of keywords for their
l10nRestrictKeywords property. The first is the localized keyword, and the
second is the English keyword. If the user is in the English locale, the
providers return an array with one element: the English keyword.

Differential Revision: https://phabricator.services.mozilla.com/D230009
2024-12-24 22:40:09 +00:00
Daisuke Akatsuka
575c551ee4 Bug 1937363: Use Unified Search Button full name r=desktop-theme-reviewers,dao,daleharvey
Depends on D232160

Differential Revision: https://phabricator.services.mozilla.com/D232454
2024-12-24 04:02:26 +00:00
Daisuke Akatsuka
abd3414bd9 Bug 1937363: Show/Focus Unified Search Button when P&S icon group gets focus r=desktop-theme-reviewers,urlbar-reviewers,dao,tabbrowser-reviewers,daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D232160
2024-12-24 04:02:25 +00:00
Dão Gottwald
a0dee1c59c Bug 1938331 - Use MozTabbrowserTabGroup::select in ProviderTabGroups. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D232629
2024-12-20 01:20:20 +00:00
Cristian Tuns
568f68ebab Backed out changeset de5d3f6c2e3e (bug 1936278) for causing bc failures in browser_searchModeSwitcher_emptyInput.js CLOSED TREE 2024-12-19 17:57:30 -05:00
Yazan Al Macki
82b17701af Bug 1936278 - Prevent search mode chiclet from being dismissed when clicking in page content. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D232365
2024-12-19 19:38:50 +00:00
Dão Gottwald
3ba74fe71c Bug 1938187 - Enable tab groups by default in nightly. r=sthompson,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D232539
2024-12-19 08:17:27 +00:00
Nika Layzell
3e32140186 Bug 1935714 - Part 3: Avoid using nsISupportsCString to initialize nsStringInputStream instances, r=xpcom-reviewers,necko-reviewers,extension-reviewers,search-reviewers,devtools-reviewers,urlbar-reviewers,firefox-ai-ml-reviewers,mccr8,jteow,mcheang,ochameau,robwu,tarek
The method is equivalent to the `setByteStringData` method on `nsIStringInputStream`, which has been used to replace the `.data` setter in these places. There may still be callers of the `.data` getter/setter, however they aren't easy to find.

Differential Revision: https://phabricator.services.mozilla.com/D232257
2024-12-18 21:10:32 +00:00
Yazan Al Macki
7054e6f021 Bug 1937311 - Wait until the Unified Search Button is visible before running tests with app provided engines. r=jteow,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D232420
2024-12-18 19:24:13 +00:00
James Teow
30f938764f Bug 1934362 - Disable persisted search telemetry test on Linux - r=urlbar-reviewers,mak
It's unclear to me why Linux will sometimes skip storing
the SERP URL in tabhistory.

Differential Revision: https://phabricator.services.mozilla.com/D232308
2024-12-18 15:05:11 +00:00
Daisuke Akatsuka
630450ad17 Bug 1936673: Add telemetry for Unified Search Button r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D231904
2024-12-18 13:01:21 +00:00
Moritz Beier
a891d9ea73 Bug 1937074 - Fix unified search button showing icon of normal default engine instead of private default engine in private browsing mode. r=urlbar-reviewers,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D232058
2024-12-18 10:54:07 +00:00
Dão Gottwald
2ed2e383f6 Bug 1936831 - Allow searching for closed and saved tab groups in the address bar and display matching tab groups as actions. r=daleharvey,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D232336
2024-12-18 09:27:40 +00:00
Norisz Fay
86e902d55a Backed out changeset 2f7058ea3047 (bug 1935714) for causing mochitest failures on test_progress_events_for_gzip_data.html 2024-12-17 22:29:32 +02:00
Drew Willcoxon
d0b28ed60b Bug 1936457 - Add a Suggest backend class for Merino. r=daisuke,nanj
This adds `SuggestBackendMerino` and `QuickSuggest.backends`, an array that
contains all backends. So now we have Rust, ML, and Merino backends.

This also makes some changes to relevancy ranking (added in bug 1923187) because
that was done in `_fetchMerinoSuggestions()`, which this patch removes.
Previously, ranking was applied to all Merino suggestions at once. With this
patch, it's applied to each suggestion as it's visited by
`#filterAndSortSuggestions()`, which is now the right place to do it IMO. It
will be easy to expand it to non-Merino suggestions now if we want.

Depends on D232022

Differential Revision: https://phabricator.services.mozilla.com/D231863
2024-12-17 18:37:04 +00:00
Drew Willcoxon
ca65a9a803 Bug 1936951 - Rename BaseFeature to SuggestFeature and factor it out into SuggestProvider and SuggestBackend. r=daisuke
This does several things, and I'll update D231863 so it builds on it:

Rename `BaseFeature` to `SuggestFeature` since only Suggest uses it and it's
pretty deeply integrated with `QuickSuggest` at this point.

Factor out all the suggestions/provider-specific methods into a new
`SuggestProvider` subclass. All features that manage suggestions are now
subclasses of `SuggestProvider` instead of `BaseFeature`.

Add a new subclass called `SuggestBackend` that codifies the expected backend
methods.

Rename `Weather` to `WeatherSuggestions` to be more consistent with the other
feature subclasses.

Update a bunch of comments so hopefully they're clearer and more accurate. I
also replaced the term "quick suggest" with "Suggest".

It doesn't make any substantive changes beyond the above.

Differential Revision: https://phabricator.services.mozilla.com/D232022
2024-12-17 18:37:03 +00:00
Moritz Beier
6d8adbc650 Bug 1934945 - Change telemetry to differentiate search service failures caused by the addon manager. r=Standard8,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D231831
2024-12-17 18:03:52 +00:00
Nika Layzell
bb544297d5 Bug 1935714 - Part 3: Avoid using nsISupportsCString to initialize nsStringInputStream instances, r=xpcom-reviewers,necko-reviewers,extension-reviewers,search-reviewers,devtools-reviewers,urlbar-reviewers,firefox-ai-ml-reviewers,mccr8,jteow,mcheang,ochameau,robwu,tarek
The method is equivalent to the `setByteStringData` method on `nsIStringInputStream`, which has been used to replace the `.data` setter in these places. There may still be callers of the `.data` getter/setter, however they aren't easy to find.

Differential Revision: https://phabricator.services.mozilla.com/D232257
2024-12-17 17:00:15 +00:00
Alexandru Marc
3ff0cebb6f Backed out changeset 770a539c5164 (bug 1934945) for causing xpcshell failures @ test_URIFixup.js CLOSED TREE 2024-12-17 15:59:17 +02:00
Moritz Beier
2a06410e70 Bug 1934945 - Change telemetry to differentiate search service failures caused by the addon manager. r=Standard8,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D231831
2024-12-17 12:28:25 +00:00
Moritz Beier
49a55dae7b Bug 1872607 - Fix search being the first suggestion even though keyword.enabled is false if the typed string ends with *. r=mak,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D232190
2024-12-17 11:44:02 +00:00
Daisuke Akatsuka
46aedc7a3a Bug 1932539: Switch to UrlbarTestUtils to focus urlbar in tests r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D232189
2024-12-16 23:47:51 +00:00
James Teow
e1e4818bdb Bug 1932440 - Wait for specific url in persist search mode test - r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D232264
2024-12-16 21:18:36 +00:00
Dão Gottwald
b6f52de086 Bug 1936827 - Update tab group action label. r=fluent-reviewers,urlbar-reviewers,jteow
Differential Revision: https://phabricator.services.mozilla.com/D231946
2024-12-16 10:59:27 +00:00
Mark Banner
0186bcd707 Bug 1937181 - Allow passing the favicon URL into OpenSearchEngine to avoid setting it separately. r=search-reviewers,scunnane
Differential Revision: https://phabricator.services.mozilla.com/D232107
2024-12-16 09:20:41 +00:00
Daisuke Akatsuka
aea52d7b7c Bug 1933251: Tab key selects urlbar results and USB when user clicked urlbar and not select any element r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D230488
2024-12-15 05:15:51 +00:00
Yazan Al Macki
75c7484a1a Bug 1932274 - Move search mode app provided engines test to new test file. r=jteow,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D231127
2024-12-13 19:31:08 +00:00
Stephen Thompson
504eddfac8 Bug 1933114 - add tests for restoring tab groups r=dao,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers
Adds/updates test cases for restoring saved tab groups, closed tab groups, and open tab groups from session state

Differential Revision: https://phabricator.services.mozilla.com/D230322
2024-12-12 15:22:41 +00:00
Dão Gottwald
64dfa2e5fd Bug 1936512 - Re-implement coloring of tab group actions. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D231783
2024-12-12 15:03:55 +00:00
Daisuke Akatsuka
aafffaa930 Bug 1936090: Show/Hide Unified Search Button dependent on pageproxystate r=desktop-theme-reviewers,tabbrowser-reviewers,daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D231636
2024-12-11 21:35:57 +00:00
Drew Willcoxon
31a8192d0b Bug 1932502 - Remove the Suggest JS backend: Part 4: Remove other Nimbus variables and legacy telemetry. r=daisuke
This is part 4 of 4. There are some Nimbus variables that are now unused plus
one legacy histogram.

Depends on D231467

Differential Revision: https://phabricator.services.mozilla.com/D231468
2024-12-11 20:50:46 +00:00
Drew Willcoxon
85301b6753 Bug 1932502 - Remove the Suggest JS backend: Part 3: Remove the "remote-settings" and "rs_" source. r=daisuke
This is part 3 of 4. It removes the `"remote-settings"` source used internally
and its `rs_` counterpart in telemetry result types.

Depends on D231466

Differential Revision: https://phabricator.services.mozilla.com/D231467
2024-12-11 20:50:46 +00:00
Drew Willcoxon
2033165d91 Bug 1932502 - Remove the Suggest JS backend: Part 2: Remove the backend. r=daisuke
This is part 2 of 4, the main part. It removes the backend and the code in
`BaseFeature` and feature subclasses that hook into it. As a consequence it also
makes the other following changes:

* Remove `QuickSuggest.backend` (eventually I'd like to add a Merino backend and
  then add a new `QuickSuggest.backends` list that has the Rust, Merino, and ML
  backends)
* Add `QuickSuggest.config`
* Replace uses of `QuickSuggest.backend.config` and `QuickSuggest.jsBackend.config`
  with `QuickSuggest.config`
* Remove the `quickSuggestRustEnabled` Nimbus variable
* Update most remaining tests so that they do not assume the JS backend exists

I left the `browser.urlbar.quicksuggest.rustEnabled` pref. I would like to
preserve the ability to toggle off Rust suggestions while keeping other parts of
Suggest enabled even if we don't need it now. That seems like a wise thing to do
and is similar to how both Merino and the ML backends can be toggled separately.

Depends on D231465

Differential Revision: https://phabricator.services.mozilla.com/D231466
2024-12-11 20:50:45 +00:00
Drew Willcoxon
b76d20ad1a Bug 1932502 - Remove the Suggest JS backend: Part 1: Update tests. r=daisuke
This patch is part 1 of 4. I tried to break the removal into parts that make
sense individually since removing it all at once would be a much larger patch
that would probably be harder to review.

This part removes `add_tasks_with_rust()` from both xpcshell and browser tests
and removes some tests that either aren't enabled without Rust or don't make
sense without it.

Differential Revision: https://phabricator.services.mozilla.com/D231465
2024-12-11 20:50:45 +00:00
Marco Bonardo
97d878f963 Bug 1775819 - Wait for tab to be registered in browser_switchTab_inputHistory.js. r=urlbar-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D231750
2024-12-11 19:32:20 +00:00
Drew Willcoxon
7d15af0962 Bug 1936437 - Properly set is_sponsored on ML Yelp suggestions. r=daisuke
The problem is that when `YelpSuggestions.#normalizeMlSuggestion()` is called,
the passed-in ML suggestion already has `is_sponsored` set to `true`. It was set
at [1] by `UrlbarProviderQuickSuggest`. But `#normalizeMlSuggestion()` returns a
new suggestion object that does not include `is_sponsored`, so the provider
thinks the suggestion is nonsponsored, which means `_canAddSuggestion()` returns
false.

I fixed it by copying all properties from the ML suggestion to the new
suggestion object. The new object will have some properties that end up not
being used, but that's fine.

`#normalizeRustSuggestion()` does not have this problem because it returns the
passed-in suggestion (after modifying it).

[1] https://searchfox.org/mozilla-central/rev/9783996dbd86f999cab50ea426079a7b10f28a2f/browser/components/urlbar/UrlbarProviderQuickSuggest.sys.mjs#206

Differential Revision: https://phabricator.services.mozilla.com/D231756
2024-12-11 07:01:39 +00:00