Commit Graph

117 Commits

Author SHA1 Message Date
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
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
Drew Willcoxon
ba5a33f806 Bug 1931221 - Urlbar weather suggestions: Include the region in the title and set the input value to the URL when selected. r=daisuke,fluent-reviewers
This makes two simple changes:

* Include the region in the suggestion title. The Merino team added a
  `region_code` that we can use for this. (Right now we only need to worry about
  U.S. and Canadian locations.)
* When the suggestion is selected, set the input value to the suggestion URL.
  Currently the input becomes empty, which is strange IMO and isn't how other
  suggestions behave.

Depends on D229090

Differential Revision: https://phabricator.services.mozilla.com/D229091
2024-11-16 03:04:13 +00:00
mcheang
fce9027e99 Bug 1924228 - Localize Searchmode Switcher Button strings into other languages. r=daleharvey,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D225866
2024-10-17 01:08:53 +00:00
Cristian Tuns
65d71807dd Backed out changeset 78d0a0c70d7c (bug 1918411) for causing bc failures in browser_quicksuggest_fakespot.js CLOSED TREE 2024-09-13 10:43:48 -04:00
Francesco Lodolo (:flod)
427afe7eb9 Bug 1918411 - Use explicit NUMBER() in Fluent plurals, update docs, r=bolsson,credential-management-reviewers,devtools-reviewers,places-reviewers,omc-reviewers,urlbar-reviewers,nchevobbe,daisuke,dimi,mviar
Differential Revision: https://phabricator.services.mozilla.com/D221992
2024-09-13 13:34:52 +00:00
Daisuke Akatsuka
1dd2731973 Bug 1914605: Define tooltip for search mode exit button r=daleharvey,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D221092
2024-09-10 20:43:36 +00:00
Dale Harvey
9addf821be Bug 1907147 - Restore Actions search mode. r=desktop-theme-reviewers,urlbar-reviewers,fluent-reviewers,daisuke,dao,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D216518
2024-08-22 16:18:57 +00:00
Drew Willcoxon
eeabfdc62a Bug 1913507 - Add capability to show AMP suggestions as top picks based on keyword character counts. r=daisuke,fluent-reviewers,flod
Depends on D219369

Differential Revision: https://phabricator.services.mozilla.com/D219370
2024-08-20 05:57:40 +00:00
Dale Harvey
f9ca64ed89 Bug 1902052 - Ensure SearchModeSwitcher can be accessed via keyboard r=urlbar-reviewers,fluent-reviewers,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D216113
2024-08-05 16:49:34 +00:00
Drew Willcoxon
717228253c Bug 1905464 - Implement Fakespot suggestions result menu. r=daisuke,fluent-reviewers,flod
This builds on the UI patch in D212647 and implements the Fakespot result menu.
We may need to tweak the min-keyword-length logic once Ben's Rust work is done
and vendored.

Depends on D212647

Differential Revision: https://phabricator.services.mozilla.com/D215273
2024-07-11 04:34:26 +00:00
Daisuke Akatsuka
f175efc393 Bug 1900497: Implement Fakespot Suggestion UI r=desktop-theme-reviewers,fluent-reviewers,flod,dao,urlbar-reviewers,adw
Differential Revision: https://phabricator.services.mozilla.com/D212647
2024-07-10 16:42:49 +00:00
Dale Harvey
af847146da Bug 1906103 - Move trending strings into localised files. r=fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D215642
2024-07-04 16:23:48 +00:00
Dale Harvey
3a3707ff44 Bug 1891863 - Implement initial prototype of dedicated search button. r=dao,fluent-reviewers,desktop-theme-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D209469
2024-06-12 13:14:14 +00:00
Punam Dahiya
d3035fa703 Bug 1879638 - Update Old references to asrouter and aboutwelcome files r=omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D203330
2024-03-02 02:36:24 +00:00
Daisuke Akatsuka
25ace7ed62 Bug 1882677: Change 'Learn more' menu to 'Manage' for weather suggestion r=adw,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D203075
2024-03-01 04:18:35 +00:00
Daisuke Akatsuka
045afa79f2 Bug 1879637: Add 'Not relevant' and 'Not iterested' menus r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D201664
2024-02-13 13:30:01 +00:00
Sandor Molnar
815332b547 Backed out changeset 695f3d06ec64 (bug 1879637) for causing bc failures at browser/components/urlbar/tests/quicksuggest/browser/browser_quicksuggest_yelp.js CLOSED TREE 2024-02-13 11:40:04 +02:00
Daisuke Akatsuka
6cdf4a887c Bug 1879637: Add 'Not relevant' and 'Not iterested' menus r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D201664
2024-02-13 08:55:30 +00:00
Drew Willcoxon
42558afc2e Bug 1879397 - Show a "Local recommendations" group label for Yelp suggestions and cache remaining group l10n strings. r=daisuke,fluent-reviewers,bolsson
This adds a "Local recommendations" group label for Yelp suggestions.

It also caches all Suggest group labels to avoid pop-in in the urlbar view. The
MDN and Pocket labels weren't being cached.

