SelectTranslationsPanel does not report the to-language-changed event to telemetry if both languages are changed prior to retranslation
Categories
(Firefox :: Translations, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox127 | --- | unaffected |
firefox128 | --- | verified |
firefox129 | --- | verified |
People
(Reporter: nordzilla, Assigned: nordzilla)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
Description
There is an edge case in the Select Translations Panel in which, using keyboard navigation, the user can change both the from-language and the to-language before triggering re-translation.
When this happens, currently, only the from-language change is reported to telemetry. We should fix this so that both language-change events are reported to telemetry.
Steps to reproduce
Note: This is only reproducible using keyboard navigation on Windows and Linux, because those two operating systems allow you to change the from-language and to-language directly with the keyboard without opening the dropdown menu list. When the language is changed directly, the panel waits for the
Enter
key to be pressed, or for the<textarea>
element to receive focus before translating. However on macOS, the keyboard navigation events always opens the menu-list dropdown, in which case selecting a new language will trigger a translation when the dropdown closes.
- Ensure that the
toolkit.telemetry.translations.logLevel
pref is set toDebug
. - Open the Browser Console and filter the output on
onChange
. - Navigate to a translatable web page, e.g. https://es.wikipedia.org
- Select some text, right click, and open the Select Translations Panel by clicking the "Translate selection...." item.
- Press
Tab
until the focus is on the from-menu list. - Use the
Up
/Down
arrow keys to change the language directly (without triggering a translation yet). - Press
Tab
once to shift the focus to the to-menu list. - Use the
Up
/Down
arrow keys to change the language directly (without triggering a translation yet). - Trigger a translation by pressing
Enter
or continuing to useTab
to shift the focus to the textarea.
Expected Behavior
- Both the
onChangeFromLanguage
andonChangeToLanguage
events should be logged to the browser console.
Actual Behavior
- Only the
onChangeFromLanguage
event is logged to the browser console.
Tests to implement
- Implement more thorough tests that change the from-language and to-language menus in all possible ways, both independently and together, to ensure that only the relevant telemetry events are fired in all cases.
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Comment 1•3 months ago
|
||
Fixes an edge case in the SelectTranslationsPanel where,
on Windows and Linux, if both the from-language and to-language
are changed via keyboard before triggering re-translation, then
only the change-from-language event is logged to telemetry.
Updated•3 months ago
|
Comment 2•3 months ago
|
||
Set release status flags based on info from the regressing bug 1903391
Assignee | ||
Comment 4•3 months ago
|
||
Fixes an edge case in the SelectTranslationsPanel where,
on Windows and Linux, if both the from-language and to-language
are changed via keyboard before triggering re-translation, then
only the change-from-language event is logged to telemetry.
Original Revision: https://phabricator.services.mozilla.com/D214419
Updated•3 months ago
|
Comment 5•3 months ago
|
||
beta Uplift Approval Request
- User impact if declined: The SelectTranslationsPanel
onChangeToLanguage
event will //not// be recorded in the edge-case event on Linux/Windows where the user changes both the from-language and to-language values via keyboard before triggering retranslation. - Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: STR in bug description.
- Risk associated with taking this patch: Very low
- Explanation of risk level: This is a one-line code change that only affects telemetry, and is quite thoroughly tested in automation.
- String changes made/needed: None
- Is Android affected?: no
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Comment 7•3 months ago
|
||
bugherder |
Updated•3 months ago
|
Comment 8•3 months ago
|
||
Verified on Firefox 128.0b7 and on Firefox 129.0a1 using Windows 10, Ubuntu 22 and macOS 12, both the onChangeFromLanguage and onChangeToLanguage events were logged to the browser console.
Updated•3 months ago
|
Description
•