Commit Graph

65 Commits

Author SHA1 Message Date
mcheang
89b60bb888 Bug 1962223 - Add Special Message Action to set search mode. r=omc-reviewers,aminomancer,urlbar-reviewers,jteow
Differential Revision: https://phabricator.services.mozilla.com/D246531
2025-05-06 18:57:57 +00:00
Daisuke Akatsuka
18acc09b5f Bug 1957630: Restore Unified Search Button availability even after switching tab r=adw
Differential Revision: https://phabricator.services.mozilla.com/D244709
2025-04-10 02:19:34 +00:00
Moritz Beier
b3f32df67e Bug 1955066 - Enter search mode after adding an HTML form as a search engine. r=urlbar-reviewers,search-reviewers,scunnane,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D242187
2025-03-26 09:58:54 +00:00
Daisuke Akatsuka
1cc96a27ab Bug 1953920: Avoid capturing event on Unified Search Button when hiding the popup by mouse r=daleharvey
Depends on D241542

Differential Revision: https://phabricator.services.mozilla.com/D241700
2025-03-18 05:13:24 +00:00
Daisuke Akatsuka
f760504e7c Bug 1953927: Close urlbar view explicitly when opening Unified Search Engine popup r=desktop-theme-reviewers,daleharvey,dao
Differential Revision: https://phabricator.services.mozilla.com/D241542
2025-03-18 05:13:24 +00:00
Norisz Fay
17d578c8b5 Backed out 2 changesets (bug 1953920, bug 1953927) for causing searchModeSwitcher related failures CLOSED TREE
Backed out changeset 8b74e1a3e693 (bug 1953920)
Backed out changeset 4dfd7b14198d (bug 1953927)
2025-03-18 01:38:16 +02:00
Daisuke Akatsuka
4f5fc462ff Bug 1953920: Avoid capturing event on Unified Search Button when hiding the popup by mouse r=daleharvey
Depends on D241542

Differential Revision: https://phabricator.services.mozilla.com/D241700
2025-03-17 20:11:02 +00:00
Daisuke Akatsuka
854adc1c31 Bug 1953927: Close urlbar view explicitly when opening Unified Search Engine popup r=desktop-theme-reviewers,daleharvey,dao
Differential Revision: https://phabricator.services.mozilla.com/D241542
2025-03-17 20:11:02 +00:00
Mark Banner
878a5d5415 Bug 1951652 - Convert browser/components/search/ modules to use moz-src uris. r=search-reviewers,scunnane
Differential Revision: https://phabricator.services.mozilla.com/D240333
2025-03-05 09:24:37 +00:00
Daisuke Akatsuka
a25636e1a5 Bug 1936557: Wait to update placeholder/icon until user interaction on booting r=sessionstore-reviewers,daleharvey,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D239701
2025-02-26 19:50:50 +00:00
Daisuke Akatsuka
e78979d818 Bug 1934410: Use menupopup element for Unified Search popup instead of panel r=daleharvey,desktop-theme-reviewers,emilio,dao,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D232573
2025-02-12 23:47:19 +00:00
Alexandru Marc
c2a0f3fcfe Backed out changeset 26dd5b76091a (bug 1934410) for causing bc failures @ browser_searchMode 2025-02-10 16:39:36 +02:00
Daisuke Akatsuka
1ced078441 Bug 1934410: Use menupopup element for Unified Search popup instead of panel r=daleharvey,desktop-theme-reviewers,emilio,dao,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D232573
2025-02-10 12:19:14 +00:00
Alexandru Marc
3b25cc24f7 Backed out changeset c28f8599b92c (bug 1934410) for causing bc failures @ browser_searchModeSwitcher_telemetry.js CLOSED TREE 2025-02-10 10:31:38 +02:00
Daisuke Akatsuka
e91bbe7c76 Bug 1934410: Use menupopup element for Unified Search popup instead of panel r=daleharvey,desktop-theme-reviewers,emilio,dao,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D232573
2025-02-10 07:25:32 +00:00
Moritz Beier
152f732f88 Bug 1880913 - Part 3: Move open search handling from BrowserSearch to dedicated module. r=Standard8,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D235597
2025-02-04 11:07:12 +00:00
Yazan Al Macki
4507fb96aa Bug 1925235 - Avoid updating unified search button icon if searchMode has changed. r=daleharvey,sessionstore-reviewers,dao
Currently, multiple calls to #updateSearchIcon can run concurrently. When restarting the browser with a tab , and another tab in which a local search mode is active, the local search mode is incorrectly displayed as the default engine search mode. I believe this is due to the first #updateSearchIcon call (default engine, triggered when new tab is reopened) taking longer than the subsequent #updateSearchIcon call (triggered when the search mode is restored).

