Add description to group cards


(Dave McClure) #1

Continuing the discussion from Usercard for groups:

In our case, it’d be very helpful to have the description on the user card. I think it’d be fine to cut it off with an ellipsis after some number of characters. Showing a partial description would offer greater affordance to seek out the full description.

And I think folks would learn quickly and/or could be nudged to put the important bits at the top of their description so they are more likely to make the cut.


(Jeff Atwood) #2

Sure, I think description makes sense there @featheredtoast


(Jeff Wong) #3

Sure, if it makes sense to have, I’ll see what I can do here to add it.


(Jeff Wong) #5

Alrighty - I’ve added group descriptions, and just simply capped the description height and allowed overflows when descriptions get large: Feature: display description for group cards · discourse/discourse@9738025 · GitHub

Hope that looks better to you @mcwumbly

I’m personally on the fence about the overflows - On one hand, scroll bars are never very pretty, but you do get all the description text on the card without it clipping strangely.


(Jeff Atwood) #6

Sure, @awesomerobot will you have time to help with styling here? I’m not happy with the way this looks at the moment, and I think it should generally mimic the user card a bit more.


(Kris) #7

Yes, definitely on it within the next day or two.


(Tobias Eigen) #8

I’m very much liking the group cards! I noticed two oddities - see screenshot. The owners are not listed next to the word “Owner” as I would have expected. This particular group has two owners, so should we not be seeing “Owners” (multiple) and their avatars next to it? Also, longish group name get cut off instead of wrapping onto two lines.

41%20AM


(Jeff Atwood) #9

Owner in this case means the person whose user card you expanded is the owner of that group, doesn’t it? Maybe @featheredtoast can clarify. Not entirely sure what I’m seeing here.


(Jeff Wong) #10

Hm, this seems to be a bug - It is supposed to show as “owner” when the currently logged in user is the owner of the group, and “member” when the current user is a member… but it seems to show “owner” for everyone regardless of membership. Will fix.

EDIT: I see what’s happening, and it isn’t as bad as I feared, actually. The display logic is checking if the current user is a group owner, which includes all admins. The display here should still display the correct membership on the card, admin or no - thanks for catching this. :tomato:


(Jeff Wong) #11

To address your other point, this was intentional to keep the card compact, and looking good by default for any content. It can be changed around with CSS to allow for wraps:

#group-card h2 {
    white-space: normal;
}