-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
New "getOccupantActionButtons" hook, so that plugins can add actions on MUC occupants. #3475
Conversation
@JohnXLivingston I think the dropdown menu buttons should all be on the far right (to the right of the affiliation label), so that they're vertically aligned under one another. Right now they're shifting around horizontally which doesn't look good and makes them slightly more difficult to locate and click. |
Yes, i tried that, but was not convinced. I will give it another try. |
I'm not happy with the result for now. I'm not sure how to position the badges. I do not have time to finish it today. I will come back to it at the end of the week (or maybe next week). |
With https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content |
It does not look well when the sidebar is large: badges will be somewhere in the middle, not aligned (because of the variable length of nicknames). |
There are definitely ways to improve it. For example putting the badges and the dropdown button in a single flex container with right alignment. So they both stay on the right. Another option is to use the Bootstrap grid system: https://getbootstrap.com/docs/5.0/layout/grid/ |
b6b4b9e
to
280a3a6
Compare
.occupant-actions { | ||
// We must specify the position, else there is a bug: | ||
// clicking on an action would close the dropdown without triggering the action. | ||
position: static; |
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.
This looks hacky, do you know the underlying cause why this is necessary?
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.
No sorry, i did not understand. I spent 2 hours to find why the dropdown was not displaying correctly when using classes like dropstart
(or no class at all).
I finally found that adding a position: static
was correcting the issue.
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.
Hum... I just tested again without this patch... And now it is working! (position: static
is the default, even without these lines... i did not have the same result yesterday...)
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.
Oops, sorry. I'm not quite awake yet, it wasn't a display bug, but a bug on the click handler. The bug is still there when I remove these lines. And yet, position: static
is the default, so it should not change anything...
@JohnXLivingston Can you please rebase and fix the conflict? |
6430e79
to
0d54a74
Compare
Done! |
0d54a74
to
ac8be13
Compare
Here is a new hook, so that plugins can add an action menu on occupant list.
For example, i have plugins adding following entries:
By default, there is no action, so no dropdown.
@jcbrand , i know that you prefer have actions in the occupant modal. But in my case, I prefer having them here.
In the future, we could use the same hook for actions in the occupant modal.
And if an action should only be shown in the modal (or only in the occupant list), we could add some attributes to the buttons, so that we can filter them.
Let me know if this PR is ok for you. (no hurry, it can wait if you don't have the time for now).