Differential Revision: https://phabricator.services.mozilla.com/D201157
2024-02-09 03:05:01 +00:00
Daisuke Akatsuka
5e7e476a76 Bug 1878814: Handle Yelp suggestion as sponsored r=adw,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D200751
2024-02-07 02:01:25 +00:00
Daisuke Akatsuka
b983b699b2 Bug 1855375: Basic implementation for Yelp Suggestions r=fluent-reviewers,flod,adw
Differential Revision: https://phabricator.services.mozilla.com/D189335
2024-01-19 02:44:41 +00:00
Cristian Tuns
87fcff935b Backed out 4 changesets (bug 1868922, bug 1855375, bug 1874990) for causing xpcshell failures in /test_tab_quickwrite.js CLOSED TREE
Backed out changeset d558120aba19 (bug 1868922)
Backed out changeset e2c1399903d8 (bug 1855375)
Backed out changeset de119e6a8ced (bug 1874990)
Backed out changeset 3d1ef7c11154 (bug 1874990)
2024-01-18 12:07:55 -05:00
Daisuke Akatsuka
beb26b8db7 Bug 1855375: Basic implementation for Yelp Suggestions r=fluent-reviewers,flod,adw
Differential Revision: https://phabricator.services.mozilla.com/D189335
2024-01-18 15:54:41 +00:00
Karandeep
f11961815d Bug 1852048 - Move address bar to search preferences. r=dao,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D194895
2024-01-04 09:11:22 +00:00
Dão Gottwald
4be2dc5fec Bug 1865862 - [Firefox Suggest Opt-in Experiment] Update descriptions as per final figma. r=daleharvey
Not updating the ids here as these strings aren't localized.

Differential Revision: https://phabricator.services.mozilla.com/D194244
2023-11-21 19:40:51 +00:00
Karandeep
499e1c4a7e Bug 1852046 - Convert "Suggestions from the web" and "Suggestions from sponsors" toggles to checkboxes on privacy prefs page r=dao,fluent-reviewers,desktop-theme-reviewers,hjones,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D191641
2023-11-16 07:19:42 +00:00
Dão Gottwald
0b3462869a Bug 1864121 - [Firefox Suggest Opt-in Experiment] Add Shortcuts group label when contextual opt-in UI is shown above top sites. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D193649
2023-11-16 07:17:13 +00:00
Dão Gottwald
d8353059ce Bug 1852055 - [Firefox Suggest Opt-in Experiment] Implement opt-in UI at the top of the results list. r=daleharvey,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D193198
2023-11-10 11:28:14 +00:00
Natalia Csoregi
ab3b33ee93 Backed out changeset 555c786396f8 (bug 1852046) as requested. CLOSED TREE 2023-11-09 20:53:42 +02:00
Karandeep
9ec67c7d3d Bug 1852046 - Convert all toggles to checkboxes on privacy prefs page r=dao,fluent-reviewers,desktop-theme-reviewers,hjones,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D191641
2023-10-25 15:30:14 +00:00
Drew Willcoxon
148a53ad56 Bug 1827966 - Part 4: Remove resultMenu pref and support for dismiss and help buttons. r=dao,fluent-reviewers,desktop-theme-reviewers
Depends on D190894, D190846

Differential Revision: https://phabricator.services.mozilla.com/D190895
2023-10-13 21:52:07 +00:00
Drew Willcoxon
234916db20 Bug 1857391 - Remove Firefox Suggest "best match" as its own separate feature. r=daisuke,settings-reviewers
This removes "best match" as its own separate Firefox Suggest feature. In the
future, whether or not a suggestion is a best match (a.k.a. top pick) will be
determined by relevant product requirements. I've confirmed this with Nive.

Here's a summary of changes:

* Removes prefs and Nimbus variables related to best match
* Removes the "Top pick" checkbox in about:preferences
* Removes support for the `best_match` quick suggest config property. This
  property was removed from the config in remote settings a while ago.
* Removes legacy telemetry scalars related to best match. These scalars were
  added years ago for the original best match experiment and before we started
  using Glean. In the case of non-sponsored suggestions, the scalars have not
  been recorded at all for some time. In the case of sponsored suggestions, they
  can now be recorded again due to the recent addition of sponsored priority
  suggestions, but they are superseded by Glean.

Differential Revision: https://phabricator.services.mozilla.com/D190516
2023-10-11 17:17:06 +00:00
Drew Willcoxon
926cb1a6e5 Bug 1857137 - Convert addon suggestions from dynamic to standard results. r=daisuke,desktop-theme-reviewers,dao
This converts addon suggestions from dynamic to standard results and removes
support for review stars. Other things worth noting:

* I removed `suggestion.is_top_pick` support because addons should always be top
  picks. This lets us simplify the code and tests.
* This changes the overall icon box size for addons from 60px to 52px, since it
  combines the icon rules for Pocket and addons. I checked with Josh, and he
  says that's fine ([Slack](https://mozilla.slack.com/archives/C03LYL79G82/p1696471328852089?thread_ts=1696446640.986769&cid=C03LYL79G82))
