User Card Directory

Yeah, I’m not yet convinced that’s actually happening, but would be delighted if I were wrong.

On Directory:

On solitary card clicked up from Topic list:

image

Perhaps I’m missing a best practice here, not sure.

https://github.com/paviliondev/discourse-follow/blob/679e0ed098ce2b1d8cb0e3e0cbf43383d782be16/assets/javascripts/discourse/connectors/user-card-metadata/follow-statistics-user-card.hbs#L1

2 Likes

I suspect it’s being caused by this:

https://github.com/paviliondev/discourse-follow/blob/master/assets/javascripts/discourse/components/follow-statistic.js.es6#L11-L16

I’m not entirely sure what this code is trying to achieve… but it looks like it’s looking up .card-content .metadata, and then appending itself? to every matching element :thinking:

If you use a standard ember computed property, I think things will work much better.

6 Likes

Aha! That’s a very helpful line of enquiry, thank you. I’ll take a look at refactoring that.

5 Likes

User Card Directory seems to have lost the ability to filter by username. When the component is enabled, typing in the search field has no effect.

When the component is disabled, filtering works as expected.

5 Likes

I am able to replicate this issue. Filtering by group works, but filtering by username has no effect.

3 Likes

This is done, Follow Plugin 👨 should now work with this TC.

4 Likes

Hey. The user cards are beautiful. Thanks for making this.
Can we add an option that hides the user statistics?

1 Like

I’m seeing—I’m guessing here—something wrong with string translations?

https://forum.moversmindset.com/u

2 Likes

Thanks @craigconstantine, we have a fix in the pipeline. I’ll let you know once it’s merged and ready for you to update.

5 Likes

The fix is now merged. @craigconstantine please can you try updating the theme component, and let us know how you get on.

@Green_Your_Lab, this recent change allows the statistics to be customized (using the :wrench: button at the top of the directory), and also adds a theme setting to disable the statistics altogether if you prefer.

3 Likes

…it’s fixed.Thanks!

2 Likes

Looks great! Nice work.

Seeing the new user list nav at the top is making me wish for a card/list toggle. Is such a thing possible?

I know this is extra icing, but I’d love some more configurability, to e.g. not show badges but to show groups. And to display/hide other user details like birthday, location and timezone. And to not show myself twice in user lists. This is dependent on the main user list functionality, however…

2 Likes

Awesome. Thanks.
I’ve used unchecked the user statistics on the component and also using the tool icon. But it still shows:
image

Any options to get rid of the posted and read time?

1 Like

Did you do a hard refresh in your web browser? I noticed this too.

I also noticed that fields can show up twice in user cards if you have the custom user field set to “show on user card”.

1 Like

Certainly possible, but would require a fair bit of refactoring. Right now this component literally replaces all the template code for the regular user directory.

This is currently possible via CSS, and we could potentially automate those CSS changes via some theme settings.

There’s a theme setting to hide the current user, which should help with that issue

By “User statistics”, I mean the bar along the bottom of each user card. See the screenshot in the OP for an example. In your screenshot, it looks like the statistics bar is not present.

As in, it will appear on the user card, and also in the ‘statistics’ at the bottom of the card? If it’s already on the user card, then I’d suggest removing it as one of the statistics (using the :wrench:)

2 Likes

Yes, that makes sense. Or deselect the “show on user card” setting for the user field.

It’s not possible apparently to not show any of the statistics columns and only display the cards without any statistics. This is not a problem, just something I noticed. :slight_smile:

1 Like

There is a theme setting which should be labelled “show statistics under each user card”. If you turn that off, the bar at the bottom should completely disappear.

Admittedly it is confusing for this to be buried in the theme settings, while the column selection is available right there on the directory page… but we’re kinda limited by the theme component framework there. :cry:

2 Likes

Since the list view has become more useful (New Leaderboard/User Directory Features 🎉), would you consider adding a button that allows users to switch between the list view and the card view?

8 Likes

There is now a toggle, and the default view can be configured in the theme component’s settings. I’ve installed it here on Meta, and set the default view to “table”. If you visit https://meta.discourse.org/u, you should now see a toggle in the top right

5 Likes

This works well in the desktop view, but the button to switch back from table view to card view is missing in mobile view.

2 Likes