Skip to content

Instantly share code, notes, and snippets.

@flyingrub
Last active August 25, 2017 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flyingrub/f0922b898347ba0bc59a687872a7c40b to your computer and use it in GitHub Desktop.
Save flyingrub/f0922b898347ba0bc59a687872a7c40b to your computer and use it in GitHub Desktop.
GSOC 2017 Work Product Submission

Summary

During this GSOC, I worked on redesigning the about:telemetry page of Firefox. about:telemetry allows the users to inspect what anonymous usage data Firefox collects and sends to Mozilla's servers. My main goals were to reimplement this page to be more usable, more accessible, and more maintainable. Also the new design should be coherent with the new Firefox Photon redesign.

You can find all the bugs I have worked on this summer here. Mainly I modified the files toolkit/content/aboutTelemetry.*. If you feel interested in trying some of my changes just download Firefox Nightly (some commits are already available in Firefox Beta) or you can build Firefox from source, then browse to about:telemetry.

Description

The main goals of the project are achieved and most of the patches I created are already merged and available in Firefox Nightly. I worked with bugzilla on small changes and could then push some work as soon as the code is ready. This allowed me to have quick feedback for all the visual changes and new features. The notable changes contains :

  • The design is now coherent with the others about:* pages like about:addons. It has a sidebar containing all the categories and a main view that changes accordingly.
  • The source code is now more generic and unused code has been removed.
  • We can display the raw JSON using the Firefox's internal JSON viewer which is very handy.
  • We can now switch between pings easily.
  • A search feature has been implemented allowing a user to search for data in a specific section or for all section if you are on the home.

Localisation is hard.

My work included modifying some localisation files. Some strings needed to have special HTML added to them, mainly to add clickable links. I faced some issue with it as it complicated a little this tasks. I learned that the " character is prohibed in localisation files. We should use “” instead.

Modifying strings mean chaging the id key in firefox which I didn't know too. It then trigger on the localisation platform used by translators that a new string needs to be localised.

I also met some issue with the language itself. I reused twice the same word "enabled" as in english there is no concordance between the noun and its adjective. That is not the case for other languages like Polish. That's why I needed to create two strings with the same word.

The problematic strings were (in Polish) :

homeExplanation=Telemetria jest %1$S i rejestrowanie rozszerzonych danych telemetrii jest %2$S.
telemetryEnabled=włączona
telemetryDisabled=wyłączona

It is now replaced by :

homeExplanation=Telemetria jest %1$S i rejestrowanie rozszerzonych danych telemetrii jest %2$S.
telemetryEnabled=włączona
telemetryDisabled=wyłączona
extendedTelemetryEnabled=włączone
extendedTelemetryDisabled=wyłączone

Rebase all the things!

I often had to rebase my latest commit on the updated central repository since a lot of people work on the Firefox source code and I worked on a lot of bugs at once. I even created a git alias git cp to avoid writing git cherry-pick.

Fun git story : A bug involved moving some assets from a folder to another and changing the path for it where it appeared in the code. But someone just started using it after I pushed my patch but still used the old path 👌.

THE END?

I want to thank particulary my mentor :chutten and all the telemetry client team for their help during this summer. It is very satisfying to feel to be part of Firefox and that my code will be available for a lot of people (even if about:telemetry is not the most visited page of Firefox). I'm very proud to say that I participated at my scale in the photon redesign.

This GSOC is ending but Firefox has won a new contributor. I hope it's just the begining of a long story.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment