bruig: add context menu on user avatar right click #198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context Menu
This PR introduces a User Context Menu that shows up when the user right clicks another user avatar.
I implemented the ContextMenu to be reusable. So, if we decide to add a Group Chat Context Menu it should be pretty straight forward. Decided to not include in this PR yet since it's a WIP and I'd like some feedback before moving forward.
I did not implemented all the actions from the submenu because some use the chat event to show content, for example, 'List Posts'. But the
UserContextMenu
Widget accepts aClientModel
as a parameter so if we find out a good way to show the content outside theChat
screen it will be easy as well.A preview of how it works:
Can open user context menu in the feed. If the user right clicks its own avatar, nothing happens.
new_feed_click.mp4
Send tips easily directly from the post content.
new_post_comments_click.mp4
Also works inside group chats!
new_gc_right_click.mp4
And on the chat list.
new_ul_click.mp4
Right click/long press group chats
This PR also activates and shows the sub menu when right clicking/long pressing a group chat. Only the left click worked before and you had to click the Avatar to open the sub menu. If we decide to create a context menu for group chats, this behavior will be changed to show the context menu instead.
Closes #22
Closes #30
Closes #31