aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/ErrorDisplay.css
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-09-07 19:22:28 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-09-07 19:22:28 +0200
commit80bcf4a5f29ab926c2208d5efb4c19087c600323 (patch)
tree1e5826b29d8a22e057616e16069232f95788f3ba /src/frontend/app/components/ErrorDisplay.css
parent8182a08f60e88595984ba80b472f29ccf53c19bd (diff)
feat: Enhance StopSheet component with error handling and loading states
- Added skeleton loading state to StopSheet for better UX during data fetch. - Implemented error handling with descriptive messages for network and server errors. - Introduced manual refresh functionality to reload stop estimates. - Updated styles for loading and error states. - Created StopSheetSkeleton and TimetableSkeleton components for consistent loading indicators. feat: Improve StopList component with loading indicators and network data fetching - Integrated loading state for StopList while fetching stops from the network. - Added skeleton loading indicators for favourite and recent stops. - Refactored data fetching logic to include favourite and recent stops with full data. - Enhanced user experience with better loading and error handling. feat: Update Timetable component with loading and error handling - Added loading skeletons to Timetable for improved user experience. - Implemented error handling for timetable data fetching. - Refactored data loading logic to handle errors gracefully and provide retry options. chore: Update package dependencies - Upgraded react-router, lucide-react, and other dependencies to their latest versions. - Updated types for TypeScript compatibility.
Diffstat (limited to 'src/frontend/app/components/ErrorDisplay.css')
-rw-r--r--src/frontend/app/components/ErrorDisplay.css82
1 files changed, 82 insertions, 0 deletions
diff --git a/src/frontend/app/components/ErrorDisplay.css b/src/frontend/app/components/ErrorDisplay.css
new file mode 100644
index 0000000..096182a
--- /dev/null
+++ b/src/frontend/app/components/ErrorDisplay.css
@@ -0,0 +1,82 @@
+.error-display {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 2rem;
+ min-height: 200px;
+}
+
+.error-content {
+ text-align: center;
+ max-width: 400px;
+}
+
+.error-icon {
+ width: 48px;
+ height: 48px;
+ color: #e74c3c;
+ margin: 0 auto 1rem;
+ display: block;
+}
+
+.error-title {
+ font-size: 1.5rem;
+ font-weight: 600;
+ color: #2c3e50;
+ margin: 0 0 0.5rem;
+}
+
+.error-message {
+ color: #7f8c8d;
+ margin: 0 0 1.5rem;
+ line-height: 1.5;
+}
+
+.error-retry-button {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.5rem;
+ background: #3498db;
+ color: white;
+ border: none;
+ padding: 0.75rem 1.5rem;
+ border-radius: 0.5rem;
+ font-size: 0.9rem;
+ font-weight: 500;
+ cursor: pointer;
+ transition: background-color 0.2s ease;
+}
+
+.error-retry-button:hover {
+ background: #2980b9;
+}
+
+.error-retry-button:active {
+ transform: translateY(1px);
+}
+
+.retry-icon {
+ width: 16px;
+ height: 16px;
+}
+
+/* Compact version for smaller spaces */
+.error-display.compact {
+ min-height: 120px;
+ padding: 1rem;
+}
+
+.error-display.compact .error-icon {
+ width: 32px;
+ height: 32px;
+ margin-bottom: 0.75rem;
+}
+
+.error-display.compact .error-title {
+ font-size: 1.2rem;
+}
+
+.error-display.compact .error-message {
+ font-size: 0.9rem;
+ margin-bottom: 1rem;
+}