Closed Bug 1911896 Opened 6 months ago Closed 6 months ago

Translations Panel menulists do not react to Remote Settings sync until browser restart

Categories

(Firefox :: Translations, defect)

defect

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- fixed
firefox129 --- fixed
firefox130 --- fixed
firefox131 --- fixed

People

(Reporter: nordzilla, Assigned: nordzilla)

References

(Regression)

Details

(Keywords: regression)

Attachments

(8 files)

Description

Note: I believe that this affects every Firefox version with the Translations feature enabled, however I reworked the panel cache logic in Bug 1870327 and still did not fix this issue. This is sufficiently far back that I feel fine considering this the regressor since we are unlikely to fix this issue in all but the most recent Firefox versions.

The Translations panels (both Select and Full Page) cache the initialized state of their dropdown menu lists the first time that they open. However, they do not appropriately react to the list of available languages changing, for example when publishing a new language model to Remote Settings, or when changing the Remote Settings channel from Prod to Dev, for example, which may have different language models available.

We should properly observe these events, and repopulate the panels' menu lists as necessary.


Steps to reproduce

  • Download the Remote Settings Devtools extension.
  • Open the FullPageTranslationsPanel or the SelectTranslationsPanel.
  • Switch the Remote Settings channel from Prod to Dev, clear and sync.
  • Reopen the panels and inspect the language lists.

Expected Behavior
The Dev channel has fewer language models released than the Prod channel, so the menulists should have fewer languages (only the ones that are available).

Actual Behavior
The menulists have the same languages that they had when Remote Settings was set to Prod, and some of the languages will not work, e.g. Vietnamese which is only in Prod, but not Dev at the time of writing.


Steps to implement

  • Ensure that the Translations panels caches are refreshed if the available language models change.

Tests to implement

  • Test pushing live changes to the Remote Settings test databases, ensuring that the panels react accordingly.

Renames the TranslationsPanelShared.clearCache function to
clearLanguageListsCache to be more specific about what it does.

Depends on D218679

Ensures that all FullPageTranslationsPanel and SelectTranslationsPanel
instances will repopulate their dropdown menulist elements if the
list of available languages changes, e.g. due to a Remote Settings sync.

Depends on D218680

Set release status flags based on info from the regressing bug 1870327

Attachment #9418017 - Attachment description: WIP: Bug 1911896 - Rename TranslationsPanelShared.clearCache r=#translations-reviewers! → Bug 1911896 - Rename TranslationsPanelShared.clearCache r=#translations-reviewers!
Attachment #9418018 - Attachment description: WIP: Bug 1911896 - Repopulate menulists when available lanaguges change r=#translations-reviewers! → Bug 1911896 - Repopulate menulists when available lanaguges change r=#translations-reviewers!

Note: Release Managers

This patch stack consists of 3 core correctness fixes for Translations:

Once landed, I intend to request uplift for this stack into the following channels:

These changes are all fully tested in automation.

I believe these changes match the criteria for ESR uplift, and given that that is the version prior to the current release, it would be nice to have these fixes in all consecutive Firefox versions after that as well.

:nordzilla the planned 129 dot release builds on Monday 2024-08-19. The uplift deadline is the Friday before.
If you wanted to land this and add uplift requests before then? Otherwise it won't make the 129 dot release

Flags: needinfo?(enordin)

Hey Donal, I appreciate the ping.

I wrote the above comment while I was still implementing these fixes, but ran into some unexpected test failures in CI.

I'm happy to say I finally believe I've resolved everything, and I just queued this stack for landing about an hour ago.

I'll be sure to request uplifts before Friday.

Flags: needinfo?(enordin)
Pushed by enordin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e37caaa52b4 Rename TranslationsPanelShared.clearCache r=translations-reviewers,gregtatum https://hg.mozilla.org/integration/autoland/rev/0b70fbf8b4d9 Repopulate menulists when available lanaguges change r=translations-reviewers,gregtatum
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch

The patch landed in nightly and beta is affected.
:nordzilla, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox130 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(enordin)

Renames the TranslationsPanelShared.clearCache function to
clearLanguageListsCache to be more specific about what it does.

Original Revision: https://phabricator.services.mozilla.com/D218680

Attachment #9419122 - Flags: approval-mozilla-beta?

Ensures that all FullPageTranslationsPanel and SelectTranslationsPanel
instances will repopulate their dropdown menulist elements if the
list of available languages changes, e.g. due to a Remote Settings sync.

Original Revision: https://phabricator.services.mozilla.com/D218681

Attachment #9419123 - Flags: approval-mozilla-beta?

Renames the TranslationsPanelShared.clearCache function to
clearLanguageListsCache to be more specific about what it does.

Original Revision: https://phabricator.services.mozilla.com/D218680

Attachment #9419133 - Flags: approval-mozilla-release?

Ensures that all FullPageTranslationsPanel and SelectTranslationsPanel
instances will repopulate their dropdown menulist elements if the
list of available languages changes, e.g. due to a Remote Settings sync.

Original Revision: https://phabricator.services.mozilla.com/D218681

Attachment #9419134 - Flags: approval-mozilla-release?
Attachment #9419123 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9419122 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9419133 - Attachment description: Bug 1911896 - Rename TranslationsPanelShared.clearCache → WIP: Bug 1911896 - Rename TranslationsPanelShared.clearCache
Attachment #9419134 - Attachment description: Bug 1911896 - Repopulate menulists when available lanaguges change → WIP: Bug 1911896 - Repopulate menulists when available lanaguges change
Attachment #9419133 - Attachment description: WIP: Bug 1911896 - Rename TranslationsPanelShared.clearCache → Bug 1911896 - Rename TranslationsPanelShared.clearCache
Attachment #9419134 - Attachment description: WIP: Bug 1911896 - Repopulate menulists when available lanaguges change → Bug 1911896 - Repopulate menulists when available lanaguges change

Renames the TranslationsPanelShared.clearCache function to
clearLanguageListsCache to be more specific about what it does.

Original Revision: https://phabricator.services.mozilla.com/D218680

Attachment #9419307 - Flags: approval-mozilla-esr128?

Ensures that all FullPageTranslationsPanel and SelectTranslationsPanel
instances will repopulate their dropdown menulist elements if the
list of available languages changes, e.g. due to a Remote Settings sync.

Original Revision: https://phabricator.services.mozilla.com/D218681

Attachment #9419309 - Flags: approval-mozilla-esr128?
Attachment #9419134 - Flags: approval-mozilla-release? → approval-mozilla-release+
Attachment #9419133 - Flags: approval-mozilla-release? → approval-mozilla-release+
Attachment #9419309 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
Attachment #9419307 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
Flags: needinfo?(enordin)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: