Closed mandolyte closed 1 year ago
Prompt: reword and make it look nice
Offer three buttons/actions:
(1) for now the continue closing will not lose the changes since the data is cached in the PK Context Provider.
@larsgson @birchamp
Seeing the Warning Prompt for Unsaved data as below:
But, when you click on Continue, the other open card gets closed.
@elsylambert Actually both popups are there. If you move the top one you'll see the other. But we obviously should only show the one for which the user has clicked to close.
Also, the way it works right now, the changes are not lost. If you open up Titus again, it will have the changes made. The data is being cached at the PK layer in the app.
Great catch!
-Logged with my user account and added a book, made edits and tried to close the card without saving. It showed the warning that there is unsaved data on the specific card. I clicked on Continue and saw the error as shown below:
After I clicked on the Go to user settings, I was logged out. So I logged back in and entered my Account settings again. Added a book card, edited and tried to close with out saving. This time on the modal when I seleced Continue , the card closed without any error.
I opened the book card again and the edits I made ^^ in the previous steps were still there with Save button enabled(as Expected, from the changes uw-editor-#67)
I opened a second card and made some edits and tried to close the card without saving. I see the warning that I have unsaved edits, and I chose to Continue. Again the app crash with the same error.
@larsgson @mandolyte
@larsgson here is a video that shows a couple of things that need to be addressed. Screen recording 2023-03-06 11.37.54 AM.webm
v0.3.0 build cf4f0aa Edits are not lost. If user closes the card without saving, a warning message appears for the respective card. User can choose to Cancel and save or continue without saving. If user reopens the same book card, edits are still present and Save button is enabled indicating that there are changes in the file that needs to be saved.
Tested with v0.9.0-rc.2 build 29a2450 QA. Everything looks good
After a number of other bug fixes, this one item remains. To replicate:
The changes made are now lost.
The app needs a way to determine if there are unsaved changes and to alert the user.
Suggestion: expose an action from the pk cache context that the app can use to check if any data is unsaved.