You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you delete all the text the back button becomes a cancel button, which deletes all changes and reverts to the actual values, which may be nothing in the case of a new item, in which case the item will be deleted.
If you delete all the text and save, the object is actually deleted, from the table, as well as the repository.
The text was updated successfully, but these errors were encountered:
* Add API for cancel and reply
* When the user edits the text:
* The UI switches between `cancel` and `back` depending on whether the body text is blank.
* If the `reply` button is showing, it will be replaced with the `save` button.
* If the text has been changed, and is not blank, going back simply saves the talk and adds it to the table if necessary—but not to the server.
* Here the new talk should have a marking indicating that it is unsaved. Maybe it could be caution striped, or use a special avatar. (Refs #34)
* Implement cancel / revert behavior, refs #36
### Cancel / Revert
You only get the cancel button if the text has all been deleted.
This is the default state for new items, which are deleted on cancel.
If you delete all the text from an item, it will also show cancel.
Here, hitting cancel reverts that items to the server version, discarding all changes.
Here, hitting save would delete the item from the table and the server.
The button doesn’t say `revert` because there’s no system item for that and it’s nerdy.
What probably needs to happen is deleting all the text from something, the blank screen is replaced with a detailed delete and revert API.
The app should react like: Holy crap, why did you do that? What are you trying to do? It seems dangerous, so let’s be explicit here.
If you delete all the text the back button becomes a cancel button, which deletes all changes and reverts to the actual values, which may be nothing in the case of a new item, in which case the item will be deleted.
If you delete all the text and save, the object is actually deleted, from the table, as well as the repository.
The text was updated successfully, but these errors were encountered: