Commit Graph

265 Commits

Author SHA1 Message Date
Narcis Beleuzu
ec23d338d8 Backed out changeset 862bd1ab18fd (bug 1833091) for bc failure on browser_ext_webNavigation_urlbar_transitions.js . CLOSED TREE 2023-06-06 19:05:07 +03:00
Marc Seibert
7d202de3f8 Bug 1833091 - Replacing all get refs of UrlbarInput 'inputField.value' with '.value'.r=dao
Differential Revision: https://phabricator.services.mozilla.com/D180085
2023-06-06 13:46:55 +00:00
mcheang
9864559021 Bug 1648188 - Fix SearchService init failures so that the address bar can be used to search history and bookmarks. r=Standard8,mak
This patch refactors the SearchService private initialized variables and how
the SearchService stores its initialization status. These changes capture whether
the SearchService has succeeded, failed or hasn't finished initialization yet.

There are also changes made to UrlbarSearchUtils on handling when SearchService
has failed to initialize or when it hasn't finished initializing yet and we wait.
In the case where the SearchService has failed on initialization, We allow
the code to continue so that it can reach UrlbarProviderPlaces. Once we
are able to reach UrlbarProviderPlaces, we can make database calls for the user's
history and bookmarks. This allows the user to interact with the addressbar and
search their history and bookmarks even if SearchService has failed to initialize.

Differential Revision: https://phabricator.services.mozilla.com/D176936
2023-05-30 18:34:51 +00:00
Daisuke Akatsuka
994b06d295 Bug 1834218: Set userTypedValue to the selected browser when pasting value on the urlbar r=adw
Differential Revision: https://phabricator.services.mozilla.com/D178993
2023-05-25 02:12:57 +00:00
Karandeep
bab497399a Bug 1806120 - Pass down window handle to provider. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D178436
2023-05-24 14:19:01 +00:00
Mark Banner
0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Iulian Moraru
9a36d620f9 Backed out changeset bbb3bbd9b6af (bug 1830679) for causing dt failures on browser_storage_cache_delete.js. CLOSED TREE 2023-05-18 22:09:25 +03:00
Itiel
801dad3de3 Bug 1830679 - Convert element.setAttribute(data-l10n-{id,args}) uses in the codebase to document.l10n.setAttributes(element, id, args) r=eemeli,willdurand,extension-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,mconley,Standard8,jdescottes,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D176791
2023-05-18 17:19:45 +00:00
Hannah Peuckmann
f8ce125f0a Bug 1823338 - Strip url when copying from url bar.r=pbz,flod,adw
Differential Revision: https://phabricator.services.mozilla.com/D174251
2023-05-11 14:14:41 +00:00
Drew Willcoxon
42a104c6fa Bug 1830385 - Implement the dismissal "Thanks for your feedback" message in Suggest results. r=dao,fluent-reviewers,flod
This implements the second "thanks for your feedback" UI for weather, Pocket,
addon, MDN, etc. suggestions. The first UI is in D175729, which this revision
builds on.

This UI is shown when a result is dismissed. It's essentially a tip with a
smaller icon and padding. It has the "Got it" button that dismisses the tip
itself when clicked.

I noticed tip top and bottom borders use `--panel-separator-color`, which
doesn't seem right. They're supposed to be the same color as the borders between
the input and view and between the results and one-off buttons, which is
`--autocomplete-popup-separator-color`. The spec for this feature uses the same
colors too. So I changed that too. (The use of `--panel-separator-color` goes
back to [the initial tip implementation](https://hg.mozilla.org/mozilla-central/rev/78886081d45b09987c1825cc5a160fd6bec61cb8) in 70, but search tips and
interventions weren't added until 74, in bug 1606909 and bug 1606917. I checked,
and in 74 all the borders are the same color.)

References:

* [Figma](https://www.figma.com/file/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?node-id=2421%3A62540&t=svOk7TxQv4V7Y9L4-1) (see "A11y review - user feedback" in sidebar)
* [Clickable prototype](https://www.figma.com/proto/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?page-id=2192%3A42825&node-id=2394-52468&viewport=246%2C526%2C0.12&scaling=min-zoom&starting-point-node-id=2394%3A52468&show-proto-sidebar=1) (see "Revised 4/3" in sidebar)
* [Content design](https://docs.google.com/document/d/1Mgt_oAIEDz_sF-YBqqUGtfKHQCAtRzEQohpfqk-2X8U/edit?usp=sharing)

Depends on D175729

Differential Revision: https://phabricator.services.mozilla.com/D176468
2023-05-02 20:15:18 +00:00
Norisz Fay
75705bdd6e Backed out changeset d09e87ed0a41 (bug 1830385) for causing xpcshell failures on test_weather.js CLOSED TREE 2023-05-02 22:05:41 +03:00
Drew Willcoxon
374c34715d Bug 1830385 - Implement the dismissal "Thanks for your feedback" message in Suggest results. r=dao,fluent-reviewers,flod
This implements the second "thanks for your feedback" UI for weather, Pocket,
addon, MDN, etc. suggestions. The first UI is in D175729, which this revision
builds on.

This UI is shown when a result is dismissed. It's essentially a tip with a
smaller icon and padding. It has the "Got it" button that dismisses the tip
itself when clicked.

I noticed tip top and bottom borders use `--panel-separator-color`, which
doesn't seem right. They're supposed to be the same color as the borders between
the input and view and between the results and one-off buttons, which is
`--autocomplete-popup-separator-color`. The spec for this feature uses the same
colors too. So I changed that too. (The use of `--panel-separator-color` goes
back to [the initial tip implementation](https://hg.mozilla.org/mozilla-central/rev/78886081d45b09987c1825cc5a160fd6bec61cb8) in 70, but search tips and
interventions weren't added until 74, in bug 1606909 and bug 1606917. I checked,
and in 74 all the borders are the same color.)

References:

* [Figma](https://www.figma.com/file/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?node-id=2421%3A62540&t=svOk7TxQv4V7Y9L4-1) (see "A11y review - user feedback" in sidebar)
* [Clickable prototype](https://www.figma.com/proto/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?page-id=2192%3A42825&node-id=2394-52468&viewport=246%2C526%2C0.12&scaling=min-zoom&starting-point-node-id=2394%3A52468&show-proto-sidebar=1) (see "Revised 4/3" in sidebar)
* [Content design](https://docs.google.com/document/d/1Mgt_oAIEDz_sF-YBqqUGtfKHQCAtRzEQohpfqk-2X8U/edit?usp=sharing)

Depends on D175729

Differential Revision: https://phabricator.services.mozilla.com/D176468
2023-05-02 16:50:43 +00:00
Cosmin Sabou
eadc2a4afd Backed out changeset ea52cdb6d093 (bug 1684017) as requested by fchasen for being something we don't want to change by UX. 2023-05-01 23:46:53 +03:00
Fred Chasen
0569d9b15c Bug 1684017 - Avoid closing the window when using switch to tab r=mhowell
Prevents removing the tab after switching if the previous tab was the last visible tab in a window.

Differential Revision: https://phabricator.services.mozilla.com/D175821
2023-04-19 17:40:36 +00:00
Daisuke Akatsuka
f1441c3114 Bug 1824040: Make the loading URL opened in _blank target to be the target of Session Restore r=mak,smaug,farre,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D173790
2023-04-14 01:59:44 +00:00
Drew Willcoxon
c26ec9b3d6 Bug 1827762 - Replace UrlbarProvider.pickResult() and blockResult() with onEngagement() r=mak
This removes `UrlbarProvider.pickResult()` and `blockResult()` in favor of
handling picks and dismissals through `onEngagement()`. A number of providers
use those two methods, so this revision touches a lot of files.

Handling dismissals through `onEngagement()` means `UrlbarInput.pickResult()`
can no longer tell whether a result is successfully dismissed, so it can't
remove the result anymore. (Maybe `onEngagement()` could return some value
indicating it dismissed the result, but I don't want to go down that road.)
Instead, I split `UrlbarController.handleDeleteEntry()` into two methods: a
public one that removes the result and notifies listeners, and a private one
that handles dismissing the selected result internally in
UrlbarController. Providers that have dismissable results should now implement
`onEngagement()` and call `controller.removeResult()`.

I made some other improvements to engagement handling. There's still room for
more but this patch is big enough already.

Other notable changes:

Include the engaged result in engagement notifications so providers have easy
access to it and can respond to clicks and dismissals more easily. That also
lets us stop passing `selIndex` and `provider` to `engagementEvent.record()`
since now it can compute those from the passed-in result.

Add the concept of `isSessionOngoing` to engagement notifications so providers
can tell whether an engagement ended the search session. Right now, providers
like quick suggest that record a bunch of provider-specific legacy telemetry
assume that `onEngagement()` ends the session, but that's no longer true.

Unify result buttons and result menu commands by setting
`element.dataset.command` on buttons (hopefully we can remove buttons soon, at
least the ones that aren't tip buttons)

Make sure we always notify providers on engagement even on dismissals or
when skipping legacy telemetry

Move dismissal of restyled search suggestions and history results from
`UrlbarController.handleDeleteEntry()` to the Places provider

Move dismissal of form history results from
`UrlbarController.handleDeleteEntry()` to the search suggestions provider

In the Places provider, remove the unused `_addSearchEngineMatch()` method. Also
remove the code in the "searchengine" case that creates a non-search-history
result. This code is unreached because the only time the provider creates a
"searchengine" match it also sets `isSearchHistory` to true.

In `UrlbarTestUtils.promiseAutocompleteResultPopup()`, change the default value
of the `fireInputEvent` param from false to true. This is necessary because
without a starting input event, the start event info in `engagementEvent` will
be null, so when `engagementEvent.record()` is called at the end of the
engagement, it will bail, and providers will not be notified of the engagement.
IMO true is a better default value anyway because input events will typically be
fired when the user performs a search.

Differential Revision: https://phabricator.services.mozilla.com/D174941
2023-04-13 06:03:33 +00:00
Daisuke Akatsuka
8530a48586 Bug 1823690: Change behavior of pasting data url r=adw
Differential Revision: https://phabricator.services.mozilla.com/D175023
2023-04-12 21:10:16 +00:00
Daisuke Akatsuka
fe945c896a Bug 1826184: Show go-button even if pasting multiline text on urlbar r=adw
The direct reason why the go-button was hidden when pasting text is that
"usertyping" attribute will not be true.
https://searchfox.org/mozilla-central/rev/8433b62e54fd30663e82f090c4d31554531a2e66/browser/base/content/browser.css#754
When pasting data and removing white space or line break, call preventDefault().
https://searchfox.org/mozilla-central/rev/8433b62e54fd30663e82f090c4d31554531a2e66/browser/components/urlbar/UrlbarInput.sys.mjs#3504-3505
The other hand, if not removing any chars, _on_input() will be called because
don't call preventDefault(). And, the attribute is set in _on_input().
https://searchfox.org/mozilla-central/rev/8433b62e54fd30663e82f090c4d31554531a2e66/browser/components/urlbar/UrlbarInput.sys.mjs#3343

So, we set the attribute even if pasting data is changed as same as _on_input().

Differential Revision: https://phabricator.services.mozilla.com/D174576
2023-04-04 21:40:24 +00:00
James Teow
6d9909060f Bug 1825642 - Hide the persist search tip when a Popup is visible - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D174178
2023-04-03 03:29:55 +00:00
Daisuke Akatsuka
56c121f318 Bug 610357: Show pending URL in location bar and tab while loading. r=mak,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D170045
2023-03-23 21:24:11 +00:00
Mark Banner
25bf79be3b Bug 1823763 - Convert consumers of toolkit/components/reader/ to import ES modules directly. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D173184
2023-03-23 12:11:44 +00:00
Sandor Molnar
8ba916acb7 Backed out changeset b8ae8c3725cd (bug 610357) for causing multiple failures in browser_link_in_tab_title_and_url_prefilled.js / browser_cdp.js 2023-03-23 04:35:38 +02:00
Daisuke Akatsuka
c6baf52b6c Bug 610357: Show pending URL in location bar and tab while loading. r=mak,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D170045
2023-03-23 00:44:47 +00:00
James Teow
18ca46e947 Bug 1815971 - Count number of times persisted search is viewed and reverted due to Popups - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D172690
2023-03-22 13:59:06 +00:00
James Teow
1a9f342703 Bug 1815769 - Add optional anchor lookup to PopupNotifications - r=Gijs,adw
Differential Revision: https://phabricator.services.mozilla.com/D169814
2023-03-14 14:29:58 +00:00
Daisuke Akatsuka
7c048856b3 Bug 1817208: Introduce search_shortcut_button type for immediate search on oneoff button r=mak
Differential Revision: https://phabricator.services.mozilla.com/D172207
2023-03-13 23:59:06 +00:00
Dão Gottwald
8b7b30f0a4 Bug 1790020 - Hook up urlbar result menu with telementry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D168688
2023-03-09 12:02:13 +00:00
Cristina Horotan
1255ede78b Backed out changeset fcc4aae881d7 (bug 1790020) for causing bc failures at browser_ext_urlbar.js CLOSED TREE 2023-03-09 13:11:26 +02:00
Dão Gottwald
4d726892e1 Bug 1790020 - Hook up urlbar result menu with telementry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D168688
2023-03-09 09:54:20 +00:00
Stanca Serban
0edec904ef Backed out changeset e7822e311e0c (bug 1790020) for causing mochitests failures in browser/components/urlbar/tests/browser-tips/browser_searchTips_interaction.js. CLOSED TREE 2023-03-08 17:40:26 +02:00
Dão Gottwald
42c66fc8dd Bug 1790020 - Hook up urlbar result menu with telementry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D168688
2023-03-08 14:22:31 +00:00
James Teow
5badf35776 Bug 1818848 - Use valid pageproxystate for persisted search terms when urlbar is un-focused - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D170973
2023-03-07 22:08:32 +00:00
Daisuke Akatsuka
cc5cbd2fef Bug 1817155: Make results and groups empty if the result view has not been shown upon engagement r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170143
2023-02-25 07:32:04 +00:00
Daisuke Akatsuka
fa543b9869 Bug 1815342: Take telemetry of the user action that deletes the autofilled string. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D169172
2023-02-09 21:55:22 +00:00
Dão Gottwald
fa7b554ee2 Bug 1801389 - SPACE should open the result menu when the button is selected. r=mak,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D168522
2023-02-03 03:11:20 +00:00
Neil Deakin
21426e24f4 Bug 1776879, replace text/unicode for clipboard and drag and drop and use text/plain directly, r=edgar,mak,stransky,geckoview-reviewers,extension-reviewers,zombie,m_kato
Most usage is a straight replacement but gtk needs extra changes as it transfers plain text in UTF8 natively and needs to be converted into UTF16, and Windows uses single-byte characters for RTF and CF_HTML formats so we preserve this.

Differential Revision: https://phabricator.services.mozilla.com/D158587
2023-02-01 23:30:55 +00:00
Hannah Peuckmann
9f66067efd Bug 791594 - Set URL bar state while prompt is open. r=pbz,Gijs,adw
Differential Revision: https://phabricator.services.mozilla.com/D164441
2023-01-31 18:16:54 +00:00
Dão Gottwald
0d552ab65d Bug 1801299 - Fix outside click behavior for the urlbar result menu. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D167919
2023-01-26 16:24:26 +00:00
Daisuke Akatsuka
93900527e9 Bug 1808932: Take abandonment event even when closing the result view while the input does not have focus. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D167641
2023-01-25 22:38:27 +00:00
Mark Banner
2bd093b567 Bug 1811334 - Automatically replace Cu.reportError with console.error (most of browser/components). r=settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D167297
2023-01-20 17:49:21 +00:00
Edgar Chen
3759883d83 Bug 1796548 - Introduce a generic method to check clipboard capabilities in nsIClipboard; r=geckoview-reviewers,nika,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D166475
2023-01-16 19:50:17 +00:00
Dão Gottwald
e7a8bffbe0 Bug 1809705 - Implement "Learn more about Firefox Suggest" menu item in the urlbar result menu. r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D166578
2023-01-13 16:03:06 +00:00
Cristian Tuns
e148ca6903 Backed out changeset 03202cdedb1e (bug 1809705) for causing bc failures CLOSED TREE 2023-01-13 10:18:41 -05:00
Dão Gottwald
047b8c03dc Bug 1809705 - Implement "Learn more about Firefox Suggest" menu item in the urlbar result menu. r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D166578
2023-01-13 10:50:16 +00:00
Dão Gottwald
3ae3091bb9 Bug 1790024 - Add urlbar result menu for top pick and sponsored Firefox Suggest items. r=adw,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D166184
2023-01-11 12:23:26 +00:00
James Teow
537118e46e Bug 1803681 - Show the search term if returning to a tab contains a blank value - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D163730
2023-01-03 18:24:36 +00:00
Dão Gottwald
0d540405bb Bug 1806491 - Add urlbar result menu for history suggestions. r=mak,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D165061
2022-12-23 15:54:08 +00:00
Daisuke Akatsuka
4b4fa32e15 Bug 1805717: Introduce search_mode property. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D164794
2022-12-20 07:10:11 +00:00
Stanca Serban
8afe90eead Backed out changeset 3adf002ab926 (bug 1805717) for searchMode mochitests related failures in browser_touchbar_searchrestrictions.js. CLOSED TREE 2022-12-20 07:07:55 +02:00
Daisuke Akatsuka
3bce4ac968 Bug 1805717: Introduce search_mode property. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D164794
2022-12-20 00:55:36 +00:00