Update html_for_tweet to support extended tweets #429
No reviewers
Labels
No labels
Bug
Enhancement
Feature Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: code/twython#429
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "extended-tweet"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Based on the documentation at https://dev.twitter.com/overview/api/upcoming-changes-to-tweets I've added support to Twython.html_for_tweet to support extended tweets (both in compat and extended modes).
A couple of notes on my interpretation of the docs,
the prefix and suffix regions should not be rendered as part of the display text region. Docs indicate that these "must instead be rendered as metadata" and there is an example of how replies (in prefix) can be rendered.
New css classes
twython-tweet-prefixandtwython-tweet-suffixdenote their respective regions and will allow devs to style or hide these regions where required.I've created some demos (from the sample JSON payloads in twitterdev/tweet-updates + custom css) to demonstrate how the extended tweets can look like.
http://codepen.io/anon/pen/vXyBLW?editors=1000
Coverage increased (+0.5%) to 56.585% when pulling
c57c4bfc34on ping:extended-tweet into975095d8d2on ryanmcgrath:master.Hm. I concur with the code changes. As far as how it's displayed, do you think this is a good solution?
@philgyford opinions?
I'm perfectly fine with the presentation.
I think it looks fine, well done @ping.
For something that seems so simple, tweets sure are getting complicated!