Consider adjusting behavior for "Offer to Translate"
Categories
(Firefox :: Translations, enhancement)
Tracking
()
People
(Reporter: olivia, Unassigned)
References
Details
Attachments
(1 file)
When changing the "offer to translate" setting, the offer or pop-up will not occur in that session, since the opportunity to offer has already passed on that host. This is to consider adjusting the behavior to reset the "offer" conditions when they change. Bug 1885340 has more specific instructions on how to cause this behavior.
This is a joint Android and Desktop bug identified in QA as bug 1885340, but resolved as WORKSFORME since Android and Desktop had parallel behavior, because it is probably originating from the toolkit logic.
Comment 1•2 years ago
•
|
||
Hey Olivia!
Thanks for reporting this. It's an easy change to make, and I think the behavior makes sense.
It would just have to call resetHostsOffered() when that setting is toggled back on.
I've pushed up a WIP patch with the changes (for Desktop), but no test yet.
I will add a test and finish the patch if everyone agrees this is desirable behavior.
Comment 2•2 years ago
|
||
Resets the set of offered hosts when the user explicitly
re-enables the "Always offer to translate" setting, because,
presumably, they would like to see the panel offered again.
Updated•2 years ago
|
| Reporter | ||
Comment 3•2 years ago
|
||
Thanks for taking a look!
Comment 4•2 years ago
|
||
Actually I think the bug is that we add the hosts too soon in the maybeOfferTranslations function.
Basically:
TranslationsParent.#hostsOffered.add(host);
Should be right before:
browser.dispatchEvent(
new CustomEvent("TranslationsParent:OfferTranslation", {
bubbles: true,
})
);
Comment 5•2 years ago
|
||
Thank you so much Eric for tagging me in this. Olivia and I chatted about this being a nice behavior to tweak for Mobile and Desktop. Let me know if y'all need any other UX POV.
Comment 6•2 years ago
|
||
I followed the STR listed here with the fix described in comment 4 but I don't think it fixes the behavior.
At least on Desktop, I think we would still have to reset the hosts when always-offer is toggled on.
Description
•