Removes large pypi image in Slack link unfurling #17282
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One of my pet peeves is that sharing a pypi link in Slack embeds a tall image - this displays at most two pypi links on my 13" screen until the expansion is deleted by the user.
This PR prevents inclusion of the
og:image
meta tag when the user-agent represents the Slack link unfurler. It keeps the existing images for Twitter and other social network embeds.This PR also makes the following changes to the Twitter embed:
It's worth noting that if #2211 is implemented, this should be reverted, ideally with an image height constraint.
Despite it's simplicity, I'm not sure if adding to the project/release view context is the best approach for this. Would you prefer this to be a service?
I'm considering some further expansion to this - adding fields like the github repo link, downloads count and latest release date to the metadata (as seen in this example, using the
twitter:label1
/twitter:data1
meta properties).