pokemontrades / flairhq

A small project to allow easy adding of flair applications for subreddits (focusing initially on /r/pokemontrades) and easy moderation for moderators.
Apache License 2.0
11 stars 9 forks source link

Change to emoji-based flair system #646

Closed robdy closed 3 years ago

robdy commented 6 years ago

I'll drop here the notes about what we need to switch to emoji-based user flair:

AlMcKinlay commented 4 years ago

Is this how the new system works in reddit?

SnowPhoenix commented 4 years ago

Yeah, images in flair are handled as "emoji" in new Reddit. That's what the update I've been working on is for. The code for handling them on old Reddit has already been added to the CSS.

AlMcKinlay commented 4 years ago

Ok, cool. So adding this should be easy to be backwards compatible if it's already on the CSS then. I presume it's a different API call? Almost entirely backend changes, right? I guess we'll probably want to change the frontend to use the same as the css on the sub as well though

pkmnbumba commented 4 years ago

Just to add, looks like we need to move on from using css_class for emojis if we want flairs to show up. Did some minor testing, and it looks like as long as we have emojis in the correct format (:emoji:), then it'll show up on the Reddit App, redesign, and old reddit. css_class is only used for old reddit.

Browsers on mobile won't display (instead it will show up as :text:), but its better than nothing displaying at all.

We'll have to update:

Raia commented 4 years ago

@pkmnbumba I don't think we should get rid of css_class support entirely. We should preserve the functionality for old Reddit, and I think the CSS class should be the main source of truth if there is ever any discrepancy between a user's CSS flair class and what they have in their text.

pkmnbumba commented 4 years ago

Adding here from discussion today that css_class takes precedence over flair_text (not really relevant to what is programmed in FHQ, but could be useful knowledge for later)