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

Bug Report #1059

Closed
skbhagat0502 opened this issue Nov 12, 2023 · 2 comments
Closed

Bug Report #1059

skbhagat0502 opened this issue Nov 12, 2023 · 2 comments
Labels
bug Something isn't working unapproved

Comments

@skbhagat0502
Copy link
Contributor

Describe the bug
There are a lot of places where window.location.reload has been used along with the setTimeout function. Using window.location.reload in a single page application is a not a good thing. It creates interruptions in the flow of the single-page application, leading to a less-than-optimal user experience. These are some of the loses of using this
Loss of State:
Reloading the entire page causes the loss of the current state of the SPA. This can be frustrating for users, especially if they've interacted with the application and expect their current state to persist.

Performance Impact:
Reloading the entire page is resource-intensive. It requires fetching and rendering all the assets again, which can result in slower performance compared to updating only the necessary parts of the page in an SPA.

User Experience:
SPA architecture aims to provide a smoother and more responsive user experience by avoiding full-page reloads. Reloading the entire page contradicts this principle and can make the application feel less dynamic.

Network Usage:
A full-page reload involves re-fetching all the resources from the server, even if they haven't changed. This unnecessary network usage can impact load times and increase server load.

Interrupted User Flow:
Page reloads can interrupt the user's flow, causing them to lose context or forcing them to wait for the entire page to load again. This interrupts the seamless experience that SPAs aim to provide.

currently to update state in talawa admin window.location is used. Along with that a javascript function setTimeout is used with it. setTimeout is creates a side effect and should be avoided to use it without useEffect hook.

Page reload can be avoided with the help of the refetch() function that we use in graphql. It is the best method to remove all the reloading issue in the application and making it faster and smooth to use.

Expected behavior
The application should maintain a smooth and seamless user experience without unnecessary page reloads in a single-page application.

Actual behavior
Page reload has been used in the application in a lot of places unnecessarily.

Screenshots
If applicable, add screenshots or screen recordings to demonstrate the issue.

Additional details
Include any additional context or information that may be relevant to understanding and addressing the problem.

Potential internship candidates
Please note the information about applying for a Palisadoes Foundation internship in issue #359 if you are interested in contributing to the project.

@skbhagat0502 skbhagat0502 added the bug Something isn't working label Nov 12, 2023
@skbhagat0502
Copy link
Contributor Author

@palisadoes @noman2002 Please assign me this issue.

@noman2002
Copy link
Member

@skbhagat0502 Page reloads are required as we need to populate the data from from the database after creating it. This is not any bug as such. I'm closing this for now, may be we can work on it later.

@noman2002 noman2002 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unapproved
Projects
None yet
Development

No branches or pull requests

2 participants