volto icon indicating copy to clipboard operation
volto copied to clipboard

Added preconnect link tag to speed up google font retrieval

Open pnicolli opened this issue 2 years ago • 8 comments

Fixes #3328

Add preconnect link tag as suggested by lighthouse. The current SemanticUI configuration requests 4 different font files from this origin, this preconnect should help optimize the connection.

pnicolli avatar May 22 '22 21:05 pnicolli

Deploy Preview for volto canceled.

Name Link
Latest commit 519b759da465161750c956fe6e6bae85f1089f00
Latest deploy log https://app.netlify.com/sites/volto/deploys/628ab07d1cc12a0008b3f821

netlify[bot] avatar May 22 '22 21:05 netlify[bot]



Test summary

304 0 15 0


Run details

Project Volto
Status Passed
Commit 519b759da4
Started May 22, 2022 9:53 PM
Ended May 22, 2022 10:05 PM
Duration 11:40 💡
OS Linux Ubuntu - 20.04
Browser Chrome 101

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

cypress[bot] avatar May 22 '22 22:05 cypress[bot]

@pnicolli @sneridagh although this improves the current google fonts font loading I wish we could have a pluggable section in the head to add any needed pre-fetching without having to customize HTML.jsx. We miss the slots from plone classic main_template where you could of added many things without resorting to any overrides.

ichim-david avatar May 23 '22 18:05 ichim-david

@ichim-david agreed. We tried it in the past, but we can't use Pluggables here (they are not SSR-able). I could imagine a setting with an array or Map() of components, then render them all in order? So multiple add-ons could subscribe to it?

/cc @tiberiuichim ?

sneridagh avatar May 25 '22 09:05 sneridagh

We could use a similar model as the AppExtras, where we register in configuration components that will be rendered in that "slot".

tiberiuichim avatar May 25 '22 09:05 tiberiuichim

@tiberiuichim oh sure, I didn't recall that we refactored the appExtras in such a way. 😅

The question that I have now is that if @pnicolli addition should go into such a slot, or has sense to be always there by its own.

However, I would like to have such a slot in place soon, tbh.

sneridagh avatar May 26 '22 08:05 sneridagh

Slots can have "static" components as well. Maybe it's the moment to introduce them, at least the configuration and the static part? https://github.com/plone/volto/blob/slots_quanta_split_form_undo_prefix_path/src/config/slots.js#L4

tiberiuichim avatar May 26 '22 14:05 tiberiuichim

This could be superseded by #3492 and #3493 I will either close or move this forward based on the result of those two.

pnicolli avatar Jul 21 '22 09:07 pnicolli