Repository navigation
clients: remove fonts that are named, copied or requested and never used - #3476
Merged
Merged
Conversation
… draws with The legacy participant client's build copied the six Font Awesome 4.7 font files (1,085,661 bytes: otf, eot, svg, ttf, woff, woff2) into /fonts/. No stylesheet or script it builds declares an @font-face for them, and it imports no Font Awesome CSS, so no page ever requested them. This removes the copy step, the font-awesome package, and the unused react-fontawesome package from the legacy client and from the report (neither client imports it). What a person would notice: nothing. Every other built file is byte-identical; the build output shrinks from 1,611,779 to 526,118 bytes. The `font-family: FontAwesome` names in the stylesheet and the map are left as they are, so a reader with Font Awesome installed on their own machine still sees what they saw. Files already uploaded under /fonts/ by earlier deploys are not removed by a deploy, and the /fonts/ route stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1
…kit.net Both copies of unsupportedBrowser.html (the legacy client's and the server's) loaded the Typekit kit wzs2fuq from use.typekit.net and then called Typekit.load() inside a try. That kit no longer exists: a GET of https://use.typekit.net/wzs2fuq.js answers 404, so the script failed, the call threw, and the catch swallowed it. Neither copy is in any build output today (the legacy client's build does not copy it, and the server asks the static host for it), so no browser currently receives the page. What a person would notice: nothing. The page sets its text in the next fonts of its own list, as it already did with the kit missing. One request to another host is gone from the source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1
Each of these names was asked for and could never load from us: no font file, @font-face or font service provides it. The browser skipped each to the next font in its list. Removing the name leaves that next font in front. - Report: "VT323" ahead of monospace on the four large counts of the standard report and the topic-map narrative report. - Report: Plotly's default "Open Sans", verdana, arial, sans-serif on the topic scatterplots and the layer distribution chart; their layouts now name verdana, arial, sans-serif themselves. - Legacy client: "brandon-grotesque", "Brandon Grotesque" ahead of Futura on the signed-in menu button. - Legacy client: "brandon-grotesque" on the unsupported-browser page (no build ships that page); proxima_nova in the form-switch module (not imported by any stylesheet); "Source Serif Pro" and "Montserrat" in vis2 globals that no live code reads (neither string is in the build). What a person would notice: nothing, unless that exact typeface is installed on their own machine; then they now see the next font in the list (monospace, Verdana, Futura) where before they saw their local copy. The legacy client's bundle changes only in the menu button's style string; the report's only in these strings. Left as they are, because the name is the only one in its declaration and taking it out would change what everyone sees: chaparral-pro on the conversation description, brandon-grotesque on the map's waiting text, and the menu's dropdown list, whose style attribute is malformed and so already ignored by browsers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1
…iles The legacy client's Bootstrap configuration defined the font-family variables ($font-family-sans-serif with "brandon-grotesque", -serif, -monospace, -base) and the Glyphicons icon-font variables, but no Bootstrap partial that reads them is imported, and no stylesheet of ours uses them. The client's own font variables carried commented-out lists of Brandon Grotesque, Chaparral Pro and Canada Type Gibson. What a person would notice: nothing. The compiled polis.css is byte-identical before and after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clients: remove fonts we name, ship or request but never use
What a person will see change
Nothing, for anyone who does not have one of the removed typefaces installed on their own machine. The one case where a reader sees a different face, per removed name:
VT323Open Sans(Plotly's default)brandon-grotesque,Brandon Grotesquebrandon-grotesqueproxima_novaSource Serif Pro,Montserratvis2globalsReaders with Font Awesome installed locally see what they saw before: the
font-family: FontAwesomenames are left in place; only our copies of the files, which nothing requested, are gone.What was removed
/fonts/(otf 134,808; eot 165,742; svg 444,379; ttf 165,548; woff 98,024; woff2 77,160)font-awesomepackage and its copy step (legacy client); the unusedreact-fontawesomepackage (legacy client and report)unsupportedBrowser.htmluse.typekit.netgone from the source (the kit answers 404)polis.cssbyte-identicalBuilt output, legacy participant client: 1,611,779 → 526,118 bytes (27 → 21 files).
How each was proven dead
@font-facefor FontAwesome, and nothing imports Font Awesome's CSS; the only references arefont-family: FontAwesome(a mixin and one SVG text attribute), which a browser resolves against installed fonts only. A production build before and after differs only in the missingfonts/directory: every other file is byte-identical. No other client references/fonts/.react-fontawesomeis imported nowhere in either client.https://use.typekit.net/wzs2fuq.jsanswers 404, so the script failed andTypekit.load()threw into its owncatch. Neither copy of the page is in a build output: the legacy client's build does not copy it, and the server asks the static host for it.@font-face, or font service anywhere in the repository. A build before and after shows the only differences in the bundles are these strings (and the build's commit stamp). Names that are the only entry in their declaration were not touched (below).variablesis imported from the Bootstrap configuration; no partial or stylesheet reads the removed variables. Compiled CSS is byte-identical.Deliberately left
chaparral-pro(conversation description),brandon-grotesqueon the map's waiting text, and the admin's"mono": each is the only name in its declaration, so removing it would change the face everyone sees.font-familystyle attribute inconversationTabs.handlebars, which browsers already ignore. Fixing it would change what readers see./fonts/route, and files already uploaded under/fonts/by earlier deploys (a deploy does not delete them).Checks
edge, none new;node --test570 of 570 pass.🤖 Generated with Claude Code