Commit Graph

131 Commits

Author SHA1 Message Date
Greg Tatum
ece1dc3d6e Bug 1847574 - Do not de-lazify the panel when always hiding the error; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D185584
2023-08-08 16:25:44 +00:00
Greg Tatum
69f0758516 Bug 1847574 - Do not de-lazify the panel when modifying the translations button; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D185583
2023-08-08 16:25:44 +00:00
Greg Tatum
919008e0dd Bug 1847574 - Do not update the view if the popup isn't open; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D185582
2023-08-08 16:25:43 +00:00
Erik Nordin
a4709719ca Bug 1845611 - Fix Translations panel error view during auto translate r=gregtatum
Fixes a defect where the error view was not showing
properly when navigating to a website that triggers
auto-translate failure after previously viewing the panel
on a web page with an unsupported language.

Depends on D185485

Differential Revision: https://phabricator.services.mozilla.com/D185499
2023-08-07 17:09:54 +00:00
Erik Nordin
f14e8173c3 Bug 1845611 - Fix Translations panel revisit view during auto translate r=gregtatum
Fixes a defect where the revisit view was not showing
properly when navigating to a website that triggers
auto-translate after previously viewing the panel
on a web page with an unsupported language.

Depends on D185484

Differential Revision: https://phabricator.services.mozilla.com/D185485
2023-08-07 17:09:54 +00:00
Erik Nordin
89e56ffd7b Bug 1845611 - Fix translations settings menu checkbox states r=gregtatum
Fixes an error where translations settings menu checkbox
states were not being updated correctly for pages
whose language is not supported by translations.

They were previously being disabled as intended,
but not unchecked.

Depends on D185483

Differential Revision: https://phabricator.services.mozilla.com/D185484
2023-08-07 17:09:53 +00:00
Erik Nordin
c5be667979 Bug 1845611 - Refactor translations panel settings assertions r=gregtatum
Refactors the assertions for the always/never translate checkbox
menuitems in the translations panel settings menu.

The checks now verify the displayed language name as well as the
disabled state across all relevant translations tests.

Differential Revision: https://phabricator.services.mozilla.com/D185483
2023-08-07 17:09:53 +00:00
Erik Nordin
0e0b7f1685 Bug 1847339 - Fix intermittent Translations test failure r=gregtatum
Fixes an intermittent  test failure that was sometimes
ocurring due to an async function that was accidentally
not awaited in the test.

Differential Revision: https://phabricator.services.mozilla.com/D185501
2023-08-07 16:34:36 +00:00
Erik Nordin
5614f229e3 Bug 1847408 - Remove vestigial beta-language test artifacts from Translations r=gregtatum
There is a bit of dead test code left over from when
languages were labled individually as "beta" in Translations.
This patch removes any such code.

Differential Revision: https://phabricator.services.mozilla.com/D185506
2023-08-07 16:33:53 +00:00
Erik Nordin
a3e488c1d3 Bug 1847150 - Add more TranslationsTelemetry event keys for translation_request r=gregtatum
Adds a few more event keys to the translation_request event,
such as the top preferred language, and the detected document
language tag.

Differential Revision: https://phabricator.services.mozilla.com/D185387
2023-08-04 20:13:17 +00:00
Erik Nordin
4a82af37b5 Bug 1847150 - Add more TranslationsTelemetry event keys for panel open r=gregtatum
Adds a few more event keys to the panel open event, such as the
detected document language tag, and whether the panel was opened
automatically or manually.

Differential Revision: https://phabricator.services.mozilla.com/D185386
2023-08-04 20:13:17 +00:00
Greg Tatum
3a6dec9972 Bug 1846828 - Guard against multiple popups opening and being racy; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D185211
2023-08-04 15:17:01 +00:00
Greg Tatum
ef8de964a5 Bug 1846828 - Drive by fix an issue with the console not being ready; r=nordzilla
This is being triggered by a later patch that is adding new logging. I
believe this is all just because of initialization order.

Differential Revision: https://phabricator.services.mozilla.com/D185210
2023-08-04 15:17:01 +00:00
Iulian Moraru
852473cb6c Backed out 4 changesets (bug 1846828) for causing bc failures on browser_fullscreen-bug-1798219.js related to TranslationsParent.sys.mjs. CLOSED TREE
Backed out changeset 7c3b8868096b (bug 1846828)
Backed out changeset a0cd72ec2666 (bug 1846828)
Backed out changeset 42eade304753 (bug 1846828)
Backed out changeset d909d4b4de02 (bug 1846828)
2023-08-03 18:46:16 +03:00
Greg Tatum
cd80137461 Bug 1846828 - Guard against multiple popups opening and being racy; r=nordzilla
Depends on D185210

Differential Revision: https://phabricator.services.mozilla.com/D185211
2023-08-03 13:25:27 +00:00
Greg Tatum
bea35b1c53 Bug 1846828 - Drive by fix an issue with the console not being ready; r=nordzilla
This is being triggered by a later patch that is adding new logging. I
believe this is all just because of initialization order.

Differential Revision: https://phabricator.services.mozilla.com/D185210
2023-08-03 13:25:27 +00:00
Greg Tatum
0cab40e3a5 Bug 1836204 - Fix memory leak with the ViewShown listener; r=nordzilla CLOSED TREE
This was racing with the popup being shown and the browser window being
closed. If it lost this race, then it would cause a leak.

Depends on D182926

Differential Revision: https://phabricator.services.mozilla.com/D184516
2023-07-25 22:09:31 +00:00
Cristian Tuns
7bd7d19efd Bug 1836204 - Fix prettier lint failures. r=fix CLOSED TREE 2023-08-01 09:45:35 -04:00
Sebastian Hengst
95750f8fcb Backed out 2 changesets (bug 1836204) for causing frequent marionette / bidi failures. CLOSED TREE
Backed out changeset 1316e023af44 (bug 1836204)
Backed out changeset 0ab331879e6d (bug 1836204)
2023-08-01 15:19:13 +02:00
Erik Nordin
a25cf7ce6c Bug 1845428 - Add tests for new TranslationsTelemetry events r=gregtatum
Adds tests that utilize and check all of the telemetry
events that are added in this patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D184706
2023-07-29 04:43:46 +00:00
Erik Nordin
6800c11b73 Bug 1845428 - Alphabetize getters in translationsPanel r=gregtatum
Drive-by cleanup of code in translationsPanel.js

Differential Revision: https://phabricator.services.mozilla.com/D184704
2023-07-29 04:43:46 +00:00
Erik Nordin
c375d49e36 Bug 1845428 - Handle TranslationsTelemetry learn-more events r=gregtatum
Handles telemetry events that lead to the about/learn-more
page within the Translations panel and the settings menu.

Differential Revision: https://phabricator.services.mozilla.com/D184703
2023-07-29 04:43:45 +00:00
Erik Nordin
73cb617f67 Bug 1845428 - Handle TranslationsTelemetry settings events r=gregtatum
Handles telemetry events for managing the language-
and site-based settings options from the settings
menu invoked from the Translations panel.

Differential Revision: https://phabricator.services.mozilla.com/D184702
2023-07-29 04:43:45 +00:00
Erik Nordin
560423efab Bug 1845428 - Handle TranslationsTelemetry change-language events r=gregtatum
Handles telemetry events for chaning languages within
the Translations panel.

Differential Revision: https://phabricator.services.mozilla.com/D184701
2023-07-29 04:43:45 +00:00
Erik Nordin
34c3c09b88 Bug 1845428 - Handle TranslationsTelemetry panel settings popup events r=gregtatum
Handles telemetry events that deal with popupshown and
popuphidden for the translations settings menu invoked
from the Translations panel.

Differential Revision: https://phabricator.services.mozilla.com/D184700
2023-07-29 04:43:44 +00:00
Erik Nordin
e451470cc9 Bug 1845428 - Handle TranslationsTelemetry panel popup events r=gregtatum
Handles telemetry events that deal with popupshown
and popuphidden in the Translations panel.

Differential Revision: https://phabricator.services.mozilla.com/D184699
2023-07-29 04:43:44 +00:00
Erik Nordin
f6ca8590b7 Bug 1845428 - Handle TranslationsTelemetry panel button events r=gregtatum
Adds telemetry events for the button interactions
within in the Translations panel.

Differential Revision: https://phabricator.services.mozilla.com/D184698
2023-07-29 04:43:43 +00:00
Erik Nordin
3f788db59b Bug 1845428 - Maintain flow through error states in Translations r=gregtatum
Modifies existing telemetry events to maintain the
same flow throughout different error states that may
occur in the translations panel.

Differential Revision: https://phabricator.services.mozilla.com/D184696
2023-07-29 04:43:43 +00:00
Erik Nordin
62223598d3 Bug 1845428 - Add firstUserInteraction to TranslationsTelemetry events r=gregtatum
Adds the notion of an event being a first-interaction
or not, to better distinguish how users interact with
the translations panel the first time they see it.

Differential Revision: https://phabricator.services.mozilla.com/D184695
2023-07-29 04:43:43 +00:00
Butkovits Atila
cea2025687 Backed out 6 changesets (bug 1832348) for causing mochitest failures with leaks. CLOSED TREE
Backed out changeset 50f0546e5e0e (bug 1832348)
Backed out changeset 294d38c19889 (bug 1832348)
Backed out changeset 9cc22e70d293 (bug 1832348)
Backed out changeset fdcd11e66071 (bug 1832348)
Backed out changeset a357b1c75148 (bug 1832348)
Backed out changeset fcc56c5fd7e4 (bug 1832348)
2023-07-26 20:41:26 +03:00
Greg Tatum
6ebae6de91 Bug 1842643 - Hide the "from" language on re-translations; r=nordzilla
Note that margin-block-start is now done by JS, since the :first-child
pseudo-class does not work with hidden nodes.

