matrix-react-sdk
matrix-react-sdk copied to clipboard
Improve handling of the disabled state of the save button in the edit message composer
Fixes https://github.com/vector-im/element-web/issues/22207
https://user-images.githubusercontent.com/25768714/168462495-34c812ca-acdf-4006-bcab-9b9235dc68b5.mp4
Here's what your changelog entry will look like:
✨ Features
- Improve handling of the disabled state of the save button in the edit message composer (#8601). Fixes vector-im/element-web#22207.
This was done intentionally to begin with, the Save button felt weird being enabled & re-disabled, so the Save action itself actually skipped sending the event edit if there was no change in the end
(I raised this issue)
This was done intentionally to begin with, the Save button felt weird being enabled & re-disabled, so the Save action itself actually skipped sending the event edit if there was no change in the end
This behaviour is fine by me, I would even say it makes sense. However the part where the save action skips sending should also apply to keyboard navigation, i.e. should prohibit dismissing via up/down arrows only when the message is actually edited.
(I raised this issue)
This was done intentionally to begin with, the Save button felt weird being enabled & re-disabled, so the Save action itself actually skipped sending the event edit if there was no change in the end
This behaviour is fine by me, I would even say it makes sense. However the part where the save action skips sending should also apply to keyboard navigation, i.e. should prohibit dismissing via up/down arrows only when the message is actually edited.
See my message on the issue about why I closed it. I also want to address this comment.
I think if I am navigating with up/down and then edit a message, and then undo, I don't want up/down to move me away, for the same reasons as I gave in the issue: it adds a mental burden on me to understand the different behaviour, just because my edits ended up having no effect.
Closing this PR since I close the related issue.
Thank you for your work on this!