Skip to content

Implement direct messaging #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Implement direct messaging #112

wants to merge 2 commits into from

Conversation

danthedaniel
Copy link
Collaborator

@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
Owner

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
Collaborator 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
Owner

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!

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