Differential Revision: https://phabricator.services.mozilla.com/D184417
2023-07-26 15:56:57 +00:00
ganna
b573600b39 Bug 1832348 - Part 2: Replace .panel-footer with moz-button-group in translationsPanel r=hjones,dao
Differential Revision: https://phabricator.services.mozilla.com/D181297
2023-07-26 15:47:40 +00:00
Greg Tatum
fbf0fe6ac2 Bug 1845339 - Use install/remove rather than download/delete for translations settings; r=nordzilla,fluent-reviewers,settings-reviewers,flod,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D184491
2023-07-26 14:59:30 +00:00
Greg Tatum
cbf78200e1 Bug 1836204 - Fix memory leak with the ViewShown listener; r=nordzilla
This was racing with the popup being shown and the browser window being
closed. If it lost this race, then it would cause a leak.

Depends on D182926

Differential Revision: https://phabricator.services.mozilla.com/D184516
2023-07-25 22:09:31 +00:00
Greg Tatum
748a2e83d9 Bug 1831341 - Add the learn more link to the unsupported languages; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D183030
2023-07-25 15:23:31 +00:00
Greg Tatum
64e8c7d858 Bug 1831341 - Add the learn more link to the translations gear menu; r=nordzilla,fluent-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D183029
2023-07-25 15:23:31 +00:00
Greg Tatum
47fdb82c12 Bug 1842091 - Add a beta icon and first run message; r=nordzilla,fluent-reviewers,desktop-theme-reviewers,sfoster'
Differential Revision: https://phabricator.services.mozilla.com/D183028
2023-07-25 15:23:31 +00:00
Stanca Serban
bfcc5c35c3 Backed out 3 changesets (bug 1842091, bug 1831341) for causing mochitests failures in browser_parsable_css.js. CLOSED TREE
Backed out changeset 985bdabdd626 (bug 1831341)
Backed out changeset dfb82e14371f (bug 1831341)
Backed out changeset e739e22a9f1d (bug 1842091)
2023-07-25 00:31:40 +03:00
Greg Tatum
9fe0d1910b Bug 1831341 - Add the learn more link to the unsupported languages; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D183030
2023-07-24 18:59:49 +00:00
Greg Tatum
ab20d7e9fe Bug 1831341 - Add the learn more link to the translations gear menu; r=nordzilla,fluent-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D183029
2023-07-24 18:59:49 +00:00
Greg Tatum
3aa7701c21 Bug 1842091 - Add a beta icon and first run message; r=nordzilla,fluent-reviewers,desktop-theme-reviewers,sfoster'
Differential Revision: https://phabricator.services.mozilla.com/D183028
2023-07-24 18:59:49 +00:00
Erik Nordin
83bc743b10 Bug 1844678 - Remove beta language labels from Translations r=gregtatum,fluent-reviewers,flod
Removes the labeling of individual languages as being
in beta or not, from the UI components of translations.

Differential Revision: https://phabricator.services.mozilla.com/D184177
2023-07-24 18:08:19 +00:00
Erik Nordin
2426444a7b Bug 1841366 - Test flowId in Translations telemetry r=gregtatum
Adds test infrastructure and test cases to assert that the flowId
is being tracked correctly in Translations telemetry events.

Depends on D183045

Differential Revision: https://phabricator.services.mozilla.com/D182613
2023-07-19 20:41:10 +00:00
Erik Nordin
af6ae2bced Bug 1841366 - Unify TranslationsTelemetry in toolkit r=gregtatum
Unifies the TranslationsTelemetry implementations into a single file
using only one metrics.yaml file as well

Depends on D182610

Differential Revision: https://phabricator.services.mozilla.com/D183044
2023-07-19 20:41:09 +00:00
Erik Nordin
df0628b564 Bug 1841366 - Rename TestTranslationsTelemetry variables r=gregtatum
Renames some variables in the translations telemetry tests
to make the code more readable.

Differential Revision: https://phabricator.services.mozilla.com/D182610
2023-07-19 20:41:09 +00:00
Greg Tatum
eed43e15fc Bug 1841341 - Only show one translation popup offering when restoring windows; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D182602
2023-07-06 18:43:18 +00:00
Stanca Serban
0931d8ff0d Backed out changeset 0f0668b2eeb5 (bug 1841341) for window related leaks. 2023-07-06 01:25:09 +03:00
Greg Tatum
91a1272084 Bug 1841341 - Only show one translation popup offering when restoring windows; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D182602
2023-07-05 18:45:46 +00:00
Greg Tatum
cc4360393e Bug 1840905 - Do not look up the Translations actor during a LanguageState event; r=nordzilla
In a later patch this is a cause of a runtime error.

Differential Revision: https://phabricator.services.mozilla.com/D182593
2023-07-05 18:09:13 +00:00
Greg Tatum
7fab913ae4 Bug 1840904 - Remove language management operations from the TranslationsChild; r=nordzilla,settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D182393
2023-07-05 18:09:13 +00:00