Skip to content

feat: debounce map loading spinner to avoid flash on cached timesteps#755

Merged
braddf merged 1 commit into
developmentfrom
feat/debounce-map-loader
Jun 26, 2026
Merged

feat: debounce map loading spinner to avoid flash on cached timesteps#755
braddf merged 1 commit into
developmentfrom
feat/debounce-map-loader

Conversation

@braddf

@braddf braddf commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Description

Debounce the forecast map loading spinner so it only appears for genuine loads, not the brief flicker when flipping between already-cached timesteps.

Set a single isLoading boolean and gate the spinner behind a debounced showSpinner state that only turns on after loading persists for 700ms. Cached re-renders resolve well within that window so the spinner never shows; genuine network loads still surface it. Timer is cleared whenever loading resolves, preventing a stale flash. Existing 3s mapDataLoading safety timeout left untouched as a backstop.

Fixes #754

How Has This Been Tested?

  • Locally

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@braddf braddf self-assigned this Jun 22, 2026
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nowcasting-app Ready Ready Preview, Comment Jun 22, 2026 10:19pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
quartz-app Ignored Ignored Jun 22, 2026 10:19pm

Request Review

@suvanbanerjee suvanbanerjee self-requested a review June 26, 2026 10:36
@braddf braddf merged commit 50eff70 into development Jun 26, 2026
4 checks passed
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