Skip to content

Javadoc Theme Refinements & Zero-Flicker Performance Fixes - #1027

Merged
steffen-wilke merged 19 commits into
mainfrom
theme_javadoc_litiengine
Sep 2, 2026
Merged

Javadoc Theme Refinements & Zero-Flicker Performance Fixes#1027
steffen-wilke merged 19 commits into
mainfrom
theme_javadoc_litiengine

Conversation

@steffen-wilke

Copy link
Copy Markdown
Contributor

Summary

This update refines the custom Javadoc theme with bugfixes, type hierarchy simplifications, and a comprehensive performance overhaul that eliminates DOM reflows, font flickering (FOUT), and layout shifts during page navigation.


Key Improvements

1. Zero-Flicker Performance & Font Optimization

  • Eliminated Runtime Stylesheet Injection: Removed runtime loadGoogleFonts() from litiengine.js that was dynamically injecting external stylesheet links into <head> after initial paint, which caused CSSOM invalidation and full-document DOM re-renders.
  • Native Offline Typography: Switched to the high-performance native system UI font stack (-apple-system, BlinkMacSystemFont, Segoe UI, Roboto...) matching docs.litiengine.com, removing all external fonts.googleapis.com network requests.
  • Early <head> Theme & Typography Initialization: Moved the theme setter script (data-theme) and critical root font sizing (16px) to the very top of <head> so dark/light themes and typography render correctly on frame zero before stylesheets parse.
  • Stripped Redundant Font Imports: Automatically stripped Oracle's unused @import url('fonts/dejavu.css'); from stylesheet.css during the build, saving an unnecessary synchronous network request.

2. Navigation, Search & Table Filters

  • Fixed Table Tab Filters: Resolved table tab filtering (All Classes and Interfaces | Interfaces | Classes...) by ensuring summary table styles properly respect standard Javadoc inline display: none toggles.
  • Pre-rendered TOC Search Capsule: Pre-rendered the table of contents filter input with an integrated SVG search icon at build time and added resilient standalone styles.
  • Sticky A-Z Jump Bar Margin: Added proper spacing and positioning around .index-sticky-bar on index-all.html.
  • Search Autocomplete Z-Index: Elevated autocomplete dropdown results above sticky headers.
  • Prevented script.js TypeError: Preserved standard Javadoc #navbar-toggle-button in the DOM so Oracle's navigation script does not throw null reference errors.

3. Type Hierarchy & Brand Polish

  • Clean Object Inheritance: Stripped redundant extends java.lang.Object from class declaration signatures and unwrapped Object from hierarchy trees (-tree.html).
  • Package Hierarchy Badges: Restored .tree-pkg-badge (collapsing lengthy de.gurkenlabs.litiengine.* prefixes into compact chips) and tree connectors.
  • Brand Assets & Header Cleanup: Switched the brand logo icon to icon.png, removed deprecated/help nav tabs, and styled the header API badge with a vibrant coral gradient.

Commits Included (19)

  • 12fe48c8 perf(javadoc): strip unused dejavu.css import from stylesheet.css
  • 19390477 perf(javadoc): remove runtime loadGoogleFonts to prevent stylesheet injection and DOM reflow
  • e2fa5edc perf(javadoc): eliminate external font network requests to ensure consistent local font rendering
  • 990b7a71 perf(javadoc): inline critical font sizing and use display=optional to stop index reflow
  • 78507e40 perf(javadoc): inject theme script and font preloads at top of head to eliminate FOUT
  • 28da9238 style(javadoc): apply vibrant gradient highlight badge to API brand tag
  • 865722a1 fix(javadoc): preserve navbar-toggle-button to prevent script.js TypeError
  • 5b108d0a fix(javadoc): enable table tab filtering by respecting inline display: none
  • 1754092f fix(javadoc): pre-render TOC filter capsule and add resilient filter-input styles
  • 5b39a9fc fix(javadoc): skip redundant Object inheritance and restore hierarchy tree badges
  • b9193ff1 style(javadoc): add margin around sticky index navigation bar
  • 340b82fa fix(javadoc): use icon.png instead of logo.png for header brand icon
  • 6221b731 fix(javadoc): raise search autocomplete dropdown z-index above header
  • ae66260e fix(javadoc): ensure page search input is styled and pre-rendered
  • 9e9d780d fix(javadoc): eliminate excessive header vertical space and restore sticky index navigation
  • f7965029 style(javadoc): remove deprecated and help items from navigation
  • b8b0f6c0 perf(javadoc): pre-render 2-level header at build time to eliminate DOM load delay on large pages
  • 385fd816 feat(javadoc): add backlink to main documentation in header and footer
  • a864862f fix(javadoc): resolve broken header and tags on search.html

@steffen-wilke
steffen-wilke marked this pull request as ready for review September 2, 2026 19:10
@steffen-wilke
steffen-wilke merged commit b71e9d9 into main Sep 2, 2026
5 checks passed
@steffen-wilke
steffen-wilke deleted the theme_javadoc_litiengine branch September 2, 2026 19:10
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.

1 participant