components-js icon indicating copy to clipboard operation
components-js copied to clipboard

Add possibility to edit/update chat messages

Open lukasIO opened this issue 1 year ago • 5 comments

shows a little edit button next to local messages when hovering.

edited messages get an (edited) text addition next to their timestamp when rendered.

lukasIO avatar Jan 15 '24 15:01 lukasIO

⚠️ No Changeset found

Latest commit: e427093801e6a2ab8b8ff80094ec881f660b542e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jan 15 '24 15:01 changeset-bot[bot]

size-limit report 📦

Path Size
LiveKitRoom only 1.84 KB (0%)
LiveKitRoom with VideoConference 27.79 KB (+1.12% 🔺)
All exports 32.97 KB (+0.89% 🔺)

github-actions[bot] avatar Jan 15 '24 15:01 github-actions[bot]

Some comments:

  • Editing the message directly in the speech bubble is a rather uncommon way. Most messaging apps I'm aware of let you edit the message in the input file. So you perform an action to enter edit mode, and then you edit the message as you would when creating it in the first place. Once finished, you update the original message.
  • Is it a good idea to be able to go into edit mode on more than one message at a time?
  • How would I go into edit mode on mobile or on a platform where hovering is not supported?
  • When editing a message, because the font size is less than 16px, the iPhone zooms in on the edit block. I think this is probably not what we want.
  • Personally, I would remove the parentheses around edited.

Ocupe avatar Jan 16 '24 17:01 Ocupe

Valid points, I'll split this in two PRs, one for the hooks and one for the UI. As you didn't mention anything about the hooks, I'll assume those parts are alright with you

lukasIO avatar Jan 16 '24 17:01 lukasIO

I only had a quick look at the hooks, but they seemed fine!

Ocupe avatar Jan 16 '24 18:01 Ocupe