Commit Graph

360 Commits

Author SHA1 Message Date
Titouan Thibaud
f34ecc993c Bug 1914204 - Remove Container alias and use directly ContainerState. r=android-reviewers,gl,mcarare
This will prevent build errors when upgrading to Kotlin 2.0

Differential Revision: https://phabricator.services.mozilla.com/D219765
2024-08-22 08:18:20 +00:00
Alex Jakobi
afb08ed09b Bug 1900622 - Add capabilities to hide dynamic toolbar on Fenix. r=android-reviewers,tthibaud
Differential Revision: https://phabricator.services.mozilla.com/D213962
2024-08-21 13:27:03 +00:00
Sandor Molnar
b0107b0500 Backed out changeset 7e422af6bf16 (bug 1900622) for causing ktlint failures. CLOSED TREE 2024-08-21 14:09:31 +03:00
Alex Jakobi
ddea95694b Bug 1900622 - Add capabilities to hide dynamic toolbar on Fenix. r=android-reviewers,tthibaud
Differential Revision: https://phabricator.services.mozilla.com/D213962
2024-08-21 10:42:10 +00:00
mcarare
9aaef295b4 Bug 1880805 - Suppress ComponentCallbacks2 levels deprecation. r=android-reviewers,kaya
Differential Revision: https://phabricator.services.mozilla.com/D217435
2024-08-08 08:02:35 +00:00
Noemi Erli
078b6e5660 Backed out 9 changesets (bug 1880805, bug 1880792) for causing Android build bustages CLOSED TREE
Backed out changeset 31bdbc9aeaa4 (bug 1880805)
Backed out changeset 774f35ca40c6 (bug 1880805)
Backed out changeset 245c3192541e (bug 1880805)
Backed out changeset b6ebbf12ab50 (bug 1880805)
Backed out changeset 17995dc18511 (bug 1880805)
Backed out changeset 42b34af74a6b (bug 1880805)
Backed out changeset 2f77befbf593 (bug 1880805)
Backed out changeset 974b02a7b0c6 (bug 1880792)
Backed out changeset bb02a20ea5fd (bug 1880792)
2024-08-07 21:36:15 +03:00
mcarare
aea1024ecb Bug 1880805 - Suppress ComponentCallbacks2 levels deprecation. r=android-reviewers,kaya
Differential Revision: https://phabricator.services.mozilla.com/D217435
2024-08-07 14:20:48 +00:00
Norisz Fay
817e11ed18 Backed out 9 changesets (bug 1880805, bug 1880792) for causing WR bustages
Backed out changeset b4a34334966e (bug 1880805)
Backed out changeset 930b186197c7 (bug 1880805)
Backed out changeset a123725cb63e (bug 1880805)
Backed out changeset 361853f53ba9 (bug 1880805)
Backed out changeset b23f3321ac09 (bug 1880805)
Backed out changeset ed4650fa6bec (bug 1880805)
Backed out changeset 413d884fda78 (bug 1880805)
Backed out changeset e7fff6a1e708 (bug 1880792)
Backed out changeset 781599462673 (bug 1880792)
2024-08-07 14:55:34 +03:00
mcarare
e2a3020828 Bug 1880805 - Suppress ComponentCallbacks2 levels deprecation. r=android-reviewers,kaya
Differential Revision: https://phabricator.services.mozilla.com/D217435
2024-08-07 10:45:56 +00:00
Narcis Beleuzu
a84dc052f1 Backed out 9 changesets (bug 1880805, bug 1880792) for gradle-dependencies TL bustages. CLOSED TREE
Backed out changeset f94e6acf0cd3 (bug 1880805)
Backed out changeset 22e14524bf1f (bug 1880805)
Backed out changeset 774b263652b5 (bug 1880805)
Backed out changeset 77fe8fb48620 (bug 1880805)
Backed out changeset 3ae77f91197e (bug 1880805)
Backed out changeset 1ffaa88f56da (bug 1880805)
Backed out changeset 1dee3246c6a2 (bug 1880805)
Backed out changeset 9abb09c562ef (bug 1880792)
Backed out changeset 24a1c7a574c4 (bug 1880792)
2024-08-06 22:41:06 +03:00
mcarare
c56d5e3a6c Bug 1880805 - Suppress ComponentCallbacks2 levels deprecation. r=android-reviewers,kaya
Differential Revision: https://phabricator.services.mozilla.com/D217435
2024-08-06 17:38:55 +00:00
Gabriel Luong
390d7ab2d2 Bug 1885632 - [Menu Redesign] Implement mobile/desktop site states r=android-reviewers,matt-tighe
Differential Revision: https://phabricator.services.mozilla.com/D210722
2024-07-24 02:57:48 +00:00
ohall-m
91975289b9 Bug 1908986 - Part 1: Fetch new Android translations information on locale change r=android-reviewers,giorga
This patch adds an observer to UpdateLocaleAction that makes the calls to fetch new language names
and model download sizes when a locale change occurs.

