hodgesmr / mastodon_digest

A Python script that aggregates recent popular posts from your Mastodon timeline
BSD 3-Clause "New" or "Revised" License
439 stars 58 forks source link

Posts limited to 150px height #37

Closed moonhouse closed 1 year ago

moonhouse commented 1 year ago

At some point the embedded posts all started to render for me with a 150px height for each iframe which means I have to go and scroll within each iframe to be able to read the contents of each post. This is running a Docker image built from d91876afe51f686ae2ca607d51575194e862f1ad (but I also had this problem in version 0.0.12 which I ran until today).

The small, fixed height makes essentially all posts cut off (if they are longer than one line of text). Since I think this happened without me having updated Mastodon Digest, maybe this is caused by some change in cross-origin behavior in more recent Mastodon versions?

In worst case I can adjust the stylesheet locally to have a chosen height value for iframe.mastodon-embed that works for most posts so I don't have to scroll in each iframe but just the overly long ones. (At the cost of making short posts be unnecessarily long). But it would be nice to have each post have just the right height needed.

Example: Post from the @Mastodon@mastodon.social account shown in the digest cutting of at the third line

Here is the computed layout in two browsers.

Chrome (version 111.0.5563.64 running on version 12.5.1 of MacOS):

Computed style shown in Chrome with the innermost part shown as 400x150 pixels

Safari (version 15.6.1 running on version 12.5.1 of MacOS): Computed style shown in Safari with the innermost part shown as 400x150 pixels

hodgesmr commented 1 year ago

Great catch. The post layout is largely constructed by an external javascript file embed.js in the Mastodon main repository. At some point, the file went from being hosted at https://static-cdn.mastodon.social/embed.js to https://mastodon.social/embed.js. I've updated the src ref in https://github.com/hodgesmr/mastodon_digest/commit/be987415d8230f1a33c20fae5bd60aa95f1daaec and is release tag 0.3.1.

moonhouse commented 1 year ago

Thank you!