-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Feature] Add basic functionality to the mention_input_bar
component
#372
base: main
Are you sure you want to change the base?
Conversation
The current error in CI with cargo check is because the dependent CommandTextInput component has not been updated to the latest version. |
https://github.com/user-attachments/assets/9f43e74e-7f0d-4ed6-a69c-322396f5a2af
|
I don’t quite understand the reason for the first point. I will continue to address the suggestions 2/6/7. The others can be considered as features to be added in the future. This is just the initial version. |
the Makepad PR has been merged in now. |
![]() Add a header and other modifications to the popup user list. But it depends on the new changes of the CommandTextInput component. PR 663. |
Currently, getting room members will cache a list locally. Is there any room for improvement in this solution? @kevinaboos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, great start on this complex feature!
First, there are quite a few places where you're using chars
/characters, e.g., in find_mention_trigger_position()
. We can't use characters, we always must use unicode graphemes instead.
Second, I don't think we need a cache for the list of members in a room -- that's not something that is used frequently, so we shouldn't really cache it. The room user list will be cached internally by the client's EventCache, so we don't really want to cache it separately.
We can just store the latest list of Vec<RoomMember>
s in the MentionInputBar
's room_members
field (and optionally, also in the TimelineUiState
struct if needed), we don't need a full cache.
Co-authored-by: Kevin Boos <[email protected]>
I recently added support for an EditingPane that allows the user to edit messages. This EditingPane widget contains its own instance of the We need to support mentioning users in both the existing Can you refactor this PR to provide a |
@kevinaboos ok. I have processed your previous review suggestions, and next I will look at the EditingPane requirement. |
Add basic functionality to the
mention_input_bar
component. For issue #278The
mention_input_bar
component requires these modifications to the CommandTextInput component of Makepad to work :Makepad PR #651TODO for the future: