Open Bug 1855787 Opened 1 year ago Updated 1 year ago

Make the "first time" translation panel persist until 1st translation is complete

Categories

(Firefox :: Translations, enhancement, P3)

Desktop
All
enhancement

Tracking

()

People

(Reporter: emilyw, Unassigned, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(2 files, 2 obsolete files)

Current state
Users see the "First time" version of the translation panel (with extra explanatory copy) just once. If they do nothing, the next time they encounter the translation panel they will see the "standard" version without the extra copy.

Enhancement
On the Android feature, we will be showing users the "First time/onboarding" view of the translation panel until they complete their first translation. The rationale is that it gives users more of a chance to view the value prop of translations. If they dismiss the panel initially without reading it, they will have another chance to see this later.

Once the user completes their first translation, we should then show the standard panel moving forward.

Version: Firefox 118 → unspecified
OS: Unspecified → All
Hardware: Unspecified → Desktop

This is gated on the "browser.translations.panelShown" pref.

The logic will need to be reworked to only change this pref after the first translation has been done:

https://searchfox.org/mozilla-central/rev/b0d28aecd58cbd2db00974db2ef8456856169fb4/browser/components/translations/content/translationsPanel.js#680-691

There is some additional logic to show it on the page you are on, which can be removed.

There is probably a test as well that needs updating. You can run our test suite locally by running:

./mach mochitest toolkit/components/translations/tests browser/components/translations/tests

Or you could run it headlessly to avoid all the browser flashing.

./mach mochitest toolkit/components/translations/tests browser/components/translations/tests --headless
Mentor: gtatum, enordin
Keywords: good-first-bug
Priority: -- → P3

Kindly assign me this task . I am an Outreachy applicant and I wish to solve it.

Hello, welcome! Feel free to start working on the bug, we're assigning the bugs once a patch is attached.

Assignee: nobody → mfvl.1186
Status: NEW → ASSIGNED

Depends on D190531

Hi marifer,

Thank you for your patches!

One thing we do a bit differently here at Mozilla, compared to a flow that you may be more used to on GitHub, for example, is that each "commit" should effectively be a self-contained, functional change of code.

For example, if you are fixing an eslint error, you wouldn't add on a new commit for just that. You would make the changes and amend them into your single commit, and then re-publish that commit, almost as though you were force-pushing to GitHub.

The nice thing about Phabricator is that it keeps track of the changes between each "version" of the commit.

So what you should do is go into your WIP patches on Phabricator, scroll all the way to the bottom, and add an action in the dropdown to abandon that revision.

Next, locally, you'll want to pop your WIP commits off of your WIP stack and amend them (or use fixup, etc.) to then have a single commit.

At that point, you would use moz-phab to update the single revision.

Let me know if you have any questions, and thank you!

Flags: needinfo?(mfvl.1186)
Attachment #9357544 - Attachment is obsolete: true
Attachment #9357546 - Attachment is obsolete: true

Hi Erik,

I wanted to drop you a quick note to say thanks for the explanation. It was super helpful and clarified a lot for me.

I have to admit, I was quite lost and got a bit tangled up in the process. In the end, it seemed like updating the changes after fixing the eslint error took me more time than all the steps from the initial setup to trying to squash that tricky bug. 😅

The good news is that everything looks updated on the revision now. If you could spare a moment to check it out when you have time, I'd really appreciate it. Your feedback is incredibly valuable to me.

Once again, thanks for your support and guidance.

Enjoy your evening/night!🌟

Flags: needinfo?(mfvl.1186)
Attachment #9357538 - Attachment description: Fixing Bug 1855787: Resolving issue with translations panel. Requesting review. r=nordzilla → Bug 1855787: Introduce browser.translations.firstTranslationRequested
Attachment #9357538 - Attachment description: Bug 1855787: Introduce browser.translations.firstTranslationRequested → Bug 1855787: Introduce pref and update code accordingly. r=nordzilla
Attachment #9357538 - Attachment description: Bug 1855787: Introduce pref and update code accordingly. r=nordzilla → Bug 1855787: Updated TranslationsPanel tests
Blocks: 1866823
Blocks: 1866827

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: u735471 → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: