Closed robdy closed 3 years ago
Is this how the new system works in reddit?
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.
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
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:
@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.
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)
I'll drop here the notes about what we need to switch to emoji-based user flair:
For background compatibility add in the stylesheet:
span.flairbase.flairrichtext.flair {height: 30px; color: #555555 !important} span.flairemoji {height: 30px; width: 30px}