Skip to content
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

Add support for @ mentioning a user in the message input box #278

Open
kevinaboos opened this issue Nov 26, 2024 · 1 comment
Open

Add support for @ mentioning a user in the message input box #278

kevinaboos opened this issue Nov 26, 2024 · 1 comment
Assignees

Comments

@kevinaboos
Copy link
Member

kevinaboos commented Nov 26, 2024

Upon typing the @ character in a room's message input box, we should activate a pop-up that allows the current user to pick a mentioned user from the list of room members.
As the user types more characters, the typed content after the @ that matches a keyword will be used to filter the list of room members. Then, once the user selects a member to tag, that user's display name (as a proper linked username) should be inserted into the TextInput box. We should also support selecting a user via the Up/Down arrow keys and Enter.

Fortunately for us, Moly has already implemented this functionality, so we can just borrow their implementation. (I don't think it's been upstreamed into Makepad yet)
This has now been upstreamed into Makepad as the CommandTextInput widget: #278

In terms of visual design, I prefer the Element style of shown below. We should show the user's displayable name on the left and then the full user ID on the right of that, being sure to use ellipsis wrapping on both to gracefully handle the case when the popup window is too narrow to fully display long usernames/user IDs.

Examples

Here is how Discord shows the user-mentioning tag:
image

Here's how Element shows it:
image

@github-project-automation github-project-automation bot moved this to Ready in Robrix Nov 26, 2024
@kevinaboos kevinaboos changed the title Add support for mentioning a user in the message input box Add support for @ mentioning a user in the message input box Dec 19, 2024
@kevinaboos kevinaboos moved this from Ready to In progress in Robrix Dec 20, 2024
@kevinaboos
Copy link
Member Author

this is now much easier to implement thanks to the newly-contributed CommandTextInput widget now available in Makepad: makepad/makepad#621

@kevinaboos kevinaboos moved this from In progress to Ready in Robrix Jan 6, 2025
@kevinaboos kevinaboos moved this from Ready to In progress in Robrix Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

2 participants