Differential Revision: https://phabricator.services.mozilla.com/D217188
2024-07-23 14:04:30 +00:00
Cathy Lu
2b9ff92c41 Bug 1903231 - On restore session, remove local content uri tabs r=android-reviewers,007
Differential Revision: https://phabricator.services.mozilla.com/D216720
2024-07-22 21:07:34 +00:00
Norisz Fay
7291d43f60 Backed out 2 changesets (bug 1900622) for causing Bug 1908553 and ktlint failure CLOSED TREE
Backed out changeset 0954f6f12226 (bug 1900622)
Backed out changeset 331cc5c5a9d9 (bug 1900622)
2024-07-18 08:36:53 +03:00
Alex Jakobi
c8b7b00618 Bug 1900622 - Add capabilities to hide dynamic toolbar on Fenix. r=android-reviewers,tthibaud
Differential Revision: https://phabricator.services.mozilla.com/D213962
2024-07-17 16:23:16 +00:00
Jeff Boek
1a2d16a5d4 Bug 1889066 - Adds tests to test includeParent r=android-reviewers,amejiamarmol
Depends on D206815

Differential Revision: https://phabricator.services.mozilla.com/D206816
2024-07-01 19:15:02 +00:00
ohall-m
e9f9d1607c Bug 1900148 - Part 2: Update AC/Fenix to Respond to Pivot Languages Appropriately r=android-reviewers,giorga
This patch adds logic to better account for pivot languages in non-English apps.
It changes:
* English may be downloaded as a language
* English may be deleted as a language, when it is the only language left
* English now syncs whenever it is downloaded
* Model state is periodically refreshed with Gecko in the Translations middleware
when nothing is processing

Differential Revision: https://phabricator.services.mozilla.com/D214638
2024-06-27 20:18:14 +00:00
ohall-m
451973380e Bug 1902023 - Update isTranslateProcessing to Clear on page load r=android-reviewers,calu
When a page change happens, the translations engine stops working on the
translation. This new state needs to be reflected in the browser store.

