-
Notifications
You must be signed in to change notification settings - Fork 50
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
Enh #257: Add "Send message" to People cards #258
base: master
Are you sure you want to change the base?
Conversation
widgets/PeopleActionButtonsMail.php
Outdated
'unfollowOptions' => ['class' => 'btn btn-primary btn-sm active'], | ||
]); | ||
|
||
$html .= FriendshipButton::widget([ |
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 should have an if tag in cases where friendship is disabled.
@ArchBlood this is not necessary as the |
@funkycram Thanks for the contribution. I would not like to work with the "CREATE" event in the mail module and replace the original button. Instead, it would be nicer to create a PeopleActionButtons widget based on the BaseStack widget in the HumHub Core repository at the Buttons. Then we could simply inject the button via the mail module. What do you think about it? |
@luke- sorry, I'm not sure I understand. Is it the "Describe alternatives you've considered" solution I described in humhub/humhub#5622 ? |
@funkycram Sorry, I hadn't read the source code correctly. Your approach is ok. However, we can't show "Follow" + "Friendship" + "Send message" because the space would be too limited. What do you think about replacing either Follow or Friendship? I have changed the class here in the core a bit for this to be easier. |
public function run() | ||
{ | ||
$html = $this->addFollowButton(); | ||
$html .= $this->addFriendshipButton(); |
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.
I would suggest that we replace this button/method with "message" if you are friends. What do you think about that?
3 buttons are too much and probably look too much or?
Can you post a screenshot of it?
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.
I would suggest that we replace this button/method with "message" if you are friends. What do you think about that?
3 buttons are too much and probably look too much or?
Can you post a screenshot of it?
An alternative would be using icons over basic text based buttons, better control over the size.
See problem here: humhub/humhub#5622