gossip
gossip copied to clipboard
DM Chat section - UI/UX review
@mikedilger it's really great to have DMs in Gossip! Some notes/proposals about this section.
Basic UX
- [x] Turn the expandable menu in the sidebar into a static label and point it to the list (unless it makes sense for a reason I didn't understand).
- [x] Rename "DM Chat" in "Private chats" (later we will also have "Groups chats").
- [x] Remove the compose button ( + icon ) from the main list, because it refers to a note, it is not contextual and can create confusion.
- [x] Update the compose icon with a "reply" icon like "⏎" and use the same icon in the notes' bottom row.
- [x] Show the compose/reply area open by default when entering a chat.
- [ ] The single chat list has to be ordered in reverse, with new messages at the bottom.
- [x] The label "ENCRIPTED DM" on every message can be removed in this specific view.
- [x] In the inbox we can put the bullet icon back and point it to the chat.
- [x] In the inbox the reply icon should bring to che chat.
- [x] Maybe the action "Send DM" in the profile menu should bring up the chat, so the user can view the previous context. Going to the previous view is just a click away with the handy top-left "<- back" button.
- [x] After sending a message the compose window should not close; just empty it and focus it again.
- [x] The "Copy web link" action can be removed from kind-4 messages.
Design
See https://github.com/mikedilger/gossip/issues/483#issuecomment-1703874323
Bugs
- [x] I sent some DMs but they don't show up in the chats, while I can see them in another client. Restarting the app solved the problem.
Ideas
- #604
- [ ] Let the user "Mark all as read" both in the main list and in the single chats.
Review 2023-09-02
- [x] If the DM compose area is closed, the standard note compose area appears, this could trick the user to send a private message publicly. I suggest removing the possibility to close the DM compose area, the "Cancel" button should only empty the textarea
- [x] If I start to compose a note and move to a private chat the latter grabs the text of the note; it should be empty. When I exit the private chat, I should find the original note.
- [x] I would remove the private messages from "My notes".
- [x] If I send a note to myself, the decryption fails.
- [x] The private chat with myself shows in the list without the nickname, so it's not clickable.
- [ ] Update the list title to "Private chats"
- [ ] Insert the warning note at the top of the main list and remove it from the compose area
- [ ] Insert the warning note at the top of the single dm section
- [x] Add below the user's name the preview of the last message (mind: it should not overlap the messages count).
To evaluate
- [x] If I start to compose a private message and exit the chat I cannot compose a public note without canceling the ongoing message. A solution could be to have a tabbed view that shows both the message and the note compose areas, if not empty, when the user exits the related area. This solution will also solve the inverse matter, starting a note and then sending a DM in the meantime. This is a minor and probably not frequent problem, that we can address later; maybe we can think about a "draft" section too, this would solve the matter with a different perspective adding also a useful feature.
Review 2023-09-04
- [x] When I enter the DM list I can still see the public note compose area
- [ ] If I start a DM and the switch to another user the first DM is cleared
- [x] Set the user's name as title (bigger font)
- [ ] Add a right button "See user profile"
Review 2023-10-15
- [x] Change the rows background to
visuals.panel_fill
- [x] Don't count as unread your own messages
In terms of the user-visible name, we have these words: Direct, Private, Group, Message, Chat. Right now there is no group - not yet implemented. Most people say "Direct Message" though, not "Private Chat". Anyhow, I'm just thinking about it.
The compose button and compose area is on every page, including settings, help, account, search, etc, etc. Should we remove it from DMs but leave it everywhere else?
Most people say "Direct Message" though, not "Private Chat". Anyhow, I'm just thinking about it.
Yes "Direct Message" seems the common way, but usually shortened to "DM"; I would avoid capitalized acronym in a menu, but the expanded one was a bit long, so I opted for a different form. I don't have strong opinions about this.
The compose button and compose area is on every page, including settings, help, account, search, etc, etc. Should we remove it from DMs but leave it everywhere else?
You anticipated me, I was just thinking that they could be safely hidden from the preferences too. The only glitch is that when the user is composing a note/message and move to the preference, then he need to go back to another section to find the edit area and finish. We can this way if it's not too difficult, however it's not a priority at all.
OK I have pushed to unstable a bunch of little commits that address the issues you have listed. Please test that new code and tick off the stuff that you agree I have fixed. Then we can focus on what is left.
I sent some DMs but they don't show up in the chats
I noticed recently that anything I post doesn't show up for a minute or more. I've also noticed a lot more events are flowing in and being processed than before. I haven't taken the time to figure out why. I think, however, that solving those issues will solve this "DM not showing up" issue. If you wait long enough, I bet it will show up. EDIT: Fixed on master
I updated the 2023-09-01 checklist.
I think, however, that solving those issues will solve this "DM not showing up" issue. EDIT: Fixed on master
Unlucky I'm still experiencing the same glitch.
Some more notes:
- If the DM compose area is closed, the standard note compose area appears, this could trick the user to send a private message publicly. I suggest removing the possibility to close the DM compose area, the "Cancel" button should only empty the textarea
- If I start to compose a note and move to a private chat the latter grabs the text of the note; it should be empty. When I exit the private chat, I should find the original note.
- I would remove the private messages from "My notes".
- If I send a note to myself, the decryption fails.
- The private chat with myself shows in the list without the nickname, so it's not clickable.
To evaluate:
- If I start to compose a private message and exit the chat I cannot compose a public note without canceling the ongoing message. A solution could be to have a tabbed view that shows both the message and the note compose areas, if not empty, when the user exits the related area. This solution will also solve the inverse matter, starting a note and then sending a DM in the meantime. This is a minor and probably not frequent problem, that we can address later; maybe we can think about a "draft" section too, this would solve the matter with a different perspective adding also a useful feature.
Main checklist updated
A quick and dirty review of the UI. I rewrote the title to match the menu, I don't know if you want keep the "Direct ... channels" words. I suggest moving the warning to the top of the list, it is quite visible, and so we clean up the compose area. If it is not too complex to achieve, It would be nice adding below the user's name the preview of the last message (mind: it should not overlap the messages count).
/cc @bu5hm4nn
Ok I've addressed some more of the issues on the dmchat
branch. I think I handled these. @dtonon Please check.
- [x] In the inbox the reply icon should bring to che chat.
- [x] I sent some DMs but they don't show up in the chats, while I can see them in another client. Restarting the app solved the problem.
- [x] If the DM compose area is closed, the standard note compose area appears, this could trick the user to send a private message publicly. I suggest removing the possibility to close the DM compose area, the "Cancel" button should only empty the textarea
- [x] If I start to compose a note and move to a private chat the latter grabs the text of the note; it should be empty. When I exit the private chat, I should find the original note.
- [x] I would remove the private messages from "My notes".
- [x] If I start to compose a private message and exit the chat I cannot compose a public note without canceling the ongoing message. A solution could be to have a tabbed view that shows both the message and the note compose areas, if not empty, when the user exits the related area. This solution will also solve the inverse matter, starting a note and then sending a DM in the meantime. This is a minor and probably not frequent problem, that we can address later; maybe we can think about a "draft" section too, this would solve the matter with a different perspective adding also a useful feature.
These have not been addressed yet:
- [ ] As you said, the single chat list has to be ordered in reverse, with new messages at the bottom.
- [ ] Add a preference to exclude PoW for DMs.
- [ ] Let the user "Mark all as read" both in the main list and in the single chats.
- [ ] If I send a note to myself, the decryption fails.
- [ ] The private chat with myself shows in the list without the nickname, so it's not clickable.
@mikedilger all good.
About this:
If I start to compose a private message and exit the chat I cannot compose a public note without canceling the ongoing message [...]
There are still some small glitches:
- When I enter the DM list I can still see the public note compose area
- If I start a DM and the switch to another user the first DM is cleared
Main checklist updated
PS: I just discovered that you can edit my messages :D I thought to be crazy because I really didn't remember to update the opening message checklist, in fact was you! I understand it is handy to have the a full unique checklist, from now I'm going to put the reviewed points as a simple list in the comment and add them to the main checklist with a dated headline, so we can also follow the history. Is it ok?
@bu5hm4nn a review of the inner chat. I would repeat the warning, because this section is directly accessibile via the user dropdown menu.
PS: I just discovered that you can edit my messages
Yeah, I just wanted to keep all the work to be done together in one place for easier reference. I promise not to change your opinions into my opinions ;-)
Also I'm trying not to tick off things I did. I'm letting you double-check them first.
- [ ] In the inbox the reply icon should bring to che chat.
This works for me. In the inbox, the reply icon has changed into your square arrow, and it goes to the DM chat channel.
- [ ] Add a preference to exclude PoW for DMs.
I thought PoW was to ensure that the relay accepted/stored/served the event. Wouldn't that apply to DMs too? I can add the preference if you can explain the reason someone would turn it on.
- [ ] If I send a note to myself, the decryption fails.
I haven't tried this. But I saw code that was sure to not work, so I fixed that. Maybe it fixes this.
- [ ] The private chat with myself shows in the list without the nickname, so it's not clickable.
Ok I have made the channel named as your name.
- [ ] When I enter the DM list I can still see the public note compose area
Ok I took it off that page.
Did this all on unstable. Deleted dmchat branch.
@mikedilger
This works for me. In the inbox, the reply icon has changed into your square arrow, and it goes to the DM chat channel.
Ok now works! Idk...
I thought PoW was to ensure that the relay accepted/stored/served the event. Wouldn't that apply to DMs too? I can add the preference if you can explain the reason someone would turn it on.
I was just thinking that while direct messaging quick messages are needed sometime, and wait some secs for the PoW can worse the UX in this specific context. I don't know if/how relays currently use the PoW as anti spam measure, but I suppose that make more sense to fight first the public spam than the DMs one.
I haven't tried this. But I saw code that was sure to not work, so I fixed that. Maybe it fixes this.
It works!
Checklist updated.
If the DM compose area is closed, the standard note compose area appears, this could trick the user to send a private message publicly. I suggest removing the possibility to close the DM compose area, the "Cancel" button should only empty the textarea
A note: I was running a two-day-old unstable build and by error shot a couple of DM in the public because of this UI problem. Real risky :D
@bu5hm4nn I updated the main cheklist adding:
◾️ Update the list title to "Private chats" ◻️ Insert the warning note at the top of the main list and remove it from the compose area ◻️ Insert the warning note at the top of the single dm section 📍 Set the user's name as title (bigger font) 📍 Add a right button "See user profile" ❓ Add below the user's name the preview of the last message (mind: it should not overlap the messages count).
With these updates and:
📍 The single chat list has to be ordered in reverse, with new messages at the bottom
I think we can close this review and move/explode the "Ideas sections" to different issues.
/cc @mikedilger
Updated legend: ◻️ Low low priority ◾️ Normal priority 📍 High priority ❓ Needed but we have to evaluate complexity
BTW it is not just rendering the notes in reverse. It also has to be that the scroll starts at the bottom. And that if new messages come in when you are at the bottom, they have to come in above the bottom, rather than below the visible viewport. That is to say, the scroll area behavior has to be totally inverted and anchored to the bottom not the top. I shutter to think at how complicated that is going to be.
I think the entirety of ScrollArea
has to be rewritten to do this right.
EDIT: Apparently ScrollArea sticks the scrollbar to the bottom once it touches the bottom, so things come in above it (it auto scrolls down). That solves the biggest problem, but probably still exhibits some odd behaviors to be determined.
@bu5hm4nn added to the checklist:
- Change the rows background to
visuals.panel_fill
- Don't count as unread your own messages
I just did "Don't count as unread your own messages" pushed to unstable 4d1e287f90c7b53cf245c4f97228f126fc31e4c2
Is this finished? If not, lets mark it for milestone 0.10
I reviewed the checklist, something is still open:
- Message order: I suppose is not an easy task, it is better move it to a separate issue, or/and attach it to the next NIP-44 versions;
- Warning message: if we don't keep a retro compatible mode with the upcoming NIP-44, and I think it is not the case, these messages will not be useful anymore;
- Mark all as read: not urgent and can be moved in the NIP-44 version;
- Keep the draft chat when exiting a chat: it is an important point and the actual behavior is not consistent (the message is kept if you navigate the feeds and the preference, but it is cleared if you visit the private chats lists or enter another chat via the user's profile);
- The section title renaming and the "Show profile" button are easy;