Open Bug 2072395 Opened 2 months ago Updated 1 month ago

AITab - find in-mozilla hosting for font artifacts using gcs

Categories

(Core :: Machine Learning: Frontend, task, P1)

task
Points:
2

Tracking

()

People

(Reporter: mlucks, Assigned: rrando)

References

(Blocks 1 open bug)

Details

(Whiteboard: [aiaug])

As we have been playing around with using a custom font for AITab, there have been security and caching concerns brought up using a google font. We are exploring the possibility of hosting font artifacts via google cloud storage instead of pulling the font in remotely via google fonts.

Please do not forget uncomment or clean up the TODO and font assignment t in aitab-base.css

Note: mochitest treats any off-localhost connection as fatal, so loading fonts.googleapis.com aborts every test that opens about:aitab. Resolving both hosts to localhost avoids that, and the font simply doesn't load under test, which nothing depends on.

Make sure to add in browser/components/aiwindow/ui/test/browser/browser.toml, inside prefs:

"network.dns.localDomains=fonts.googleapis.com,fonts.gstatic.com"

No longer depends on: 2068782, 2064927

Please also circle back to the storybook implementation in preview-head.html lines 14-20, there is a TODO comment if you search the bug id

Note: mochitest treats any off-localhost connection as fatal, so loading fonts.googleapis.com aborts every test that opens about:aitab. Resolving both hosts to localhost avoids that, and the font simply doesn't load under test, which nothing depends on.

Make sure to add in browser/components/aiwindow/ui/test/browser/browser.toml, inside prefs:

"network.dns.localDomains=fonts.googleapis.com,fonts.gstatic.com"

in creating a remote settings attachment such as for a font or image, a record is created along with the attachment content made available on the cdn, so we should be able to use the latter without calling any remote settings attachment apis (which would fetch the record then resolves the indirection to cdn)

https://searchfox.org/firefox-main/search?q=settings-attachments.cdn

we would need to update the font-src csp to allow https://firefox-settings-attachments.cdn.mozilla.net

Blocks: 2078662

Implementation happening on bug 2078662

You need to log in before you can comment on or make changes to this bug.