Closed Bug 1039594 Opened 8 years ago Closed 8 years ago
Size Utils in shared instead of our own Font Size Manager
Currently, we're using our own homebrewed FontSizeManager class which is adding cruft to our code and seems to be done better within FontSizeUtils. We should switch to using this shared class instead.
Germán, is this something you could take next sprint? Please don't assign it to yourself yet, I'm just gathering information to help me with planning.
Hi Doug, yeah I considered it when implementing the bugs related to managing the font sizes in the Dialer / Call Screen / Emergency Calls apps and I discarded it for 3 main reasons: 1) Although the font_size_utils.js has a quite wide battery of tests (font_size_utils_tests.js), I didn't found any app or library already using it so I guessed it was not really needed or tested enough :) Are you aware of any app, building block or anything already using it? 2) The font_size_utils.js, although it may not seem it from its name, is currently focused on dealing with headers. Of course we could extend it to deal with "any" element but I am not aware of any other app needing that. 3) We wanted to include as few changes as possible to the already existent code in the Dialer related apps to ease the landing of this functionality in previous versions ;) Said that, of course we could give a try if there's a need for that or we consider that the implementation already existent in font_size_utils.js is better than the one we currently have :)
I was told by Arnau that maybe gmarty would have valuable info about this, is that right? :)
Hi Germán. The plan for 2.1 is to deprecate FontSizeUtils and use the gaia-header web component that will contain a lighter version of font_size_utils. However, I guess we'll keep FontSizeUtils so that other app can use it too but removing the specific code used for the headers. There will be a little code duplication between share/font_size_utils.js and gaia-header web component but both will aim at different purposes, and I guess it's OK. So, there are no other apps using FontSizeUtils standalone at the moment. But I would definitely recommend using font_size_utils for the dialer. mhenretty and myself made sure it is fully optimised and tested. Most of the methods can be reused.
Thanks for the info, both of you. The fact that this isn't in use anywhere makes me wary as it may not cover every use case, and we won't gain any benefits from sharing code. I no longer think that this is worth doing, based on this information, and we should instead focus on cleaning up FontSizeManager within the dialer. If we didn't already have FSM, I would definitely use FSU.
No longer blocks: dialer-most-wanted
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Resolution: WONTFIX → DUPLICATE
Duplicate of bug: 967440
You need to log in before you can comment on or make changes to this bug.