writer / writer-framework

No-code in the front, Python in the back. An open-source framework for creating data apps.
https://dev.writer.com/framework/introduction
Apache License 2.0
1.3k stars 73 forks source link

chore(ui): use local fonts instead of CDN. WF-27 #487

Closed madeindjs closed 1 month ago

madeindjs commented 2 months ago

Use Fontsource with NPM instead of relying on https://fonts.google.com

Try to spot the difference (I don't see any :monocle_face: )

before after
Screenshot 2024-07-06 at 22-36-55 Hello Writer Framework Builder Screenshot 2024-07-06 at 22-36-36 Hello Writer Framework Builder
ramedina86 commented 2 months ago

Hey, looks good, I didn't know about Fontsource. Neat to be able to manage via npm.

Can we look into only using local if CDN fails?

https://stackoverflow.com/questions/7383163/how-to-fallback-to-local-stylesheet-not-script-if-cdn-fails

FabienArcellier commented 2 months ago

I love it. Everything is served through the local server. The cache is used properly on the browser, so I would advocate to keep local diffusion instead of using cdn.

(left: dev version, right: version in the PR) image

(cache usage, the file is only downloaded once) image