Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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.
- Loading branch information