Twitter quote-tweets not shown in oneboxes

Twitter oneboxes work well, except for quote tweets. In this case, the “parent” tweet is shown, but the quoted tweet is only shown as a link.

Would appreciate if someone could improve the oneboxing of quote tweets.

Quote tweet as displayed on Twitter:

Onebox:

11개의 좋아요

I like this suggestion, its a rather complex change, but wacking a pr-welcome on it for now in case anyone is feeling brave.

5개의 좋아요

I’ll try to make a PR to fix this. Will let you know

9개의 좋아요

Still working on it but let me know if you have any suggestions/comments :slight_smile:

13개의 좋아요

PR is in the oven here:

https://github.com/discourse/onebox/pull/407

@techAPJ is reviewing.

There are some minor CSS things @awesomerobot may want to look at as well. In general we don’t like using :hover and the rounded corners there look bigger than the ones on twitter, but that should be trivial to fix.

Overall this is looking great @jcalvento !

7개의 좋아요

PR looks awesome @jcalvento! :+1:

Added a small comment regarding code formatting, once that is done it’s ready for merge. :slight_smile:

4개의 좋아요

This change is now live :tada:

https://twitter.com/eviltrout/status/1145316639438716931

Thanks @jcalvento :trophy:

10개의 좋아요

Spacing seems extreme on mobile, can it be tightened up?

6개의 좋아요

I made some changes to improve overall quote styling.

https://twitter.com/Supermathie/status/1118334706439852032

IMO, there is still a minor scope to reduce space between

  • name/username and tweet body
  • quoted tweet and timestamp/likes/retweets

The space is coming from white-space: pre-line applied on tweet class. @awesomerobot can you have a quick look if there is some scope for further improvement?

11개의 좋아요

Still just wayyy too much space on mobile.

1개의 좋아요

Right, we need that so the whitespace in the tweet is formatted as it was posted… but it also causes the whitespace in the HTML to show up, so here I removed it in the template — this should fix it

https://github.com/discourse/onebox/commit/a5d3d60cddf56b50a3dbcd5893135aeadd7f6a1a

5개의 좋아요

Deployed the updated gem and the onebox looks much better!

Should we consider decreasing padding on the top of timestamp to 5px (from 10px)?

8개의 좋아요

Oh I think I missed some whitespace at the bottom… I think this will fix it

https://github.com/discourse/onebox/commit/cc4d02a3f7f8c54b154d8fa9cbdd741383da61e3

5개의 좋아요

I dunno, I think Arpit is right when he says

2개의 좋아요

Still too much whitespace here @awesomerobot

3개의 좋아요

Hmm, there’s still an extra return in the template I missed somewhere… but removing the padding will get rid of the space despite that.

https://github.com/discourse/discourse/commit/d841bff9f8630ecb7ed711907022ff15f8d45d38

5개의 좋아요