Font Picker: Bundle list of Google Fonts #3110
Conversation
swissspidy
left a comment
There was a problem hiding this comment.
So far it looks good, but some tests for the new font list assembling would be good.
Also, you made a good point in #3026 (comment) about performance:
I think that we should refactor the fonts to lazy load, as I am worried about the performance of loading in 512kb into every admin request.
Worth noting that this only affects the stories editor, and not the rest of the admin. However, is there any chance we can reduce the size of the JSON file after the download? There seem to be some fields in it that we don't need that could be removed.
In 1a17964 I wrote a script to script out unneed fields. This take the json file from 512kb -> 72kb. |
@swissspidy I don't that e2e are a good idea. I believe the focus should of testing should be on #3155 as the autocomplete is the help behaviour change here. Other kinds of tests here also don't really work. Unit tests in grunt code doesn't make a lot of sense. Did anyone have any other kind of tests in mind? |
Nice!
Unit tests for |
@swissspidy Unit tested for these functions have been added. Through I have refactored the code to make it easier to test. I have also updated the docs as requested. |
|
🎉 |
Fixes #3026