Mobile user-cards

theme-component

(Joe) #1

This is a theme component that will allow you to show user-cards on mobile devices.

Github repository link:
https://github.com/hnb-ku/Discourse-mobile-user-cards

Demo
https://theme-creator.discourse.org/theme/Johani/mobile-user-cards


Samples:

Regular card

Card in a topic with a lot of posts


How do I install this component?

Follow the theme installation guide and add the theme component to your active themes.

If you’re new to Discourse themes, you can learn more about them here


Make the badge boxes for user card larger [mobile]
(Jeff Atwood) #2

I am not really sure this should be a theme component, perhaps we should make it the new default behavior? What do you think @sam?


(Sam Saffron) #3

Maybe, @Johani can you enable this on all the themes on meta so we can try it out


(Joe) #4

The component is now enabled on all themes here on meta :+1:


(Sam Saffron) #5

I find the visuals fantastic, but don’t think the mechanics are quite right. On mobile we have extreme limited space so a modal with modal behavior makes much more sense. Also, on slow connections there is a large period of time where there is no visual feedback, it is easy to click again and head to user page.

I think that once we refine this we should move it to core!


(Christoph) #6

I’m using a dark theme (grey Amber, to be precise) and I think the user card could be bezter distinguishes from the background. If you’re not aware of the existence of usercards and you accidentally touch someone’s avatar, what you see looks a bit like a UI bug…


(Dave McClure) #7

Love this!

A couple small tweaks to suggest:

  1. I could imagine taking a bit of inspiration from the new slide out menus (e.g. for the hamburger menu), and darkening the rest of the site when the user card is displayed.
  2. Similarly, I can imagine having the location be fixed, always popping up in the middle of the screen, rather than relative to the clicked avatar.

(Dan Mc Grath) #8

Brilliant feature. Nice work!


(Dave McClure) #9

Just noticed here on meta: when I click outside the card to dismiss it, my click makes it through to whatever is beneath that area, often with unexpected results.

For instance, I popped up a user card on the topic list. When I clicked outside to dismiss, I ended up opening some random topic, when I wanted to just get back to the list and keep browsing.


(Sam Saffron) #10

Same I was just about to report this, easiest repro is to open the card on a post with a lightboxed image, then there is often a giant click target behind and it is super easy to open the light box


(Chaboi_3000) #11

After fixing some issues, I feel like this should go into core.


(Jeff Atwood) #12

Yes that is the plan, as previously stated in earlier posts.