matrix-react-sdk icon indicating copy to clipboard operation
matrix-react-sdk copied to clipboard

Improve handling of the disabled state of the save button in the edit message composer

Open SimonBrandner opened this issue 2 years ago • 2 comments

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.

SimonBrandner avatar May 15 '22 07:05 SimonBrandner

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

t3chguy avatar May 16 '22 15:05 t3chguy

(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.

HarHarLinks avatar May 22 '22 00:05 HarHarLinks

(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.

andybalaam avatar Nov 02 '23 11:11 andybalaam

Closing this PR since I close the related issue.

Thank you for your work on this!

andybalaam avatar Nov 02 '23 11:11 andybalaam