Skip to content

fix: resolve loading indicator issue with proper async handling (Level 2)#44

Open
prisha-sh wants to merge 1 commit into
ashujsrfox:ashujsrfox-patch-1from
prisha-sh:fix-loading-indicator
Open

fix: resolve loading indicator issue with proper async handling (Level 2)#44
prisha-sh wants to merge 1 commit into
ashujsrfox:ashujsrfox-patch-1from
prisha-sh:fix-loading-indicator

Conversation

@prisha-sh

Copy link
Copy Markdown
Contributor

📝 Description

Fixes the loading indicator behavior during weather data fetch by resolving an async flow issue. The loader was being hidden prematurely due to a missing await in the fallback request, which caused a blank or broken UI state.

This update ensures:

  • Loader remains visible throughout the entire fetch process
  • Proper async handling using await for fallback requests
  • Clean and centralized loading state management
  • Stable UI during both normal and fallback scenarios

This involves async flow correction and UI state coordination, making it suitable for a Level-2 classification.

🔗 Related Issue

Closes #31

🔄 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔍 SEO improvement
  • 🎨 Style / UI improvement
  • ♿ Accessibility improvement
  • 📝 Documentation
  • ⚙️ CI / configuration
  • 🧹 Refactor / cleanup

🧪 How to Test

  1. Search for a city → loader appears during fetch
  2. Allow location → observe loader works correctly
  3. Simulate geolocation failure → fallback request triggers
  4. Loader stays visible until all data loads
  5. UI does not break or show blank state

📸 Screenshots (if applicable)

N/A

✅ Checklist

  • My code follows the project's existing style
  • I have tested my changes
  • I have linked the related issue above
  • My PR title follows Conventional Commits format

@ashujsrfox

Copy link
Copy Markdown
Owner

it conflicting with script

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.

No loading indicator shown during weather data fetch

2 participants