Closed Bug 1892541 Opened 5 months ago Closed 5 months ago

Fix FullPageTranslationsPanel init-failure messaging

Categories

(Firefox :: Translations, defect, P3)

defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox125 --- wontfix
firefox126 --- fixed
firefox127 --- fixed

People

(Reporter: nordzilla, Assigned: nordzilla)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Description

In Bug 1889697 I landed a fix for the Translations Panel not initializing correctly when opened in multiple Firefox windows back-to-back.

Unfortunately, that fix introduced a new regression that I just discovered, that causes the FullPageTranslationsPanel to not display its error message if the language-list dropdowns fail to load when the panel opens. It looks like we didn't have test coverage for that specific error case (only for the failure-to-translate error message).

Fortunately, this error is extremely rare, since the RemoteSettings JSON files are packaged and shipped with the language lists. Someone would have to both have no Ineternet connection and corrupted RemoteSettings JSON to see this error message.


Steps to implement

  • Fix the issue that cases the error message to not display.
  • Add test coverage for this case.

Tests to implement

  • Add a new test case that forces the language initialization to fail.

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

Fixes an issue in which the FullPageTranslationsPanel
was not displaying the proper error message if the
language lists failed to initialize on panel open.

Depends on D207949

Attachment #9397690 - Attachment description: WIP: Bug 1892541 - Fix FullPageTranslationsPanel init failure → Bug 1892541 - Fix FullPageTranslationsPanel init failure r=#translations-reviewers!
Pushed by enordin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/152598dd4160 Fix FullPageTranslationsPanel init failure r=translations-reviewers,gregtatum
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 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-firefox126 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(enordin)

While I think this particular edge case is rare enough to not uplift, I am going to uplift it because I found yet another regression that occurs only when you drag an open tab to become its own new window after opening the FullPageTranslationsPanel. This code is extremely finicky when considering multi-window Firefox usage.

I have yet to file the bug for the other regression that I found, but its changes will sit on top of this fix, which is why I will be uplifting this one also.

Leaving my NI open for now, to remind myself to submit the uplift request in Phabricator today.

Fixes an issue in which the FullPageTranslationsPanel
was not displaying the proper error message if the
language lists failed to initialize on panel open.

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

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

beta Uplift Approval Request

  • User impact if declined: Users will not see a failure message if the FullPageTranslationsPanel fails to initialize. They will instead see unpopulated menulist dropdowns.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: Flip the pref browser.translations.chaos to true. Repeatedly open a new window and then the FullPageTranslationsPanel until you get a random language-initialization error. Verify that the message is there.
  • Risk associated with taking this patch: Very low
  • Explanation of risk level: This code only affects the initialization of the FullPageTranslationsPanel dropdown lists, and it has full test coverage.
  • String changes made/needed: None
  • Is Android affected?: no
Flags: needinfo?(enordin)
Attachment #9398536 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: