Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce twitter_timeline liquid tag (#7605) #10825

Merged
merged 1 commit into from Oct 30, 2020

Conversation

rafaltrojanowski
Copy link
Contributor

@rafaltrojanowski rafaltrojanowski commented Oct 13, 2020

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

This PR introduces a new twitter_timeline liquid tag. See #7605

Related Tickets & Documents

Closes #7605

QA Instructions, Screenshots, Recordings

  1. Go to /new
  2. Create article with following content:
    {% twitter_timeline https://twitter.com/FreyaHolmer/timelines/1215413954505297922 %}
  3. Click 'Preview'
  4. Click 'Save'.

Screen Shot 2563-10-15 at 11 45 39

Added tests?

  • yes
  • no, because they aren't needed
  • no, because I need help

Added to documentation?

  • docs.forem.com
  • readme
  • no documentation needed

alt text

@pr-triage pr-triage bot added the PR: draft bot applied label for PR's that are a work in progress label Oct 13, 2020
@rafaltrojanowski rafaltrojanowski marked this pull request as ready for review October 13, 2020 11:42
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: draft bot applied label for PR's that are a work in progress labels Oct 13, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rafaltrojanowski thanks for kickstarting this.

A few notes:

  1. I can't see it in Firefox 82, mostly because the browser's builtin content blocking blocks it:

The resource at “https://platform.twitter.com/widgets.js” was blocked because content blocking is enabled

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Privacy/Tracking_Protection

I tried to disable the "Enhance tracking protection" feature for the website, and it worked, but we have to be aware that Firefox users may never see the timeline and not know they aren't seeing it. Is there an option B to render the timeline?

  1. The timeline widget is too long, this is as long as the timeline on Twitter, we might need to add scrollbars otherwise the vertical size of the article can go on forever. An example:

Screenshot_2020-10-13 test twitter timeline - DEV(local) Community 👩‍💻👨‍💻

cc @ludwiczakpawel

app/javascript/article-form/components/Preview.jsx Outdated Show resolved Hide resolved
app/liquid_tags/twitter_timeline_tag.rb Outdated Show resolved Hide resolved
app/liquid_tags/twitter_timeline_tag.rb Outdated Show resolved Hide resolved
@ludwiczakpawel
Copy link
Contributor

Hey @rafaltrojanowski (cześć! 🇵🇱)

It does seem like we need to limit the height of this liquid tag to avoid situations thatx @rhymes mentioned. I think the most sensible way to do it is to go with either overflow-y: auto OR some fadeout effect similar to what we have in github liquid tag or long comments in feed:

Github liquid tag fadeout (source):

image

Comments fadeout:

image

It would be also good to wrap this entire block with .crayons-card container so it looks more... umm.. wrapped..? :)

@rafaltrojanowski rafaltrojanowski changed the title Introduce tweet_timeline liquid tag (#7605) Introduce twitter_timeline liquid tag (#7605) Oct 14, 2020
@rafaltrojanowski
Copy link
Contributor Author

Cześć @ludwiczakpawel

I've added styling updates based on Github liquid tag, please have a look:

Screen Shot 2563-10-15 at 11 45 39

Copy link
Contributor

@ludwiczakpawel ludwiczakpawel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers, looking good from my perspective!

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 15, 2020
Copy link
Contributor

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this out locally and it works great! Thanks so much for the pull request @rafaltrojanowski! 🚀

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Oct 15, 2020
@rafaltrojanowski
Copy link
Contributor Author

Hey @rhymes

Unfortunately, I didn't have a chance to look into the problem on Firefox yet, maybe it could be tacked in a separate PR?
Currently, I don't have an alternative solution in mind.

@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Oct 19, 2020
@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 20, 2020
@rhymes rhymes merged commit 4bc8b80 into forem:master Oct 30, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Oct 30, 2020
@rafaltrojanowski rafaltrojanowski deleted the feature-twitter-timeline branch October 30, 2020 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Twitter timeline support
6 participants