Skip to content

Koala73/worldmonitor New commit #26

@gavinlovespython

Description

@gavinlovespython

Add skeleton loading screen to prevent FOUC (koala73/worldmonitor#146)

Summary

Adds a pre-rendered skeleton loading screen that displays instantly
before JavaScript boots, eliminating flash of unstyled content (FOUC).
The skeleton mimics the final layout with animated shimmer effects and
automatically replaces when the app initializes.

Type of change

  • New feature
  • Bug fix
  • Refactor / code cleanup
  • Other

Affected areas

  • Other: Loading UX / Initial page render

Details

This change improves the perceived performance and user experience by:

  1. Inlining critical skeleton CSS in the <head> to ensure it
    renders before any external stylesheets load
  2. Pre-rendering skeleton HTML in the #app div that displays
    instantly on page load
  3. Supporting both themes with dark mode as default and light mode
    variants via [data-theme="light"] selectors
  4. Adding shimmer animation to skeleton lines for visual feedback
    that content is loading
  5. Marking skeleton as hidden from accessibility with
    aria-hidden="true" so screen readers skip it

The skeleton layout includes:

  • Header with logo, filters, and controls
  • Map section with toolbar
  • Grid of 6 data panels with headers and content lines

When the Vue app initializes and calls renderLayout(), the skeleton is
automatically replaced with the actual content.

Checklist

  • No API keys or secrets committed
  • Tested theme switching (dark/light mode skeleton variants)
  • Skeleton is properly hidden from screen readers

https://claude.ai/code/session_01Fxk8GMRn2cEUq3ThC2a8e5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions