Email or username:

Password:

Forgot your password?
dansup

Displaying @pixelfed post captions in our app must be easy, right?

Not really! I recently refactored this, and it's becoming quite complex.

Each caption is rendered using a pipeline of the following steps:

Normalize > Tokenize > Autolink > EntityRenderer > Accessibility > Read more > Style

When you tap on a mention, we check to see if it's remote (even if it's just the @ username), and use clever logic to load the profile even if the server doesn't know it yet.

Much better now, shippin soon

6 comments
dansup

@pixelfed When you tap on a link, we check your preferences and open the link in your preferred browser (styled in dark or light mode).

We're adding a new accessibility setting to disable motion, so avatars, custom emojis and gifs will display a static, non moving image.

When you tap on a custom emoji, you'll be able to view a full screen version! This is new and will be shippin soon!

Emelia πŸ‘ΈπŸ»

@dansup @pixelfed I really wish activitypub supported tokens in text content with offsets, instead of needing to parse HTML for figuring out what exists in the text, imo, it'd make this logic a lot easier

dansup

@thisismissem @pixelfed Yeah for sure, Pixelfed used to store twitter-text entities for every status (we'd strip tags, and re-autolink and capture entities).

I never really used them though, and they used a non-trivial amount of database space so I stopped generating them.

Emelia πŸ‘ΈπŸ»

@dansup @pixelfed yeah? I'm sure storage can be made more efficient, but idk, sharing html snippets around never felt quite right to me

Emelia πŸ‘ΈπŸ»

@dansup @pixelfed also keep in mind not all fediverse platforms autolink the same way, e.g., lemmy or kbin use ! for something iirc

Go Up