Skip to content

Upgrade Font Awesome to 7.3.1, adopt its Sass module API - #2750

Merged
chalin merged 12 commits into
docsy:mainfrom
chalin:chalin-m24-fa7-2026-0827
Aug 28, 2026
Merged

chalin merged 12 commits into
docsy:mainfrom
chalin:chalin-m24-fa7-2026-0827

Conversation

@chalin

@chalin chalin commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator
  • Fixes FontAwesome 7 upgrade #2314
  • SCSS: FA 7's Sass is module-based and its members no longer leak through @import: adds a forwarding support module and namespaces the theme's glyph sites
  • Width default adopted: FA 7 renders all icons fixed-width on its Icon Canvas (rationale); the theme goes along with the new default and drops its now-deprecated, redundant fa-fw uses. Consumer-visible as slightly wider icon boxes on literal fa-* icons; opt-out is fa-width-auto (applied to the click-to-copy button, which the new default squeezed)
  • Consumer-visible changes (changelog/blog entries to follow):
    • Font-family default moves to the FA 7 family name ($td-font-awesome-font-name)
    • Webfonts are woff2-only in FA 7
    • fas/fab shorthands still ship by default, so existing icon: config strings keep working
    • Project SCSS that reached into FA's Sass surface (never part of Docsy's documented customization API) breaks: $fa-var-* references fail loud; bare fa-content() calls compile but emit literal CSS (silent); FA module config overrides (e.g. $fa-font-path) silently no-op, since FA 7 freezes module defaults behind @import. Courtesy path: the internal forwarding module (@use 'td/support/fa') restores variable/function access, with the usual internal-SCSS stability caveat
  • A11y: hides the decorative search icons from assistive tech (their pseudo-element glyphs surfaced as private-use text)
  • Visual goldens: darwin refreshed locally, linux from the CI artifact; deltas are FA 7 glyph redraws and width changes (footer/RSS icons, mobile hamburger, term-page icons), reviewed

@chalin chalin added this to the 0.17.0 milestone Aug 27, 2026
@chalin
chalin marked this pull request as ready for review August 27, 2026 21:03
@chalin
chalin force-pushed the chalin-m24-fa7-2026-0827 branch from c0fd1aa to d4607b1 Compare August 27, 2026 21:39
@chalin

chalin commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

Before/after: the two icon surfaces the visual goldens don't cover (the fixture site has no github_repo and no code blocks). Captured from /docs/content/navigation/, dark mode: before = docsy.dev production (main, FA 6.7.2), after = this PR's deploy preview (FA 7.3.1). For the page-meta capture, the sidebar block was pinned via a screenshot-only CSS override, identically on both sides.

Aspect Before: FA 6.7.2 After: FA 7.3.1 (this PR)
Page-meta links (fa-fw dropped; FA 7 fixed-width default) fa6-page-meta fa7-page-meta
Click-to-copy button (fa-width-auto opt-out applied) fa6-click-to-copy fa7-click-to-copy

Takeaway: page-meta alignment is preserved (the dropped fa-fw is FA 7's default; glyphs subtly redrawn), and the click-to-copy button renders at its FA 6 size thanks to fa-width-auto.

chalin added 10 commits August 28, 2026 07:51
- Adds td/support/_fa.scss forwarding FA functions+variables (FA 7 members no longer leak through @import)
- Namespaces the fa-content/icon-variable sites in the affected partials
- Bumps $td-font-awesome-font-name to the FA 7 family name
- All 16 page-family shots: footer envelope/GitHub and blog RSS icon deltas only, verified against diffs; linux set to be refreshed from CI artifacts
- Deprecated in FA 7 and redundant: fixed-width is the new default rendering
- Same three deltas as the darwin set (footer envelope/GitHub spacing, RSS pill width), verified via crop review; breadcrumb shots unchanged
- FA 7 renders class-based glyphs with an empty content alternative, so the icon-only drawio button lost even its accidental (PUA glyph) accessible name; gives it a localized aria-label + title and marks the icon decorative
- Marks the empty td-search__icon divs aria-hidden: their pseudo-element glyph was reaching the accessibility tree as private-use StaticText
- Hugo caches resources by target path across languages, so the language-invariant "js/main.js" (and the ExecuteAsTemplate paths feeding it) baked the first language's output into every locale; the new drawio aria-label made this user-visible. Scopes all five target paths by language
- Falls back to English for the drawio label on locales without ui_edit_diagram (T returns empty, not a fallback)
- Adds fa-width-auto to the click-to-copy button: FA 7's fixed-width default squeezes the button below its v6 content-driven size (glyph overflowed the padding box)
- Output-neutral today (only en.yaml carries ui_edit_diagram, and the en fallback bakes the same string for every language); the mechanism deserves its own PR with thorough multilingual testing, including the pre-existing search.js case and the js/main.LANG.js rename
- Deferred to a drawio-integration refresh: the unnamed-button defect predates FA 7 (the v6 name was a meaningless glyph codepoint), the fix carries a nontrivial i18n cost (a new ui_* key owed to 31 locales), and the integration itself needs a currency check against the provider's docs first. The search-icon aria-hidden fix stays
@chalin
chalin force-pushed the chalin-m24-fa7-2026-0827 branch from da22449 to c969f76 Compare August 28, 2026 11:53
chalin and others added 2 commits August 28, 2026 09:04
- FA 7's empty content alternative made the nameless button explicit (v6 exposed a meaningless PUA glyph); a hardcoded label is the minimum correctness fix, localization deferred to the drawio-integration refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FontAwesome 7 upgrade

1 participant