Skip to content

Implement direct messaging#112

Merged
creesch merged 2 commits intomainfrom
direct-messaging
Jun 5, 2025
Merged

Implement direct messaging#112
creesch merged 2 commits intomainfrom
direct-messaging

Conversation

@danthedaniel
Copy link
Copy Markdown
Member

@danthedaniel danthedaniel commented May 11, 2025

Fixes: #111

Changes:

  • Clicking on components with a click event of suggest_command type where the command is formatted like ^/(msg|w|tell) ([^\s]+) will activate the DM mode
  • Clicking on a username in the sidebar will activate the DM mode
  • When in DM mode all messages will be prefixed with /w <username>
  • You can click an X button to the left of the input box to leave DM mode
  • In mobile view spacing has been compacted down a bit to make room for the new button that appears in DM mode (including outside of the input area for visual consistency)
  • For tests the DOM is loaded before the test file using a setup.mjs file so that the imports can resolve their top-level DOM queries without crashing

Recordings:

Desktop

scaled_Screen.Recording.2025-05-10.at.5.40.45.PM.mov

Mobile

scaled_Screen.Recording.2025-05-10.at.5.41.34.PM.mov

@danthedaniel danthedaniel requested a review from creesch May 11, 2025 06:53
@danthedaniel danthedaniel force-pushed the direct-messaging branch 4 times, most recently from cf82613 to 305c74e Compare May 11, 2025 07:12
@creesch
Copy link
Copy Markdown
Collaborator

creesch commented May 11, 2025

Clicking on a username in the sidebar will activate the DM mode

This breaks current functionality where it fills in that persons name in the text area. Something I find myself do rather often.
I rather have that it only does so when clicking on the DM icon next to the name.

@danthedaniel
Copy link
Copy Markdown
Member Author

danthedaniel commented May 11, 2025

@creesch

I originally had it work that way but figured in the new state it was a bit confusing as to why clicking on the name didn't open DMs as in most other chat apps clicking on a username in a sidebar will open a DM with that user.

It seemed to me that the original functionality was born out of a lack of features (before tab-completion or DMing) and having the name filled in was better than nothing.

The way I look at it, as ideally most of the user-hours with this software are in the future, maintaining all existing functionality isn't as important as having the new state work well on its own. That being said, there's no way what I have implemented is the ideal. Do you have ideas for how to make this feature better?

@creesch
Copy link
Copy Markdown
Collaborator

creesch commented May 12, 2025

For me it is a frequency of use thing, I am more likely to mention someone than starting a conversation with them. If I do dm them, it is more often a single message rather than me being locked in the conversation.

So I wouldn't expect clicking a user would do that. I also see your point that adding their name isn't necessarily the most logical thing either.

I am wondering if clicking someone's name should bring up a menu with options. But, given we have only two interactions I am not sure about that either.

To be clear it is just this aspect I am having some thoughts about. The rest of the implemented feature looks great to me!

@creesch
Copy link
Copy Markdown
Collaborator

creesch commented Jun 5, 2025

Alright, has been long enough I probably should do something with this PR :P

Going to merge it for now. But there are two things we might want to adress in the future

  • How to do tab complete on mobile now. Since that could be done throughthe menu.
  • Might want to make it a bit more clearer visually that the user is in dm mode. It is visible now, but I am mostly thinking that maybe we do something with a slightly different input color border or something to make it stand out more.

@creesch creesch merged commit 18d5664 into main Jun 5, 2025
6 checks passed
@danthedaniel danthedaniel deleted the direct-messaging branch June 9, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Direct message mode

2 participants