This is probably due to [[ https://searchfox.org/mozilla-central/rev/b6718bf263ae780289da471f0ea35797a09e2f05/browser/components/urlbar/SearchModeSwitcher.sys.mjs#329-334 | this ]] code taking a while to execute in comparison to [[ https://searchfox.org/mozilla-central/rev/b6718bf263ae780289da471f0ea35797a09e2f05/browser/components/urlbar/SearchModeSwitcher.sys.mjs#338-342 | this ]] code that runs for local search modes.

Ensuring that an #updateSearchIcon call terminates if search mode switches during its async processing prevents it from interfering with the next call triggered and incorrectly overriding the icon.

Differential Revision: https://phabricator.services.mozilla.com/D233036
2025-01-14 14:34:05 +00:00
Moritz Beier
8e4a84f631 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-09 09:17:26 +00:00
Daisuke Akatsuka
82f19238e9 Bug 1936545: Close search mode switcher popup when opening new tab r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D233470
2025-01-08 22:06:49 +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
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
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
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
Daisuke Akatsuka
8c442be904 Bug 1928132: Implement dynamic Unified Search Button mode r=desktop-theme-reviewers,daleharvey,dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228954
2024-12-05 07:13:31 +00:00
Daisuke Akatsuka
d7e1d7ee42 Bug 1928132: Show Unified Search Button always r=desktop-theme-reviewers,daleharvey,dao
Differential Revision: https://phabricator.services.mozilla.com/D228953
2024-12-05 07:13:31 +00:00
Daisuke Akatsuka
469165e0b1 Bug 1933459: Close urlbar result view when pressing ESC on USB r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D230484
2024-12-03 21:08:43 +00:00
Dale Harvey
8e8bf58624 Bug 1932106 - Add opensearch install badge to searchmodeswitcher. r=desktop-theme-reviewers,daisuke,dao
Differential Revision: https://phabricator.services.mozilla.com/D229487
2024-12-03 17:33:46 +00:00
Norisz Fay
5caeaca8fe Backed out 2 changesets (bug 1928132) for causing failures on browser_mouseout_notification_panel.js and Bug 1934387, Bug 1934388, Bug 1934389 CLOSED TREE
Backed out changeset 2ea4986f9eb8 (bug 1928132)
Backed out changeset 4a72ad308d0c (bug 1928132)
2024-11-30 15:43:28 +02:00
Daisuke Akatsuka
38412e4cd1 Bug 1928132: Implement dynamic Unified Search Button mode r=desktop-theme-reviewers,daleharvey,dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228954
2024-11-29 21:24:53 +00:00
Daisuke Akatsuka
3f8af9f7fe Bug 1928132: Show Unified Search Button always r=desktop-theme-reviewers,daleharvey,dao
Differential Revision: https://phabricator.services.mozilla.com/D228953
2024-11-29 21:24:52 +00:00
Goloman Adrian
2cd2737f6f Backed out 2 changesets (bug 1928132) for causing bc failures browser_popupNotification_2.js. CLOSED TREE
Backed out changeset 5882194e7456 (bug 1928132)
Backed out changeset 0d13b91f55e0 (bug 1928132)
2024-11-29 15:18:36 +02:00
Daisuke Akatsuka
c738c0eb32 Bug 1928132: Implement dynamic Unified Search Button mode r=desktop-theme-reviewers,daleharvey,dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228954
2024-11-29 11:18:02 +00:00
Daisuke Akatsuka
c48a63d430 Bug 1928132: Show Unified Search Button always r=desktop-theme-reviewers,daleharvey,dao
Differential Revision: https://phabricator.services.mozilla.com/D228953
2024-11-29 11:18:02 +00:00
Daisuke Akatsuka
b833b25016 Bug 1931765: Leave to default tab navigation behavior if no selected element r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D229428
2024-11-19 23:32:00 +00:00
Yazan Al Macki
ee6ba03fbb Bug 1928088 - Search button search engine icons should default to magnifying glass if no icon is provided for the search engine. r=daleharvey,urlbar-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D228109
2024-11-08 14:49:23 +00:00
Daisuke Akatsuka
176b51d0b0 Bug 1921174: Move focus to Dedicated Search button by Tab key from urlbar r=daleharvey,urlbar-reviewers,adw,dao
Differential Revision: https://phabricator.services.mozilla.com/D225176
2024-11-05 22:20:03 +00:00
Adi
f8402ccb58 Backed out changeset 4df1b9d10c1f (bug 1921174) for causing bc failures @ browser_searchModeSwitcher_basic.js. CLOSED TREE 2024-10-30 08:41:36 +02:00
Daisuke Akatsuka
a081ba9733 Bug 1921174: Move focus to Dedicated Search button by Tab key from urlbar r=daleharvey,urlbar-reviewers,adw
Differential Revision: https://phabricator.services.mozilla.com/D225176
2024-10-30 03:00:32 +00:00
Yazan Al Macki
76d48f287d Bug 1906541 - Ensure Searchmode Switcher works when Search Services fails. r=daleharvey,urlbar-reviewers,fluent-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D224522
2024-10-23 19:32:38 +00:00
Norisz Fay
1840f676be Backed out changeset 88669d7958cf (bug 1906541) for causing bc failure on browser_searchModeSwitcher_basic.js CLOSED TREE 2024-10-19 02:44:11 +03:00
Yazan Al Macki
5a1364fee1 Bug 1906541 - Ensure Searchmode Switcher works when Search Services fails. r=daleharvey,urlbar-reviewers,fluent-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D224522
2024-10-18 16:17:06 +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
Dale Harvey
70b4b3041c Bug 1913193 - Ensure dedicated search button does not get stuck. r=daisuke,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224471
2024-10-15 09:13:52 +00:00
James Teow
bb83581355 Bug 1923374 - Check state.persist is defined in SearchModeSwitcher - r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D224960
2024-10-08 15:52:46 +00:00
James Teow
46c33defd6 Bug 1921092 - Simplify Persisted Search logic and make non-default engines consistent - r=adw,urlbar-reviewers
The main goal is to simplify the logic in setURI, and create a more easier to understand flow of operations.

It involves making Persisted Search more contained, offload some responsibilities to UrlbarSearchTermsPersistence, and store fewer state variables than the patch that was first reviewed. I also simplified code in UrlbarSearchTermsPersistence.

**How Search Terms Persist:**

**Step 1**

When the page first appears, set state for search terms persistence. First load doesn't necessarily mean no tab switch or same page load, as a user could load a browser in the background tab. In that latter case, the first "view" may occur on a tab switch and the state won't exist because `setURI` will never have been called with that browser object being selected.

Once the state has been set, the only property that could be updated is `shouldPersist`. Otherwise, don't update the state object unless a full new page load occurs.

**Step 2**

Call `shouldPersist`. This has all the logic for when search terms should persist and gets called anytime `setURI` is called.

The conditions in which we shouldn't persist:

- There's no reason to show search terms:
  - The persist state is missing.
  - There are no search terms extracted from the URL.
- We need to temporarily hide the search terms, such as by handleRevert
  - `hideSearchTerms` is provided to setURI
- There is an user typed value and it differs from the search terms
- A single page application moved to a secondary page
- After the initial page load, there's the search mode (or lack of search mode) differs from the persist engine.

**Step 3**

Determine if we need to update `this.window.gBrowser.userTypedValue`. If we're going to persist, set `userTypedValue` to the search terms, which will keep the search mode and non-search mode state consistent. This'll also enable the ability to reuse existing logic that determines how to set `value`.

On same page loads, when switching from persist to non-persist, and search term equals the userTypedValue, then `null` the userTypedValue so that the URL shows.

**Step 4**

In the area of setURI which has logic for search mode, if we persist, ensure the search mode (or lack of search mode) is consistent with the engine. If it is, do nothing. If it isn't, either nullify the search mode or enter search mode.

Differential Revision: https://phabricator.services.mozilla.com/D224520
2024-10-08 04:12:29 +00:00
James Teow
d8061ef3e3 Bug 1903376 - Move searchTerms into UrlbarInput internal state - r=adw,urlbar-reviewers
The purpose of this change is to cache persist state into an object so that in future patches, I can add other persisted search related state to it.

Differential Revision: https://phabricator.services.mozilla.com/D224122
2024-10-01 19:33:54 +00:00
Daisuke Akatsuka
f378f2ad9a Bug 1913234: Always use urlbar-searchmode-switcher component as anchor r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D223450
2024-09-26 20:31:39 +00:00