Twitter 引用推文未在一键框中显示

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 正在这里准备中:

@techAPJ 正在审查。

还有一些细微的 CSS 问题,@awesomerobot 可能也想看看。一般来说,我们不太喜欢使用 :hover,而且那里的圆角看起来比 Twitter 上的更大,但这应该很容易修复。

整体来看效果很棒,@jcalvento

7 个赞

PR 看起来太棒了 @jcalvento:+1:

添加了一条关于代码格式的小评论,完成后就可以合并了。:slight_smile:

4 个赞

此更改现已上线 :tada:

感谢 @jcalvento :trophy:

10 个赞

移动端上的间距似乎过大,能否调紧凑一些?

6 个赞

我进行了一些 更改修改,以改进整体引用样式。

在我看来,仍有少量空间可以进一步减少以下部分之间的间距:

  • 姓名/用户名与推文正文之间
  • 被引用的推文与时间戳/点赞/转发之间

这些间距来自于应用于 tweet 类的 white-space: pre-line 样式。@awesomerobot 你能快速查看一下是否还有进一步优化的空间吗?

11 个赞

在移动设备上仍然占用过多空间。

1 个赞

没错,我们需要它来保持推文中原有的空格格式……但它也会导致 HTML 中的空格显示出来。因此,我在此处从模板中移除了它——这应该能解决问题。

5 个赞

已部署更新的 gem,onebox 看起来好多了!

我们是否可以考虑将时间戳顶部的内边距从 10px 减小到 5px

8 个赞

哦,我想我在底部漏掉了一些空格……我觉得这应该能修复它

5 个赞

我不知道,我觉得当 Arpit 说

2 个赞

这里的空白还是太多了 @awesomerobot

3 个赞

嗯,模板中我还在某处漏掉了一个多余的换行……不过即使如此,移除内边距也能消除那个空白。

5 个赞