* Currently the default `-webkit-line-clamp` is 3 and MDN and Pocket rows
  override it by setting it to 2. I think the opposite makes more sense, i.e.
  the default should be 2, since there are no row types that need it to be 3.
  This lets me avoid adding a rule for addon rows. (`-webkit-line-clamp` was
  added in D185247)

Depends on D190138

Differential Revision: https://phabricator.services.mozilla.com/D190145
2023-10-06 04:21:31 +00:00
Daisuke Akatsuka
7205841601 Bug 1856736: Revert group labels and result labels to their previous appearance r=adw
Differential Revision: https://phabricator.services.mozilla.com/D189984
2023-10-03 22:24:04 +00:00
DJ
15155df6a9 Bug 1854171 - Expose felt privacy pref language to localization. r=fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D188741
2023-09-20 17:36:20 +00:00
Daisuke Akatsuka
fe247c61cb Bug 1852187: Move sponsored suggestions higher r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D187873
2023-09-14 05:14:48 +00:00
Dale Harvey
95ab1ce9c9 Bug 1848048 - Add a result menu to disable trending results. r=dao,fluent-reviewers,settings-reviewers,flod,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D187066
2023-09-01 08:38:54 +00:00
Daisuke Akatsuka
67db1d7516 Bug 1847475: Implement the result menu for MDN suggestions r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D185523
2023-08-10 07:37:21 +00:00
Daisuke Akatsuka
3b11ed6b92 Bug 1847275: Change MDN brand name to 'MDN Web Docs' r=flod,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185514
2023-08-07 06:12:58 +00:00
Daisuke Akatsuka
1ccee30d4f Bug 1846915: Use a different 'Top pick' group label for MDN suggestions r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D185249
2023-08-04 13:29:08 +00:00
Daisuke Akatsuka
633e2a7437 Bug 1846894: Add 'Mozilla Developer Network' bottom text r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D185242
2023-08-03 21:36:07 +00:00
Sean Feng
776d16366f Bug 1811129 - Update quicksuggestOnboarding.html to reflect the latest <dialog> focusing algorithm changes r=adw
Given the <dialog> itself becomes focusable, the expected focusing
order has been changed.

Differential Revision: https://phabricator.services.mozilla.com/D185096
2023-08-02 13:35:47 +00:00
Hannah Peuckmann
2bab8aaf0e Bug 1836248 - Update the strip-on-share strings from the prototype for the v1. r=pbz,bolsson
I got the strings from Martin Balfanz, he worked on them with the content-team. They also requested to have a localization note added.

The strings for the prototype have been added in [D174253](https://phabricator.services.mozilla.com/D174253) and [D174251](https://phabricator.services.mozilla.com/D174251)

Differential Revision: https://phabricator.services.mozilla.com/D183245
2023-07-12 07:34:16 +00:00
Drew Willcoxon
f4e3504885 Bug 1841447 - Change the "Top pick" label to "Recommended reads" for Pocket suggestions. r=daisuke,fluent-reviewers,flod
Depends on D182634

Differential Revision: https://phabricator.services.mozilla.com/D182635
2023-07-05 15:47:25 +00:00
Drew Willcoxon
d9b865e27c Bug 1841446 - Update the "Not interested" command to disable Pocket suggestions. r=daisuke,fluent-reviewers,flod
Depends on D182606

Differential Revision: https://phabricator.services.mozilla.com/D182634
2023-07-05 15:47:24 +00:00
Drew Willcoxon
75a6c22fe7 Bug 1841442 - Finish integrating Pocket suggestions with rich suggestions. r=daisuke,fluent-reviewers,flod
* Add the "Pocket - Related to {keyword}" bottom text
* Don't show the description for non-top-picks
* Make sure the URL is always shown

[Reference Figma](https://www.figma.com/file/3m1GVo9lejjorUZrPSn7VW/Pocket-collections-suggestions?type=design&node-id=2616%3A9002&mode=design&t=0BKzoltXIvYTpPi6-1) (see "CD Work area" in the left sidebar, then the "V4 - Final" group)

Depends on D182537

Differential Revision: https://phabricator.services.mozilla.com/D182632
2023-07-05 15:47:24 +00:00
Gijs Kruitbosch
b1bf483ea9 Bug 1838632 - make fluent-lint complain about unknown attributes, r=flod,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D181228
2023-06-19 16:30:15 +00:00
James Teow
5eccd3fe6f Bug 1837239 - Remove the Preloaded Top URLs feature - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D180246
2023-06-13 18:27:12 +00:00
Drew Willcoxon
896b0a582c Bug 1836585 - Change the "Top pick" label to "Firefox extension" for addon suggestions. r=daisuke,fluent-reviewers,flod
This uses the new label but only when the addon suggestion is shown as a best
match. Otherwise the suggestion will be shown in the usual Firefox Suggest group
so it should use that label.

I chose `-brand-product-name`, which is always "Firefox" even on Nightly. I
don't think it makes sense to talk about "Nightly extensions".

Differential Revision: https://phabricator.services.mozilla.com/D179868
2023-06-05 21:01:32 +00:00