Skip to content

feat(LoadingPage): add interactive demo mode selector with all loading patterns#63

Merged
garrity-miepub merged 5 commits into
mainfrom
feature/loading-page-updates
Feb 3, 2026
Merged

feat(LoadingPage): add interactive demo mode selector with all loading patterns#63
garrity-miepub merged 5 commits into
mainfrom
feature/loading-page-updates

Conversation

@garrity-miepub

Copy link
Copy Markdown
Collaborator

dd comprehensive Storybook controls for LoadingPage component:

  • Add demoMode selector to switch between 7 loading pattern demos:

    • default: Full-page loading with customizable props
    • withProgress: Animated progress bar that cycles 0-100%
    • overlay: Interactive overlay demo (click Save to trigger)
    • skeletons: Skeleton placeholder examples
    • cardSkeletons: Grid of card skeletons
    • dots: Loading dots in all sizes (sm, md, lg)
    • progressBarColors: All progress bar color variants
  • Add conditional controls that show/hide based on demo mode:

    • message, subMessage, indicator, spinnerSize, progress only show
      in 'default' mode since they don't apply to other demos
    • size control available in all modes
  • Replace hardcoded colors with design tokens for dark mode support:

    • bg-card, text-foreground, border-border, bg-background
    • bg-primary, text-primary-foreground, text-muted-foreground
  • Convert render-based stories to args-based pattern for better
    Storybook controls integration

All controls now work properly: size, spinnerSize, indicator, progress,
message, and subMessage respond to user input in real-time.

loading-bar.mov

Copilot AI review requested due to automatic review settings February 3, 2026 19:53
@garrity-miepub garrity-miepub marked this pull request as ready for review February 3, 2026 19:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the LoadingPage Storybook stories by adding an interactive demo mode selector that allows users to explore all 7 loading patterns from a single interface with comprehensive Storybook controls.

Changes:

  • Introduced a LoadingPageDemo wrapper component with a demoMode selector enabling users to switch between 7 different loading pattern demonstrations (default, withProgress, overlay, skeletons, cardSkeletons, dots, progressBarColors)
  • Converted all stories from render-based to args-based pattern for better Storybook controls integration, with conditional controls that show/hide based on the selected demo mode
  • Replaced hardcoded colors with design tokens (bg-card, text-foreground, border-border, bg-background, bg-primary, text-primary-foreground, text-muted-foreground) to support dark mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/LoadingPage/LoadingPage.stories.tsx Outdated
Comment thread src/components/LoadingPage/LoadingPage.stories.tsx Outdated
Comment thread src/components/LoadingPage/LoadingPage.stories.tsx Outdated
Comment thread src/components/LoadingPage/LoadingPage.stories.tsx
- Reset animatedProgress state when switching demo modes to ensure
  progress animation always starts fresh when entering withProgress mode
- Add border-border class for proper light/dark theme support using
  design tokens (was missing border color specification)
- Simplify Save button text - remove verbose '(click to trigger loading)'
  instruction since Storybook context makes behavior self-evident
- Clarify size control description to indicate it only applies to
  default and withProgress modes where LoadingPage is rendered
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 3, 2026

Copy link
Copy Markdown

Deploying ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5715fe2
Status: ✅  Deploy successful!
Preview URL: https://ea2f720a.ui-6d0.pages.dev
Branch Preview URL: https://feature-loading-page-updates.ui-6d0.pages.dev

View logs

Copilot AI review requested due to automatic review settings February 3, 2026 20:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/LoadingPage/LoadingPage.stories.tsx Outdated
Comment thread src/components/LoadingPage/LoadingPage.stories.tsx Outdated
- Add overlayTimeoutRef to track pending timeout in overlay demo
- Add cleanup useEffect to clear timeout when switching demo modes,
  preventing state updates on unmounted components
- Improve size control description to clarify it only affects default
  and withProgress modes, add Layout category for better organization
Run npm audit fix to resolve GHSA-7h2j-956f-4vf2 (Uncontrolled Resource
Consumption) in @isaacs/brace-expansion 5.0.0
Copilot AI review requested due to automatic review settings February 3, 2026 20:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/LoadingPage/LoadingPage.stories.tsx
Comment thread src/components/LoadingPage/LoadingPage.stories.tsx
Comment thread src/components/LoadingPage/LoadingPage.stories.tsx
@garrity-miepub garrity-miepub merged commit 177805c into main Feb 3, 2026
16 checks passed
@garrity-miepub garrity-miepub deleted the feature/loading-page-updates branch February 3, 2026 20:38
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.

2 participants