Old data persists on editing and creating articles
Closed this issue · 2 comments
If you edit an article using Habla, the data is persisted locally. Because even if you try to edit another article later on, the data from the previous article gets populated, so an average user can't edit any other articles. Same with creating new posts.
I haven't checked the code of Habla, but quickly checking Local Storage > https://habla.news > draft tells me it's persisting the old state even when it shouldn't. Clearing it before editing or creating new articles works.
You can select other articles to edit or "New article" on the dropdown to edit other articles or write a new one, perhaps we need to make the UX more obvious. Cached article is cleared if published too, not sure what the issue is.
Cached article is not cleared if not published, and that causes this UX issue. If I click on article 1 to edit it, and then click cancel, it persists in localStorage. Then if I click on article 2 to edit it, I still see all the content of article 1 autofilled. Maybe clear the cache if the d tag of the cached event and the d tag of the article that the user is trying to edit mismatches?