To do this:
* Added `SetTranslateProcessingAction` to change `isTranslateProcessing`
* Added `onTranslatePageChange`` that is notified at onLocationChange
* `onTranslatePageChange` calls `SetTranslateProcessingAction` and requests
the state be set to false

Differential Revision: https://phabricator.services.mozilla.com/D213606
2024-06-17 14:44:02 +00:00
ohall-m
195e314d0a Bug 1900582 - Update Android Translations ModelState to include ERROR States r=android-reviewers,giorga
Right now, when an error occurs when downloading or deleting a translations model,
there is nothing to indicate which model had an error.

This patch introduces `ERROR_DELETION` and `ERROR_DOWNLOAD` to indicate state.

Differential Revision: https://phabricator.services.mozilla.com/D213459
2024-06-13 16:29:44 +00:00
Gabriel Luong
635f5253fe Bug 1901163 - Refactor updateContentState to be an internal function r=android-reviewers,twhite
`updateTheContentState` and `updateContentState` are the same function. We should refactor the original function
`updateContentState` to be an `internal` function so that we can remove the reductant `updateTheContentState`.

Differential Revision: https://phabricator.services.mozilla.com/D212889
2024-06-12 15:25:21 +00:00
jackyzy823
74e0d99490 Bug 1893846 - Don't dispatch UpdateHasFormDataAction after PauseAction and reset previousHighestPriorityTabId when UnlinkEngineSessionAction. r=android-reviewers,boek
Differential Revision: https://phabricator.services.mozilla.com/D208850
2024-05-30 16:16:36 +00:00
ohall-m
c276c7ecb2 Bug 1897785 - Update Translations OperationRequestedAction to Not Require a Tab ID r=android-reviewers,giorga
Most calls under `OperationRequestedAction` do not require a tabId because they change
information on the global store and not the session store.

* This patch makes `tabId` an optional for `OperationRequestedAction`
* For the one call, `FETCH_PAGE_LANGUAGES`, that does require a tabId a
sensible default of the current tab will be used and a warning will be logged.

Depends on D210562

Differential Revision: https://phabricator.services.mozilla.com/D210954
2024-05-30 14:08:23 +00:00
ohall-m
105ecb9ad7 Bug 1898520 - Update AC isTranslateProcessing r=android-reviewers,giorga
In bug 1892715 the wait states for translations changed; however,
`isTranslateProcessing` logic did not change. This is to fix `isTranslateProcessing`
to use the longer wait state.

Differential Revision: https://phabricator.services.mozilla.com/D211439
2024-05-27 12:46:53 +00:00
ohall-m
28fa0d8cd1 Bug 1881810 - Download and Delete Translation Models from AC r=android-reviewers,calu,giorga
This patch adds AC changes to allow translation language models to be downloaded
and deleted. Including:
* Adds `ManageLanguageModelsAction` to request changes to language models.
* Adds to the translations state reducer to accommodate state changes when updating.
* Adds `ModelState` to `LanguageModel` in order to capture processing states.
* Adds `ModelUpdateError` as a general area for when the action fails on the engine.

Differential Revision: https://phabricator.services.mozilla.com/D210562
2024-05-23 13:22:46 +00:00
rahulsainani
3e18c5ca8f Bug 1893415 - Convert Downloads list to Compose UI r=android-reviewers,twhite,gl,007
Differential Revision: https://phabricator.services.mozilla.com/D208598
2024-05-16 14:01:28 +00:00
William Durand
d00383a7ed Bug 1893387 - Refactor how required permissions/origins are passed from Gecko to the embedder in exportExtension(). r=amejiamarmol,android-reviewers,robwu,geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D208503
2024-05-15 20:35:39 +00:00
ohall-m
6cd07c8608 Bug 1892715 - Part 3: Update Android Components isTranslated Logic r=android-reviewers,giorga
This patch updates Android Components to use the new `hasVisibleChange `
information from the translations engine to better manage translations visible state.

Differential Revision: https://phabricator.services.mozilla.com/D209577
2024-05-07 23:39:55 +00:00
Jeff Boek
6a8372ee6c Bug 1889066 - Adds property to LoadUrlAction to determine if we should include a parentEngineSession when loading a URL r=android-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D206815
2024-05-07 16:14:10 +00:00
Gabriel Luong
e1a1f56f90 Bug 1885628 - Part 3: Refactor getProperUrl into an extension function TabSessionState.getUrl r=android-reviewers,harrisono
- This refactors `getProperUrl` that was introduced in https://github.com/mozilla-mobile/fenix/pull/16181 into an extension function that lives in AC.
- This function will fetch the correct URL to be used when handling features such as bookmarks or share regardless of what mode the browser might be in (e.g. Reader mode).

Differential Revision: https://phabricator.services.mozilla.com/D208215
2024-05-05 08:20:45 +00:00
ohall-m
e4cbdc0856 Bug 1881814 - Translations AC Action to Update Language Preferences r=android-reviewers,giorga
This patch adds the option to update the user's language settings from a global perspective.

* Adds `TranslationsAction.UpdateLanguageSettingsAction` to update the language setting.
  * `TranslationsStateReducer` proactively accepts updates and is set on the translations engine or else the state is rolled back in `TranslationsMiddleware`.
* Refactors `updateLanguageSetting` in `TranslationsMiddleware` to handle both the page setting and global setting perspective.

Differential Revision: https://phabricator.services.mozilla.com/D208755
2024-04-29 14:02:41 +00:00
ohall-m
6deba21e0b Bug 1892743 - Add Global Translations Offer AC Options r=android-reviewers,giorga
Right now, it is only possible to access the “offer to translate” setting off of page settings. Unlike most of the other page settings, this setting is also a global setting.
This patch adds an option to view this setting independently of page settings and helps keep it in sync, when page settings change this setting as well.

We need this because it will soon be possible to access the global settings layer of settings directly via the main menu settings.

This patch:
* Adds `SetGlobalOfferTranslateSettingAction` - Sets the `offerTranslation` value on the global `TranslationsBrowserState`. Intended for global usage.
* Adds `UpdateGlobalOfferTranslateSettingAction` - A global way to update the offer to translate value outside of a page.
* Adds `TranslationOperation.FETCH_OFFER_SETTING` - The same as `SetGlobalOfferTranslateSettingAction`, but for a tab. Intended for tab usage.
* Adds a call to set `offerTranslation` on `Init`

Differential Revision: https://phabricator.services.mozilla.com/D208233
2024-04-24 13:31:05 +00:00
ohall-m
d4dbb0322c Bug 1881611 - Migrate Android Translations "Could never translate this site" to Global state r=android-reviewers,giorga
This patch makes a few modifications:
* Migrates `TranslationsState.neverTranslateSites` (session) to `TranslationsBrowserState.neverTranslateSites` (global browser)
* Behavior change: Can no longer update page settings when this list changes, because we have limited info on the session.
* Fetches `neverTranslateSites` information initially on app startup.

Differential Revision: https://phabricator.services.mozilla.com/D208031
2024-04-22 18:19:22 +00:00
Iulian Moraru
bbbd8ed40c Backed out changeset 84ea5c275334 (bug 1889066) for causing Engine related android build bustages. CLOSED TREE 2024-04-22 21:10:25 +03:00
Jeff Boek
eeac00117e Bug 1889066 - Adds property to LoadUrlAction to determine if we should include a parentEngineSession when loading a URL r=android-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D206815
2024-04-22 16:00:20 +00:00
iorgamgabriel
8306f76ccf Bug 1885125 - The translation bottom sheet should not be displayed after dismissing it. r=android-reviewers,ohall,gl
Differential Revision: https://phabricator.services.mozilla.com/D206650
2024-04-08 06:17:26 +00:00
ohall-m
fb7d530978 Bug 1885336 - Part 2: Couldn't Load Languages did not show when Expected r=android-reviewers,giorga,gl
This patch fixes showing the Couldn't Load Languages translation error.
Part 1 of this series ensures the translations engine re-queries the language.

This patch:
* Fixes a `var` v. `val` recommendation
* Reorganized error handling
    * Session errors have priority over browser errors
    * Ensures null errors are also sent to clear state
* Proactively requests languages again when the dialog reopens and ensures error state

Differential Revision: https://phabricator.services.mozilla.com/D205473
2024-04-01 13:25:22 +00:00
ohall-m
dd78da47e1 Bug 1885137 - Added Logging for if the Translation Engine is Supported
Added additional logging to know if the translations engine is supported
on the device.
2024-03-13 15:51:24 +00:00
ohall-m
4dc4264b42 Bug 1884459 - Prevent Offers to Translate after a Translation Occurs
This bug slightly adjusts the reducer to set `isOfferTranslate` to false
once a translation occurs.
2024-03-11 20:59:00 +00:00
Mark Hammond
7f8a575403 Bug 1879332 - ensure synced tabs includes the inactive property 2024-03-08 19:52:59 +00:00
ohall-m
bfceb71733 Bug 1878917 - Add Reducer for Checking for LanguageNotSupported and Send Error
This updates the translations session store to set an error when the
language is not supported.
2024-03-08 00:31:08 +00:00
ohall-m
adf4883c1f Bug 1883128 - Fix Logic Issue In Setting Page LanguageSettings
The language setting converter had an issue where it set to `NEVER`
instead of `OFFER`, which caused incorrect behavior.
2024-03-07 00:34:46 +00:00
jackyzy823
536a0f5fd3 Bug 1853107 - Fix a race condition on CreateEngineSession 2024-03-06 22:13:36 +00:00
t-p-white
d4300473fe Bug 1813913 - Added support for Custom Tabs setColorScheme & setColorSchemeParams API 2024-03-05 17:52:49 +00:00
ohall-m
6c6ae72bce Bug 1883127 - Clear isOfferTranslate Under Certain Conditions
This bug clears `isOfferTranslate` similarly to `isExpectedTranslate`
on a translations engine state change.
2024-03-04 20:47:29 +00:00
ohall-m
3c5b610023 Bug 1862291 - Operation for Fetching Global Language Settings
This patch adds functionality for fetching global language settings for
translations.

This patch adds:
* The Operation `FETCH_AUTOMATIC_LANGUAGE_SETTINGS` for fetching the global language
settings from the translation engine.
* `SetLanguageSettingsAction` to set the `languageSettings` on `TranslationsBrowserState`.
*Initialization occurs in `initializeBrowserStore'
* Updates page settings to call `FETCH_AUTOMATIC_LANGUAGE_SETTINGS` after a page level
language update. (These settings coordinate both globally and on a page level.)
2024-03-04 20:04:01 +00:00
ohall-m
8b1a4d734e Bug 1882542 - Eagerly Calculate an Initial Translation Download Size
This bug adds:
* When `TranslateExpectedAction` occurs, then calculate the expected
translations model download size.

More background: `TranslateExpectedAction` indicates we have a default
`from` (page language) and a default `to` (user preferred) language
to initialize the translations dialog with expected values.

This queries how large of a download the translation
pair will be eagerly, so we have an initial value for the default recommendation.
2024-03-04 19:08:20 +00:00
Cathy Lu
9afba947ac Bug 1876820 - Add translation fetch downloaded languages action 2024-03-02 00:21:10 +00:00
ohall-m
67ecb461de Bug 1882403 - Refactor Browser Store Initialization for Translations
This bugs shifts around the initialization for the global store in translations.

Revised Flow:

* `InitAction` -> `InitTranslationsBrowserState`
* `InitTranslationsBrowserState`:
  * Checks the engine support, if everything is in order, then finishes initialization on `initializeBrowserStore`.
2024-02-29 22:23:15 +00:00
ohall-m
ca42258363 Bug 1882405 - Page Settings Data Structure Should be Val
* A subtle bug was introduced when page settings were moved from `val` to
`var` for updating page settings.
* Everything works as expected with the reducer updating etc., however
changes on page settings are not observed in compose.
2024-02-29 03:30:23 +00:00