Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[Work In Progress] Full Article Rendering Support #1048
Mostly I want to get people's opinion on this feature I've added to my fork at friendcamp/mastodon. I would like feedback on this both in terms of the implementation of the feature for users, the technical implementation, and also whether Glitch would want this.
The end result
The idea is to provide a "read article" link similar to "read more" when Mastodon receives an AP object of
How it appears in timelines and on profiles:
How it appears when you click to see the full article on a phone:
Here's how the full article renders (looooong screenshot so not embedded)
This is my first time adding a column to a table in Rails. I'm probably doing something wrong in terms of database design. My implementation generally feels a little "hacky" and I'm sure there are more elegant solutions. I'm happy to implement these if someone will suggest to me what they are.
I've made a new
A note on images
Inline images for posts are cached locally the moment the object is received by the server, so user IPs aren't exposed when they read an article with images on their client. I use the same mechanism that already exists for creating media attachments.
i had been thinking about how to add this, and i figured that a modal would be the best (at least for me) way to display articles (and long posts in general). that way you can still get the full reading experience without feeling crammed into one column on a large display
Thank you! As @ashkitten said, I think a modal could make more sense, to view the article independently and not have its width restricted to that of a Mastodon column.
I have another concern wrt. handling HTML tags from articles, I fear we may somehow lag behind in term of implementing support for what I expect could be a wider range of HTML than for notes… but maybe I'm wrong, and that range won't necessarily be larger. And maybe even if it is, we could detect it dynamically and offer a link fallback.
Otherwise, this seems good, but I have not looked at the code yet.