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 | AutoSave is not actually autosaving #226

Open
shreenarayan123 opened this issue Jun 28, 2024 · 6 comments · May be fixed by #271
Open

Bug | AutoSave is not actually autosaving #226

shreenarayan123 opened this issue Jun 28, 2024 · 6 comments · May be fixed by #271
Labels
bug Something isn't working frontend good first issue Good for newcomers

Comments

@shreenarayan123
Copy link

shreenarayan123 commented Jun 28, 2024

Where ?

  • User visits the Publish page
  • User creating new story

What ?

  • Auto save does not display saved content

Procedure to Generate the situation

  1. Click on write icon on Navbar
  2. Start a new story write title and desc
  3. After 5-10 seconds refresh the page wait for 5-10 sec
  4. Title and Desc are still empty not displaying the earlier content
@aadeshkulkarni aadeshkulkarni added bug Something isn't working good first issue Good for newcomers frontend labels Jun 29, 2024
@aadeshkulkarni
Copy link
Owner

aadeshkulkarni commented Jun 29, 2024

I can confirm this to be true. write-draft object in localstorage is empty.

@Vishnu-dholu
Copy link

I have fixed it. Here

@shreenarayan123
Copy link
Author

@Vishnu-dholu But its still not displaying on screen after refresh

@Vishnu-dholu
Copy link

@Vishnu-dholu But its still not displaying on screen after refresh

because you are instantly reloading the page after updating the content.
The autoSaveHandler is updating or autosaving the data in interval of 15 sec.
snippet

@aadeshkulkarni
Copy link
Owner

  1. The localStorage is being set with an empty object during auto-save, hence, the auto-save breaks.
  2. We need to reduce the interval to 5 seconds.

Screenshot 2024-07-03 at 8 59 57 PM

@AliYar-Khan
Copy link

@aadeshkulkarni I would like to work on this issue
I will reduce the interval for autoSave to 5 sec and also make sure that the drafts are being saved to local storage by debugging and solving the issue

AliYar-Khan added a commit to AliYar-Khan/figuringout that referenced this issue Sep 25, 2024
- store in local storage
- auto save in 5 sec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants