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

bruig: add context menu on user avatar right click #198

Merged
merged 5 commits into from Apr 19, 2023

Conversation

tiagoalvesdulce
Copy link
Contributor

@tiagoalvesdulce tiagoalvesdulce commented Apr 11, 2023

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 a ClientModel as a parameter so if we find out a good way to show the content outside the Chat 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.

new_gc_click

Closes #22
Closes #30
Closes #31

@miki-totefu
Copy link
Collaborator

looks ready to me

@tiagoalvesdulce tiagoalvesdulce changed the title [WIP] bruig: add context menu on user avatar right click bruig: add context menu on user avatar right click Apr 15, 2023
@tiagoalvesdulce tiagoalvesdulce marked this pull request as ready for review April 15, 2023 23:40
@tiagoalvesdulce
Copy link
Contributor Author

tiagoalvesdulce commented Apr 15, 2023

Cool. Just added listeners to the posts feed and post content screens so the username updates properly when a user rename is done from the UserContextMenu in them. Also added autofocus and submit on enter key press to the rename user and pay tip modals. I'm very happy with how this PR is looking.

@miki-totefu miki-totefu merged commit ee374c8 into companyzero:master Apr 19, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants