Convert the Preferences tabs to Fluent
Categories
(Thunderbird :: Preferences, enhancement, P1)
Tracking
(thunderbird78 fixed)
Tracking | Status | |
---|---|---|
thunderbird78 | --- | fixed |
People
(Reporter: aleca, Assigned: aleca)
References
(Blocks 1 open bug)
Details
(Keywords: leave-open, ux-efficiency, Whiteboard: [tb-fluent])
Attachments
(3 files, 28 obsolete files)
200.39 KB,
patch
|
mkmelin
:
review+
Paenglab
:
ui-review+
flod
:
feedback+
|
Details | Diff | Splinter Review |
86.61 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
182.04 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
In order to implement the Preferences Search, and clean up a lot our current file structure, we should follow the current implementation of Firefox, which uses a standard html
window for the main file, and html:template
elements for the various screens instead of the preftab
we're currently using.
Alongside, I'm gonna move the strings left behind in the preferences.properties
file to the newly generated preferences.ftl
in order to kick-start the Fluent transition of the Preferences panel.
For reference
FF Preferences: https://searchfox.org/mozilla-central/rev/a4be2fbe9bd4f405c91cc16e4e3a80400f5a9301/browser/components/preferences/in-content/preferences.xhtml
FF main template (our general preftab): https://searchfox.org/mozilla-central/rev/a4be2fbe9bd4f405c91cc16e4e3a80400f5a9301/browser/components/preferences/in-content/main.inc.xhtml
Assignee | ||
Comment 1•5 years ago
|
||
This is the first of many patches necessary to migrate all the preferences strings to their fluent counterpart.
I'm trying to keep these short and easy to review since we have a lot of strings in the preferences tab, spread across multiple properties
and dtd
files.
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #2)
You don't add the changes directly to the en-US ftl file to make the patch working without running the python script?
Ah, damn, I forgot to qrefresh
those edits.
Thanks for the heads up.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
I'm removing the review request from this as I will include also the preferences.properties
inside this first patch.
For now, I'm requesting a feedback to confirm that what I'm doing is good.
I update the preferences-title
to use the PLATFORM()
variable, and removed the GNOME variation which was using the brand name alongside the Preferences title. Any reason why we had that?
If we need to keep that, I will use the same approach I found on m-c, as it seems that it's not possible to use the PLATFORM()
variable as a Fluent VARIABLE_REFERENCE
.
https://firefox-source-docs.mozilla.org/l10n/migrations/legacy.html#explicit-variants
m-c solved that problem in this way: https://searchfox.org/mozilla-central/rev/f36cb2af46edd2659f446b7acdb2154e230ee445/python/l10n/fluent_migrations/bug_1613801_window_title_mac.py#26
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
Assignee | ||
Comment 8•5 years ago
|
||
Thanks both for the feedback.
- The tab title is empty because of a typo.
Fixed, thanks.
- Also the categories have no text. In the DevTools I see:
label=""
. I tried different things with no luck. Maybe this needs first a conversion from <prefpane> to <richlistitem> like FX has.
That doesn't work because we're generating those nav elements in JS and trying to fetch the label from the pref panel, which for fluent results in a weird mix between sync and async string loading.
I will convert the menu to use statically written richlistbox
like m-c.
Assignee | ||
Comment 9•5 years ago
|
||
I tried to keep the changes as small as possible in order to not make this patch grow too much.
This is only the first part of many many more that needs to happen.
In this patch I'm only tackling:
- Fluent migration for the Preferences tab container (no internal panes have been changed).
- Convert the radiogroup to richlistbox.
Assignee | ||
Comment 10•5 years ago
|
||
Missed the fluent migration file, sorry.
Also, a known issue is that the preferences panel seems to not remember the last opened, even if the method works and it's actually stored.
Any suggestion?
Comment 11•5 years ago
|
||
Assignee | ||
Comment 12•5 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #11)
Looks good. The category labels are too small...
Mh, I removed any font size variation to inherit what's coming from Firefox, which looks good.
Something is interfering with the overriding style.
Assignee | ||
Comment 13•5 years ago
|
||
Patch unbitrotted and updated.
The font size have been fixed and now the panel remembers the last viewed location.
I refactored a little bit more the JS part to follow closely what m-c did and in order to properly prepare the files for the Search field implementation.
The most substantial change was the removal of the event dispatching to initialize the various panels.
Magnus, would you be able to give it a review? Even if it doesn't land due to the fluent migration part, I'd like to have an approved base before continuing converting the other parts.
Richard, I update the CSS and removed the radio
related styling. Can you be sure I haven't caused any UI regression with the richlistitem implementation?
Cheers
Comment 14•5 years ago
|
||
Assignee | ||
Comment 15•5 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #14)
Looks almost ready.
The categories text is too big. You have to calculate that
https://searchfox.org/mozilla-central/source/toolkit/themes/shared/in-
content/common.inc.css#734 increases the size. At least on Windows it works
when you use for#categories
the same font-size as#MailPreferences prefpane
.
I updated everything, but I wonder why we're doing this.
It feels a bit weird to slightly tweak the font size of the container to bounce off the font size of the label.
If we really want to edit those sizes, shouldn't we update directly the .category-name font size?
::: mail/locales/en-US/chrome/messenger/preferences/preferences.dtd
Is this file still needed? Haven't you converted all strings to Fluent?
It's not used anymore, but I haven't removed it because it's necessary for the fluent migration recipe.
I don't know if by deleting that file the recipe might fail.
+#preferencesContainer richlistbox:focus > richlistitem[selected="true"] {
- background-color: Highlight;
- color: HighlightText !important;
Why have you removed the variables? With this, for example on plain Ubuntu
the item would be orange instead of the in-content blue.
Ah, that's a mistake, thanks for noticing.
Assignee | ||
Comment 16•5 years ago
|
||
Updated with the requested changes.
Assignee | ||
Comment 17•5 years ago
|
||
Itty bitty CSS fix.
Comment 18•5 years ago
|
||
Assignee | ||
Comment 19•5 years ago
|
||
Patch updated to handle the case when the Calendar is disabled and we don't want to show those prefs.
Also, I updated the condition when restoring the previous tab to fallback to the General pane in case that tab doesn't exist anymore.
Comment 20•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 21•5 years ago
|
||
I deleted the preferences.dtd
file as I'm translating all the strings and it wasn't used anywhere else.
Assignee | ||
Comment 22•5 years ago
|
||
Assignee | ||
Comment 23•5 years ago
|
||
Patch unbitrotted.
Comment 24•5 years ago
•
|
||
So this is what I get (with the c-c patch from bug 1621633)
./mach fluent-migration-test comm/python/l10n/tb_fluent_migrations/bug_1615501_preferences.py
0:00.36 hg pull -u
0:02.65 /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/_virtualenvs/init_py3/bin/python -m fluent.migrate.tool --lang en-US --reference-dir /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/reference --localization-dir /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/en-US --dry-run tb_fluent_migrations.bug_1615501_preferences
Running migration tb_fluent_migrations.bug_1615501_preferences for en-US
Writing to /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/en-US/mail/messenger/preferences/preferences.ftl
Committing changeset: Bug 1615501 - Fluent migration recipe for Preferences Tab.
Writing to /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/en-US/mail/messenger/preferences/preferences.ftl
Committing changeset: Bug 1615501 - Fluent migration recipe for Preferences Tab.
Writing to /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/en-US/mail/messenger/preferences/preferences.ftl
Committing changeset: Bug 1615501 - Fluent migration recipe for Preferences Tab.
0:02.97 /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/_virtualenvs/init_py3/bin/python -m fluent.migrate.tool --lang en-US --reference-dir /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/reference --localization-dir /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/en-US tb_fluent_migrations.bug_1615501_preferences
Running migration tb_fluent_migrations.bug_1615501_preferences for en-US
Writing to /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/en-US/mail/messenger/preferences/preferences.ftl
Committing changeset: Bug 1615501 - Fluent migration recipe for Preferences Tab.
Writing to /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/en-US/mail/messenger/preferences/preferences.ftl
Committing changeset: Bug 1615501 - Fluent migration recipe for Preferences Tab.
Writing to /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/en-US/mail/messenger/preferences/preferences.ftl
Committing changeset: Bug 1615501 - Fluent migration recipe for Preferences Tab.
--- /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/reference/mail/messenger/preferences/preferences.ftl
+++ /home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/python/l10n/bug_1615501_preferences/en-US/mail/messenger/preferences/preferences.ftl
@@ -14,17 +14,9 @@
category-general =
.tooltiptext = { pane-general-title }
pane-compose-title = Composition
-category-compose =
- .tooltiptext = { pane-compose-title }
pane-privacy-title = Privacy & Security
-category-privacy =
- .tooltiptext = { pane-privacy-title }
pane-chat-title = Chat
-category-chat =
- .tooltiptext = { pane-chat-title }
pane-calendar-title = Calendar
-category-calendar =
- .tooltiptext = { pane-calendar-title }
general-language-and-appearance-header = Language & Appearance
general-incoming-mail-header = Incoming Mails
general-files-and-attachment-header = Files & Attachments
0:03.58 Commit messages should have "part {index}" for comm/python/l10n/tb_fluent_migrations/bug_1615501_preferences.py
Assignee | ||
Comment 25•5 years ago
|
||
Updated and fixed.
Now the fluent migration test runs properly.
It seems we can't inherit strings in fluent from another ID when doing a migration, that's why those strings were getting removed.
Assignee | ||
Comment 26•5 years ago
|
||
Second part to load on top of the first patch.
This one takes care of the general.dtd
conversion.
Comment 27•5 years ago
|
||
Assignee | ||
Comment 28•5 years ago
|
||
Thanks for the r+.
I'm not gonna mark this for check-in until bug 1621633 lands.
I will keep uploading follow up parts for all the other preferences sections, and continue the conversion to html:template
Comment 29•5 years ago
|
||
Assignee | ||
Comment 30•5 years ago
|
||
Patch updated by removing all those extra general-
prefixes and by making the fluent IDs a bit more clear.
Assignee | ||
Comment 31•5 years ago
|
||
We currently have a lot of small DTD files for all those dialogs and separated sections we had in the previous iteration of the Preferences area.
Files like advanced.dtd
, security.dtd
, privacy.dtd
, etc, all now live inline the main 4 sections.
I will be removing those files and migrate those strings into the main FTL files of those parents sections, like General, Composition, etc.
Does that sound good?
Assignee | ||
Comment 33•5 years ago
|
||
PART3!
This converts all the strings from the advanced.dtd
file used in the General section.
I left behind a bunch of strings belonging to the Privacy section, and the updateApp.version.pre
updateApp.version.post
which need to be reworked in JS with a sync method.
Running ./mach fluent-migration-test
will mark all the current strings in the general.ftl
for removal, which is normal since those are migrated in part 2, so are alien entities for part 3.
Comment 34•5 years ago
•
|
||
Assignee | ||
Comment 35•5 years ago
|
||
nit fixed.
Assignee | ||
Comment 36•5 years ago
|
||
I merged all the previous patches together since we're affecting the same General
pane with many strings coming from different files.
Now it's straightfoward to run the fluent migration test.
I'm getting a warning where it suggests to remove the master-password-os-auth-dialog-message-win
string, but that's strange because I haven't touched that.
Is it suggesting that because we're not using that string anywhere?
Following up with other patches to handle each section separately without migration conflicts.
Comment 37•5 years ago
|
||
(In reply to Alessandro Castellani (:aleca) from comment #36)
I'm getting a warning where it suggests to remove the
master-password-os-auth-dialog-message-win
string, but that's strange because I haven't touched that.
Is it suggesting that because we're not using that string anywhere?
We're using it here: https://searchfox.org/comm-central/rev/edbbc461dc1489444ca7ab72fe5da32c826b28fe/mail/components/preferences/privacy.js#339 it's very newly introduced by bug 1637207.
Assignee | ||
Comment 38•5 years ago
|
||
I wonder why the fluent migration test flags it to be removed.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 39•5 years ago
|
||
This takes care of converting the Compose section of the preferences, and removes the compose.dtd
and advanced.dtd
files.
The migration test is flagging language-popup-label
to be removed, which I don't understand why.
Any suggestion?
Asking a UI review to Richard to be sure no strings are missing.
Assignee | ||
Comment 40•5 years ago
|
||
I found some missing labels while testing the first patch, and I also fixed the migration issue I was having.
Assignee | ||
Updated•5 years ago
|
Comment 41•5 years ago
|
||
Comment 42•5 years ago
|
||
Assignee | ||
Comment 43•5 years ago
|
||
This one takes care of the Privacy page.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 44•5 years ago
|
||
Assignee | ||
Comment 45•5 years ago
|
||
Awesome, thank you both for the reviews!
I have other 2 patches to complete the Fluent migration for all the DTD files.
Then another patch to handle all the properties and JS async related strings.
An one final to convert everything into html:template
I saw that Lasana will be in charge of the Fluent migrations. Do we have a timeline for when we might start landing these r+ patches and run the migration?
Assignee | ||
Comment 46•5 years ago
|
||
This one takes care of the Chat tab.
Comment 47•5 years ago
|
||
Comment 48•5 years ago
|
||
Comment 49•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 50•5 years ago
|
||
Patch updated to address Francesco's comments.
Thank you so much for looking at these.
I'm going through the other patches to apply the same edits.
Please, don't hesitate to highlight mistakes or issues you find.
Assignee | ||
Comment 51•5 years ago
|
||
Patch updated to address Francesco's comment, and fixed a tiny migration issue due to a missed uppercase letter.
Assignee | ||
Comment 52•5 years ago
|
||
Updated notes.
Assignee | ||
Comment 53•5 years ago
|
||
I'm having a problem with the calendar migration.
It seems that the migration is not able to handle files inside the calendar/
folder.
Am I doing something wrong, or there's maybe something missing from bug 1621633?
Comment 54•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 55•5 years ago
|
||
This patch takes care of the Calendar section and its subdialog.
The 6th and (hopefully) last patch will take care of all the subdialogs and JS strings.
Comment 56•5 years ago
|
||
Comment 57•5 years ago
|
||
Comment 58•5 years ago
|
||
Comment 59•5 years ago
|
||
Comment 60•5 years ago
|
||
Part 4 does no more apply (chat.inc.xhtml). I rebased it. Aleca, please check that still all is correct.
Comment 61•5 years ago
|
||
I'm giving up on using Splinter, it doesn't allow me to comment on part 5…
As explained elsewhere, you have IDs that are way too generic, one is title
See https://firefox-source-docs.mozilla.org/l10n/fluent/review.html
Migration has an hard-coded accesskey for timezone-label
Assignee | ||
Comment 62•5 years ago
|
||
Thank you Francesco for the detailed review and help, and thanks Richard for the rebase of P4.
I'll fix everything.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 63•5 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #58)
Looks good. The only difference I spotted was that the Categories "Remove" button is now "Delete".
Yes, I changed it on purpose as we have the same identical structure for the Tags section with the same 3 buttons, Add, Edit, Delete.
But for the Categories we were using Remove instead of Delete, and duplicating the other identical strings.
Assignee | ||
Comment 64•5 years ago
|
||
Patch updated and folded all the parts into one to run a single migration.
I can't fold PART 5 as that one tackles the Calendar which is in a separated folder and I'm not able to run a migration test as per comment 54
Assignee | ||
Comment 65•5 years ago
|
||
Calendar patch updated.
Comment 66•5 years ago
|
||
Assignee | ||
Comment 67•5 years ago
|
||
This patch takes care of almost all the subdialogs.
There are only 4 missing subdialogs, which I will tackle tomorrow as it's midnight and my brain is melting with all these strings.
I'll take care of the remaining properties as well.
Once that's done, I will fold this patch into the first one so we can deal everything with a single migration.
Assignee | ||
Comment 68•5 years ago
|
||
All the subdialogs have been converted.
I didn't convert all the properties
as a lot of those require much more time and changes to the JS.
Those strings are mostly marginal and and dynamically applied for specific scenarios, therefore are not directly relevant to the search.
I kept the patches separated to easily review them and test the migration.
Comment 69•5 years ago
|
||
Comment 70•5 years ago
•
|
||
Clearly I don't know how to make splinter review anymore, or it's really bugged.
I want to give an f+, but all I get is
You must provide a reviewer for review requests.
Because the reviewer flag remains set to ?
. And by setting the reviewer flag to empty, I removed the original one :-\
Updated•5 years ago
|
Comment 71•5 years ago
|
||
(In reply to Alessandro Castellani (:aleca) from comment #67)
Created attachment 9152925 [details] [diff] [review]
1615501-preferences-tab-fluent-Subdialogs.diffThis patch takes care of almost all the subdialogs.
There are only 4 missing subdialogs, which I will tackle tomorrow as it's midnight and my brain is melting with all these strings.
This is still an issue in the migration
timezone-label =
.value = { COPY(from_path, "pref.timezones.caption") }:
.accesskey = T
Updated•5 years ago
|
Comment 72•5 years ago
|
||
Comment 73•5 years ago
|
||
Comment 74•5 years ago
|
||
Assignee | ||
Comment 75•5 years ago
|
||
Thanks for landing these, and apologies for the mistakes, my eyes started crossing a bit with all the strings.
Comment 76•5 years ago
|
||
I completely missed that you're adding punctuation to existing strings while migrating them.
timezone-label =
.value = { COPY(from_path, "pref.timezones.caption") }:
For the future, don't do that. Locales have different rules when it comes to punctuation, you're creating an inconsistency that is really hard to catch, given the string is migrated and automatically approved.
That should have been a new string, without migration. At this point I'll keep it as it, but please point them out in the message when the migration is done. French, at least, will need to fix them.
@Magnus
Are there other things that need to land for migrations, or that's all?
Comment 77•5 years ago
|
||
Basically the migrations are finished. But there are a few things left (working on it, will check back later today):
- I noticed "custom-sound-label" and friends are duplicated (due to no namespacing)
- Will land bug 1573678 (adds to one of the new fluent files)
- Will land bug 1640897 (removes the need for a few migrations, will remove them from the .py file)
Looks like bug 1642282 is also fallout from this but seems like test only failure. Still annoying of course.
Comment 78•5 years ago
|
||
Comment 79•5 years ago
|
||
I plan to run the migrations on Tuesday morning (EU time). Let me know if I should delay it, in case you need more time to check for issues.
Comment 80•5 years ago
|
||
I didn't find any further issues so far - so should be good to go with the migrations.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Description
•