FriendsOfFlarum / user-directory

The permission based public user directory extension for your Flarum forum.
https://discuss.flarum.org/d/5682
MIT License
22 stars 20 forks source link

Make User Cards Smaller #57

Closed askvortsov1 closed 3 years ago

askvortsov1 commented 3 years ago

While it's convenient to reuse the full user card component, each one takes up way too much space IMO, which makes this extension inconvenient for viewing users. I think it would be nicer if a design like https://discuss.flarum.org/d/25386-group-list was adopted, and the full card was only shown on hover.

rafaucau commented 3 years ago

I have my own modification to this extension and it looks like this: image Maybe a design like this will be better than https://discuss.flarum.org/d/25386-group-list?

askvortsov1 commented 3 years ago

How does this look with a long bio?

davwheat commented 3 years ago

It might be an idea to make the cards expandable.

Maybe we show the first 20-50 chars of the bio and allow users to expand the card to show all info?

Expanding would make that individual card full width and as tall as needed.

rafaucau commented 3 years ago

It would be nice to be able to choose what to display on those little cards. E.g. Total points from fof/gamification, selected field from fof/masquerade, number of posts, etc. Full Bio could be displayed on the hover or something. And as @davwheat wrote, displaying only the first characters on cards

davwheat commented 3 years ago

Hmmmm... I'll see what can be done with ItemList to allow exts to add their own items (probably just steal direct from the core UserCard), then allow this ext to pick and choose exactly what items via the admin interface.

Might be tricky because of the forum/common/admin namespaces.

rafaucau commented 3 years ago

I can make a PR for this extension in which I rework these cards. It would be best to create a custom component that extends flarum/components/UserCard. The bio could be dropped from these cards. Bio would rather get in the way of such small cards and if someone wanted to read it they could click on the profile. The cards could show basic information like statistics on how many posts the user has made.

rafaucau commented 3 years ago

It would be nice if someone reviewed #67