Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/Dynamic Error Page Component and Infinite Loading Timeout Feature #112

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ParagGhatage
Copy link
Contributor

@ParagGhatage ParagGhatage commented Jan 26, 2025

Description

This PR introduces the following features to improve the error handling and content loading behavior of the app:

  1. Dynamic Error Page Component: A reusable component to display error messages across the app.
  2. Infinite Loading Timeout: A feature that stops infinite loading after 4 seconds if content fails to load.

Changes Made

1. Dynamic Error Page Component

  • A new ErrorPage component is added that can be dynamically rendered based on the type of error.
  • The component accepts custom error messages, error codes, and additional UI elements to provide clear feedback to the user.
  • This component can be used anywhere in the app.

2. Infinite Loading Timeout

  • Implemented a timeout for content loading. If the content fails to load within 4 seconds, the loading indicator stops, preventing an infinite loading state.
  • A fallback mechanism is triggered that either shows the error page or provides an alternative message to the user.

Before and After Video

Before:

  • Loading content might stay in an infinite loading state if there’s an issue, which might leave the user unaware of the error.
Untitled.video.-.Made.with.Clipchamp.3.mp4

After:

  • After 4 seconds, the app will stop the loading animation and display an error page or a relevant fallback message, preventing the endless waiting state.
dynamic-error-page.-.Made.with.Clipchamp.mp4

How It Works

Dynamic Error Page:

  • The error page can be used anywhere in the app to show error messages.
  • It can accept various types of errors, including custom messages and codes, to provide a better UX when something goes wrong.

Infinite Loading Timeout:

  • Every time the app tries to load content, a timeout is initiated. If the loading takes more than 4 seconds, it will stop and show an error page or fallback message.

Checklist

  • Code works as expected
  • All checks pass (lint, tests, etc.)

Issue Resolved:

This PR closes Issue : #92

…or handling all types of errors.

Also stopps infinite loading of any page after 4 seconds of loading.
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.

1 participant