Closed Bug 1948756 Opened 1 year ago Closed 8 months ago

[composable toolbar] Configure search terms

Categories

(Firefox for Android :: Toolbar, task, P2)

All
Android
task

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: petru, Assigned: harrisono)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fxdroid][group3][composable toolbar])

Attachments

(6 files)

Searched terms for the active tab are currently read from the BrowserStore and configured for how to be displayed here.

Also ensure support for editing search terms instead of navigating to home for a new search if the current tab was opened based on search terms already.

And ensure that whenever setting the url to display (inside of BrowserToolbarMiddleware) we'd pass only the url through that toDisplayUrl` API, not also the search terms.

One other detail is that whenever choosing "Paste & Go" in the popup menu from long pressing on the url we need to also update the search terms as it currently happens here.

Blocks: ct-fenix-configuration
No longer blocks: 1948591
See Also: → 1968699
Assignee: nobody → azinovyev
Status: NEW → ASSIGNED
Depends on: 1971807

Linked a recent ticket - bug 1964736 which showed that there are scenarios in which the search terms should not go through URLStringUtils.toDisplayUrl.
So whenever setting the url to display (inside of BrowserToolbarMiddleware), pass only the url through that toDisplayUrl` API, not also the search terms.

See Also: → 1971166, 1964736

Un-assigning this from andrey since we're pairing on another bug.

Assignee: azinovyev → nobody
Status: ASSIGNED → NEW
Assignee: nobody → hoglesby
Status: NEW → ASSIGNED

related ticket: bug 1964736

Blocks: 1968699
See Also: 1968699

We use the Environment idiom to be able to pass lifecycle based dependencies
to middlewares.
Since the browser toolbar is currently used in different contexts and with
different functionalities in the home and browser screens the concrete
environment classes were different.
But with searches being possible for search terms in the browser screen also
the search middlewares need to work with only one environment type, which now
will be BrowserToolbarEnvironment.

The new try-catch is a quick fix of an existing bug in InlineAutocompleteEditText
where immediately after gaining focus the autocompleted text is considered in
reporting the original text.
And this conflicts with the composable functionality which will try to focus when
the text is updated.

This brings the same behavior that we currently have with the toolbar view.

Attachment #9504286 - Attachment description: Bug 1948756 - part 4 - Support voice and qr input in searches started in browser r=#android-reviewers → Bug 1948756 - part 5 - Support voice and qr input in searches started in browser r=#android-reviewers
See Also: → 1980476
Attachment #9503048 - Attachment description: Bug 1948756 - Configure search terms for composable toolbar → Bug 1948756 - Part 6: Configure search terms for BrowserToolbarMiddleware
Pushed by hoglesby@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4d4453e9ff6f https://hg.mozilla.org/integration/autoland/rev/ae3bcd0d61f5 part 1 - Use just one toolbar environment r=android-reviewers,Roger https://github.com/mozilla-firefox/firefox/commit/5994d78dbff4 https://hg.mozilla.org/integration/autoland/rev/72eb662f8fc9 part 2 - Small code quality improvements r=android-reviewers,Roger https://github.com/mozilla-firefox/firefox/commit/9902389bf133 https://hg.mozilla.org/integration/autoland/rev/dcc6198fb2a0 part 3 - Support starting a search in browser for current search term r=android-reviewers,harrisono https://github.com/mozilla-firefox/firefox/commit/28954486f13e https://hg.mozilla.org/integration/autoland/rev/e9a786bba323 part 4 - Show a scrim when there is no input for searches in the browser screen r=android-reviewers,harrisono https://github.com/mozilla-firefox/firefox/commit/7e431e3d8835 https://hg.mozilla.org/integration/autoland/rev/f998ce28e9c2 part 5 - Support voice and qr input in searches started in browser r=android-reviewers,harrisono https://github.com/mozilla-firefox/firefox/commit/bee5883b32d0 https://hg.mozilla.org/integration/autoland/rev/fa323df85210 Part 6: Configure search terms for BrowserToolbarMiddleware r=android-reviewers,petru
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: