Make Translations UI States Reactive to Changes in Feature Enabledness
Categories
(Firefox :: Translations, task, P1)
Tracking
()
People
(Reporter: nordzilla, Assigned: nordzilla)
References
(Blocks 1 open bug)
Details
Attachments
(20 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
Description
Prior to now, there was no official way in the UI to disable or enable the Translations feature. It was only available in about:config, which is not an officially user-facing API.
Now that we are going to support this, we need to ensure that we always react correctly to the feature becoming enabled or disabled.
This includes:
- Ensuring all open instances of the about:translations page react accordingly, either enabling or disabling.
- When the feature is disabled, we will need to hide the Translations button on any open tabs that have it present, and possibly ensure that restorePage is called when the tab becomes active again, if Translations was active on the page.
- When the feature is enabled, we need to ensure that already-open tabs may need to run through the translations-offer logic.
This work needs to be completed before the AI Killswitch release, but is not critical to unblock progress on the Settings UI.
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
This commit ensures that disabling the Translations feature will ensure
that the Translations Engine is destroyed. It also ensures that the engine
actor is fetched every time, rather than relying on the cached value, which
may no longer be valid when re-enabling the feature.
| Assignee | ||
Comment 2•2 months ago
|
||
This commit ensures that the about:translations page reacts to the Translations
feature becoming disabled and enabled. When disabled, the page content should
hide itself. When re-enabled, the page content should re-show and continue to
work as normal.
| Assignee | ||
Comment 3•2 months ago
|
||
This commit ensures that the Translate QuickAction is reactive to the
enabled state of the Translations feature, which may now become disabled
or re-enabled via the Settings UI.
| Assignee | ||
Comment 4•2 months ago
|
||
This commit ensures that the SelectTranslations context menu item is reactive
to the Translations feature becoming disabled or re-enabled, which may now
occur in the Firefox Settings.
| Assignee | ||
Comment 5•2 months ago
|
||
This commit ensures that the "Translate page..." Application Menu Item correctly
reacts to the Translations feature becoming enabled or disabled, which may now
occur from the main Settings UI.
Updated•2 months ago
|
| Assignee | ||
Comment 7•2 months ago
|
||
This commit reworks our cached state from being per top chrome window
to being truly per tab. Now that the feature can be disabled and enabled
at runtime with multiple tabs open, there is more than just the current
context that we may need to store in order to behave correctly if the
feature becomes re-enabled with multiple tabs still open.
| Assignee | ||
Comment 8•2 months ago
|
||
This commit ensures that the FullPage Translations functionality is able
to react to the Translations feature becoming enabled and disabled, including
managing the state of the Translations URL bar button across tabs, and handling
context from tabs that may have been disabled mid translation.
| Assignee | ||
Comment 9•2 months ago
|
||
This commit adds 3 new telemetry metrics so that we can tell how frequently
the Translatiosn feature is being enabled, disabled, or reset from the settings,
especially compared to how often the global AI switch is being flipped.
Comment 10•2 months ago
|
||
Comment 11•2 months ago
|
||
Comment 13•2 months ago
•
|
||
re: Failure log -> ui-test
Translate extension doesn't seem to be offered at all looking at the android videos in the matrix associated with the run
| Assignee | ||
Comment 14•2 months ago
|
||
This commit ensures that the test expectations on Android
reflect the new flow of the FullPage Translations language
state and detection logic.
Updated•2 months ago
|
| Assignee | ||
Comment 15•2 months ago
|
||
I believe that I've addressed all of the issues.
Try runs are looking green for the 3 failures mentioned in comment 12.
Queuing for relanding.
Comment 16•2 months ago
|
||
Comment 17•2 months ago
|
||
Comment 18•2 months ago
|
||
Backed out for causing bc failures on browser_preferences_usage.js
Backout link
Push with failures
Failure log(s)
| Assignee | ||
Comment 19•2 months ago
|
||
I requested that this be backed out (though it may have been regardless).
Opening new tabs is checking the Translations pref too many times.
I need to fix this before landing.
| Assignee | ||
Comment 20•2 months ago
|
||
This patch ensures that all access to the TranslationsParent
browsing context are guarded against the context being dead
at the time of access.
Updated•2 months ago
|
Comment 21•2 months ago
|
||
| Assignee | ||
Comment 22•2 months ago
|
||
Third time's a charm. Queuing it up!
Comment 23•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c601cd62ea35
https://hg.mozilla.org/mozilla-central/rev/2d2f194c1de6
https://hg.mozilla.org/mozilla-central/rev/ddab8d82789c
https://hg.mozilla.org/mozilla-central/rev/54a01d9519ba
https://hg.mozilla.org/mozilla-central/rev/a7239f47a85b
https://hg.mozilla.org/mozilla-central/rev/9bb5351f7299
https://hg.mozilla.org/mozilla-central/rev/35b7db4fbcac
https://hg.mozilla.org/mozilla-central/rev/94866222a000
https://hg.mozilla.org/mozilla-central/rev/faff99735317
https://hg.mozilla.org/mozilla-central/rev/b55ddd5197de
Comment 24•2 months ago
|
||
Verified as fixed in our latest Nightly 149.0a1 (2026-01-30).
| Assignee | ||
Comment 26•2 months ago
|
||
This commit ensures that disabling the Translations feature will ensure
that the Translations Engine is destroyed. It also ensures that the engine
actor is fetched every time, rather than relying on the cached value, which
may no longer be valid when re-enabling the feature.
Original Revision: https://phabricator.services.mozilla.com/D280367
Updated•2 months ago
|
| Assignee | ||
Comment 27•2 months ago
|
||
This commit ensures that the about:translations page reacts to the Translations
feature becoming disabled and enabled. When disabled, the page content should
hide itself. When re-enabled, the page content should re-show and continue to
work as normal.
Original Revision: https://phabricator.services.mozilla.com/D280368
Updated•2 months ago
|
| Assignee | ||
Comment 28•2 months ago
|
||
This commit ensures that the Translate QuickAction is reactive to the
enabled state of the Translations feature, which may now become disabled
or re-enabled via the Settings UI.
Original Revision: https://phabricator.services.mozilla.com/D280369
Updated•2 months ago
|
| Assignee | ||
Comment 29•2 months ago
|
||
This commit ensures that the SelectTranslations context menu item is reactive
to the Translations feature becoming disabled or re-enabled, which may now
occur in the Firefox Settings.
Original Revision: https://phabricator.services.mozilla.com/D280370
Updated•2 months ago
|
| Assignee | ||
Comment 30•2 months ago
|
||
This commit ensures that the "Translate page..." Application Menu Item correctly
reacts to the Translations feature becoming enabled or disabled, which may now
occur from the main Settings UI.
Original Revision: https://phabricator.services.mozilla.com/D280371
Updated•2 months ago
|
| Assignee | ||
Comment 31•2 months ago
|
||
This commit reworks our cached state from being per top chrome window
to being truly per tab. Now that the feature can be disabled and enabled
at runtime with multiple tabs open, there is more than just the current
context that we may need to store in order to behave correctly if the
feature becomes re-enabled with multiple tabs still open.
Original Revision: https://phabricator.services.mozilla.com/D280387
Updated•2 months ago
|
| Assignee | ||
Comment 32•2 months ago
|
||
This commit ensures that the FullPage Translations functionality is able
to react to the Translations feature becoming enabled and disabled, including
managing the state of the Translations URL bar button across tabs, and handling
context from tabs that may have been disabled mid translation.
Original Revision: https://phabricator.services.mozilla.com/D280388
Updated•2 months ago
|
| Assignee | ||
Comment 33•2 months ago
|
||
This commit adds 3 new telemetry metrics so that we can tell how frequently
the Translatiosn feature is being enabled, disabled, or reset from the settings,
especially compared to how often the global AI switch is being flipped.
Original Revision: https://phabricator.services.mozilla.com/D280542
Updated•2 months ago
|
| Assignee | ||
Comment 34•2 months ago
|
||
This commit ensures that the test expectations on Android
reflect the new flow of the FullPage Translations language
state and detection logic.
Original Revision: https://phabricator.services.mozilla.com/D280872
Updated•2 months ago
|
Comment 35•2 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: This patch stack is required in order for the Translations UI surfaces to be compatible with the AI Killswitch.
- Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: The QE representative for this project is aware of the steps and is already testing.
- Risk associated with taking this patch: medium
- Explanation of risk level: I'm marking this as medium risk because it affects the entire set of Translations features from the about:translations page, to selected-text translation, to full-page translation.
However, I've added 22 new automated test cases to CI, in addition to doing a lot of manual testing myself.
That being said, it's still risky to uplift these kinds of changes in functionality. I feel strongly that there are no major issues.
My biggest fear is regressing something on Android, which is not the target of this work, but shares infrastructure with this code.
However, I've asked for review and testing from Android developers, in addition to testing it myself. I will continue to test even more aggressively once these changes hit the Google Play Store.
I feel confident that anything minor that may come up can be fixed within the next 24 days to release.
- String changes made/needed: None
- Is Android affected?: yes
| Assignee | ||
Comment 36•2 months ago
|
||
This patch ensures that all access to the TranslationsParent
browsing context are guarded against the context being dead
at the time of access.
Original Revision: https://phabricator.services.mozilla.com/D281029
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Comment 37•2 months ago
|
||
| uplift | ||
Comment 38•2 months ago
|
||
This issue is Verified as fixed in our latest Beta 148.0b10 ID: 20260130190749
Disabling this feature from the AI controls page will remove this feature from the Following scenarios:
The URL button will disappear while translating a page or after the page is already translated.
The URL button will disappear from any tab where it was displayed even on multiple tabs or windows.
The Translate Quick Action is also hidden when we type "translate" in the URL bar (first we have to enabled it in Beta from browser.translations.quickAction.enabled - true)
The about:translations page is blank.
The "Translate Page..." option from the Hamburger menu is no longer displayed.
The "Translate selection to .." from the context menu is no longer displayed.
As far as Telemetry goes, Ive only found these 3 besides the ones that trigger when we actually use the feature:
translations.feature.disable
translations.feature.reset
aiControlTranslationsSelect
but I'm not sure which ones have been added with this patch.
| Assignee | ||
Comment 39•2 months ago
•
|
||
(In reply to Rares Doghi, Desktop QA from comment #38)
As far as Telemetry goes, Ive only found these 3 besides the ones that trigger when we actually use the feature:
translations.feature.disable
translations.feature.reset
aiControlTranslationsSelect
The new telemetry events added by this patch are the following:
translations.feature.resettranslations.feature.disabletranslations.feature.enable
Due to the way the settings are implemented for Translations, I don't think enable can ever be called in the current state of the code, since Translations only has "Available" and "Blocked" in its menu list.
aiControlTranslationSelect existed prior to this patch.
Description
•