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.
The discussion revolves around improving how Twitter quote-tweets are displayed in Discourse oneboxes. Initially, only the parent tweet appeared, with the quoted tweet shown as a link ChrisBeach. sam welcomed a PR for this, which jcalvento took on. After several iterations and reviews, the PR was merged techAPJ, making quote tweets display correctly. However, feedback from codinghorror highlighted excessive spacing on mobile. techAPJ identified white-space: pre-line as the culprit, and awesomerobot fixed it by trimming template whitespace. Further tweaks were made to reduce padding around timestamps awesomerobot, but codinghorror noted residual whitespace. awesomerobot acknowledged a missed newline and adjusted padding to resolve the issue. The thread showcases collaborative refinement of UI/UX for quote-tweet oneboxing.
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.
I like this suggestion, its a rather complex change, but wacking a pr-welcome on it for now in case anyone is feeling brave.
I’ll try to make a PR to fix this. Will let you know
Still working on it but let me know if you have any suggestions/comments ![]()
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 !
PR looks awesome @jcalvento! ![]()
Added a small comment regarding code formatting, once that is done it’s ready for merge. ![]()
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
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?
Still just wayyy too much space on mobile.
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
Deployed the updated gem and the onebox looks much better!
Should we consider decreasing padding on the top of timestamp to 5px (from 10px)?
Oh I think I missed some whitespace at the bottom… I think this will fix it
https://github.com/discourse/onebox/commit/cc4d02a3f7f8c54b154d8fa9cbdd741383da61e3
I dunno, I think Arpit is right when he says
Still too much whitespace here @awesomerobot
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