Javadoc Theme Refinements & Zero-Flicker Performance Fixes - #1027
Merged
Conversation
…OM load delay on large pages
…ticky index navigation
…o stop index reflow
…sistent local font rendering
…njection and DOM reflow
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.
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
loadGoogleFonts()fromlitiengine.jsthat was dynamically injecting external stylesheet links into<head>after initial paint, which caused CSSOM invalidation and full-document DOM re-renders.-apple-system,BlinkMacSystemFont,Segoe UI,Roboto...) matchingdocs.litiengine.com, removing all externalfonts.googleapis.comnetwork requests.<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.@import url('fonts/dejavu.css');fromstylesheet.cssduring the build, saving an unnecessary synchronous network request.2. Navigation, Search & Table Filters
All Classes and Interfaces | Interfaces | Classes...) by ensuring summary table styles properly respect standard Javadoc inlinedisplay: nonetoggles..index-sticky-baronindex-all.html.script.jsTypeError: Preserved standard Javadoc#navbar-toggle-buttonin the DOM so Oracle's navigation script does not throw null reference errors.3. Type Hierarchy & Brand Polish
extends java.lang.Objectfrom class declaration signatures and unwrappedObjectfrom hierarchy trees (-tree.html)..tree-pkg-badge(collapsing lengthyde.gurkenlabs.litiengine.*prefixes into compact chips) and tree connectors.icon.png, removed deprecated/help nav tabs, and styled the headerAPIbadge with a vibrant coral gradient.Commits Included (19)
12fe48c8perf(javadoc): strip unused dejavu.css import from stylesheet.css19390477perf(javadoc): remove runtime loadGoogleFonts to prevent stylesheet injection and DOM reflowe2fa5edcperf(javadoc): eliminate external font network requests to ensure consistent local font rendering990b7a71perf(javadoc): inline critical font sizing and use display=optional to stop index reflow78507e40perf(javadoc): inject theme script and font preloads at top of head to eliminate FOUT28da9238style(javadoc): apply vibrant gradient highlight badge to API brand tag865722a1fix(javadoc): preserve navbar-toggle-button to prevent script.js TypeError5b108d0afix(javadoc): enable table tab filtering by respecting inline display: none1754092ffix(javadoc): pre-render TOC filter capsule and add resilient filter-input styles5b39a9fcfix(javadoc): skip redundant Object inheritance and restore hierarchy tree badgesb9193ff1style(javadoc): add margin around sticky index navigation bar340b82fafix(javadoc): use icon.png instead of logo.png for header brand icon6221b731fix(javadoc): raise search autocomplete dropdown z-index above headerae66260efix(javadoc): ensure page search input is styled and pre-rendered9e9d780dfix(javadoc): eliminate excessive header vertical space and restore sticky index navigationf7965029style(javadoc): remove deprecated and help items from navigationb8b0f6c0perf(javadoc): pre-render 2-level header at build time to eliminate DOM load delay on large pages385fd816feat(javadoc): add backlink to main documentation in header and footera864862ffix(javadoc): resolve broken header and tags on search.html