(via https://dolske.wordpress.com/2017/07/24/photon-engineering-newsletter-9/)
Well, here we go again with a big update for Newsletter #9 <https://www.youtube.com/watch?v=TINfzxSnnIE>! [Since the last update, I took a vacation and ever since have been getting caught up. So this update is terribly overdue. Sorry about that!] Animations Animations for toolbar icons are finally landing! Yaaaaay! :kermithands: The stop/reload and pin-to-overflow animations are in Nightly, and the Pocket, bookmarks, and downloads icons are next. I’d like to talk a little about the way these animations are implemented. The effect is simple, but there’s a lot of work behind the scenes. As is often the case in engineering, we had a number of requirements that needed to be satisfied. The most important was performance – we’re making Firefox 57 blazing fast, and it wouldn’t do to have animations hurting that work. We worked closely with our Graphics and Platform teams to develop a technique (more on that in a second) that was efficient, and specifically could run entirely within the compositor process <https://hacks.mozilla.org/2017/04/firefox-53-quantum-compositor-compact-themes-css-masks-and-more/>. This helps ensure the animation can smoothly run at 60fps without impacting (or being impacted by) all the other stuff running in the browser. The other big requirement was around UX. We wanted to minimize the platform technical constraints for our visual designers, so that their ideas were not bound by platform limitations. [For example, we had an old patch <https://bugzilla.mozilla.org/show_bug.cgi?id=759252> to convert the page-loading throbber <http://searchfox.org/mozilla-central/source/toolkit/themes/shared/icons/load...@2x.png> from an APNG <https://en.wikipedia.org/wiki/APNG> to a static image animated with a CSS transform (rotation). That’s nice, but then you’re limited to effects possible in pure CSS.] We also needed to use SVG in the animation, since the rest of Firefox’s icons are SVG now. This gives the best result when scaling to different display DPI settings, and allows us to dynamically adjust the icon colors based on system style. The technique we’re using for Photon is based around an SVG “filmstrip” – each frame is pre-drawn separately within an SVG image. We then use CSS to crop it to a specific frame, and a CSS Animation to move the crop box for each frame. Since it’s all declarative, Gecko and the compositor process can handle the animation very efficiently. [image: filmstrip] A demo is worth 10,000 words, so check out Jared’s SVG Filmstrip Demo <http://msuja.ws/svg.html> to see how this works in detail. (Since it’s all based on web technologies, you can view-source and see the same technique running in your browser that we use in chrome.) Of course, nothing is ever simple! There’s a lot of work that goes into getting these assets ready. First, our visual designers prototype an animation in Adobe After Effects. It then goes through a process of design iteration and user testing. (Is is distracting? Does it communicate what we want? Too fast? Too slow?) The animation is then exported to an SVG file, but the markup from Adobe is usually not very good. So we use SVGO <https://github.com/svg/svgo> to optimize it, often further hand-tune the SVGO output, and finally tweak it to make use of the dynamic context-fill <https://bugzilla.mozilla.org/show_bug.cgi?id=1058040> color specified from the browser’s CSS. Phew! But thankfully, as a user, you can just enjoy the finished result. We’d like to refine the creation process, but overall it’s a pretty powerful and flexible technique that we’ll be using more and more. Recent Changes Menus/structure: - Lots <https://bugzilla.mozilla.org/show_bug.cgi?id=1369729> of minor <https://bugzilla.mozilla.org/show_bug.cgi?id=1370967> bugfixes <https://bugzilla.mozilla.org/show_bug.cgi?id=1373969> to <https://bugzilla.mozilla.org/show_bug.cgi?id=1376097> various <https://bugzilla.mozilla.org/show_bug.cgi?id=1376484> aspects <https://bugzilla.mozilla.org/show_bug.cgi?id=1377139> of the earlier <https://bugzilla.mozilla.org/show_bug.cgi?id=1377165> changes <https://bugzilla.mozilla.org/show_bug.cgi?id=1378790> we made <https://bugzilla.mozilla.org/show_bug.cgi?id=1378794>. Thanks to contributors Jeongkyu Kim (bug 1376484) and Adolfo Jayme (bug 1376097) for their work! - Flexible spacers are now available in customize mode <https://bugzilla.mozilla.org/show_bug.cgi?id=1366813>. This is the first step towards having the location field be centered in the navbar, as part of the Photon design. - Work on the Page Action panel is progressing <https://bugzilla.mozilla.org/show_bug.cgi?id=1374477>. We gave a prototype sneak-peek at the All-Hands (see Photon Newsletter #8), but it’s not quite ready to land yet. - Made the Library button work correctly in the overflow panel <https://bugzilla.mozilla.org/show_bug.cgi?id=1380084>. - Removed the Page Setup <https://bugzilla.mozilla.org/show_bug.cgi?id=1376098> item from the hamburger menu, as it was a bit confusing and the functionality can be accessed elsewhere. Animation: - The Pin to Overflow animation <https://bugzilla.mozilla.org/show_bug.cgi?id=1375152> landed, try it now! Right-click on a toolbar button and use “Pin to Overflow Menu” to see the awesome animation! [image: pintooverflow] - The Stop/Reload animation <https://bugzilla.mozilla.org/show_bug.cgi?id=1355924> also landed! We’ve got great feedback about speeding it up and making it less distracting, will be working on that soon. You may have noticed that, while animating, the icon looks thinner than the normal (static) icon… We’ll be updating all the toolbar icons to this new Photon style in a few weeks, which will make the transition between states feel smoother. [image: stopreload] - The Save to Pocket animation <https://bugzilla.mozilla.org/show_bug.cgi?id=1355922> is going through review, once that’s landed we’ll start implementation of the new bookmarking animation. - The new arrow-panel animations <https://bugzilla.mozilla.org/show_bug.cgi?id=1352075> landed… but bounced due to test failures. We’re working around the failures by disabling the animation in tests, which means we bumped up the priority of having the panel animations be controlled by the toolkit.cosmeticAnimations.enabled preference <https://bugzilla.mozilla.org/show_bug.cgi?id=1380065>. Once this is all hooked up and tests are happy, the animation will reland. Preferences: - The prefs reorg v2.0 <https://bugzilla.mozilla.org/show_bug.cgi?id=1365133> has now landed! (Check out the design specs <https://mozilla.invisionapp.com/share/P4ACQT1E3#/screens/217167547> for the details of exactly what changed.) This had a rough time getting landed, as it encountered a string of tricky intermittent test failures and memory leaks. Kudos to the team for working through it all and getting it landed! - Improved display on small screens <https://bugzilla.mozilla.org/show_bug.cgi?id=1363960> by fixing some wrapping issues that were causing scrolling. Visual redesign: - On Windows 10, we will now use the system accent color in the title bar <https://bugzilla.mozilla.org/show_bug.cgi?id=1196266>, when you’ve enabled this in your Windows settings. - You’ll first need to open the following OS dialog, by right-clicking on your Desktop, selecting Personalize, and then selecting the Colors section. Scroll down to “Show accent color on the following surfaces” and enable the “Title bars” checkbox. [image: colorsUI] - You can now select different colors here, and have them show up in Firefox. (Or use the setting at the top of that dialog to have Windows automatically pick a color that complements your desktop background) [image: colors] - Styling <https://bugzilla.mozilla.org/show_bug.cgi?id=1377794> followups <https://bugzilla.mozilla.org/show_bug.cgi?id=1381117> to the identity block (the leftmost button in the URL bar) when hovering/clicking it. - The UI Density control is now ordered by logical size <https://bugzilla.mozilla.org/show_bug.cgi?id=1379123>, and we fixed an issue that made the text labels unreadable <https://bugzilla.mozilla.org/show_bug.cgi?id=1379122> on Linux. - Search textbox widget styling <https://bugzilla.mozilla.org/show_bug.cgi?id=1380268> has been updated to be common across the browser. - Slightly increased the size of the tab overflow indicator <https://bugzilla.mozilla.org/show_bug.cgi?id=1380966>. - A number of followup <https://bugzilla.mozilla.org/show_bug.cgi?id=1379268> bugfixes <https://bugzilla.mozilla.org/show_bug.cgi?id=1379269> for <https://bugzilla.mozilla.org/show_bug.cgi?id=1379266> the title bar <https://bugzilla.mozilla.org/show_bug.cgi?id=1379173> on Windows 10. Onboarding: - Turned off <https://bugzilla.mozilla.org/show_bug.cgi?id=1379860> the compact newtab tiles. Originally we thought enabling the new style would be a good transition to the Activity Stream style, but on further reflection it felt too much like making 2 differing changes. So Firefox release users will continue to see the existing (old) newtab page in Firefox 56, until Activity Stream fully replaces it in 57. (Activity Stream is now enabled on Nightly, so all the changes here make it a little confusing to explain, sorry!) - The onboarding overlay will be hidden when browser is too narrow <https://bugzilla.mozilla.org/show_bug.cgi?id=1358970>, as the current design/implementation requires a minimum width or else it overflows the window. - The tour notifications <https://bugzilla.mozilla.org/show_bug.cgi?id=1372067> shown at the bottom of a new tabs and about:home are now suppressed for the first few minutes of using the browser, and will rotate to a different suggestion after a certain amount of time or number of impressions. Also, the slide-up animation was removed <https://bugzilla.mozilla.org/show_bug.cgi?id=1377433> to make it less distracting. - The tour step to set your default browser will now show an alternative message <https://bugzilla.mozilla.org/show_bug.cgi?id=1374717> if you’ve already made Firefox your default browser. - Our UITour support can now open the awesomebar with a search term pre-filled <https://bugzilla.mozilla.org/show_bug.cgi?id=1371542>, which will be used for Firefox 57 Address Bar tour to demonstrate searching from the awesomebar. Performance: - We’ll now speculatively connect to autocompleted hostnames <https://bugzilla.mozilla.org/show_bug.cgi?id=1348275> in the awesomebar, which will make pages load faster. - Addressed a mysterious performance test regression <https://bugzilla.mozilla.org/show_bug.cgi?id=1372261> that ended up being caused by clock skew across processes. - Improved our performance testing infrastructure to allow gathering profiler data <https://bugzilla.mozilla.org/show_bug.cgi?id=1374333> from tests. This is really big for helping to understand regressions and improve things that are slow. - browser_startup.js is now more reliable <https://bugzilla.mozilla.org/show_bug.cgi?id=1380011> and the blacklists more scripts. Tests like this help ensure that the performance improvements we make don’t accidentally get regressed down the road. (We’re not just making Firefox faster, we’re ensuring it stays that way!) - Deferred yet more things <https://bugzilla.mozilla.org/show_bug.cgi?id=1355492> from executing right at startup. That’s all (!) for this update. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform