Add loading state and debugging for comparison chart
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 35s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m13s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 0s

Added better UX and debugging for the comparison screen:

1. Loading state for chart section
   - Shows "Loading comparison data..." when schools are selected
     but data hasn't loaded yet
   - Provides visual feedback to users

2. Enhanced debugging logs
   - Log URNs being fetched
   - Log API response status
   - Log received comparison data
   - Better error handling with null state on failure

3. Improved conditional rendering
   - Chart shows when data is available
   - Loading message shows when waiting for data
   - Nothing shows when no schools selected

This helps diagnose any API issues and provides better user feedback
during data loading.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Tudor
2026-02-02 22:47:37 +00:00
parent f04e383ea3
commit 04ba09ab3b
2 changed files with 26 additions and 5 deletions

View File

@@ -215,6 +215,13 @@
position: relative;
}
.loadingMessage {
text-align: center;
padding: 3rem;
color: var(--text-secondary);
font-size: 1rem;
}
/* Table Section */
.tableSection {
background: white;