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

Include oEmbed data in Social Network Post embed modals #349

Open
10 tasks done
rpeterman-gp opened this issue Oct 27, 2016 · 0 comments
Open
10 tasks done

Include oEmbed data in Social Network Post embed modals #349

rpeterman-gp opened this issue Oct 27, 2016 · 0 comments

Comments

@rpeterman-gp
Copy link
Contributor

rpeterman-gp commented Oct 27, 2016

Similarly to Video embeds (Issue #348), embeds for social network posts act as a 1:1 reference to data on a provider network. oEmbed data from these providers can be used to populate title data, and gather appropriate embed code markup for embedding the post. Currently the embed code we are generating for these types of embeds are incomplete, usually providing just and empty <a> tag with href pointing to the post. For distributions where javascript doesn't get run, the embed is basically useless.

What our Twitter Embed generates for tweets currently:

<blockquote class="twitter-tweet" data-lang="en">
    <a href="https://twitter.com/PRI/status/791729531602210816"></a>
</blockquote>
<scipt async src="//platform.twitter.com/widgets.js" charset="utf-8""></script>

Ideally embed code should provide usefully, readable fallback content for when javascript does not run.

Also, editing of the posts' URL's should be prevented after being saved to the platform. Changing a social post embed's URL after being saved is equivalent to removing the embed from the system and replacing it with a new one, which can have unexpected consequences in regards to the original post's usage in context with the content it was embedded into.

TODO:

  • Facebook Embed
    • Prevent editing of URL after first save
    • Get oEmbed data from provider's endpoints appropriate for post type, Post or Video.
    • When oEmbed data lacks title key, parse embed HTML for title and construct a title with it and author name, if a title has not already been entered by user.
  • Twitter Embed
    • Prevent editing of URL after first save
    • oEmbed data will provide embed code that is complete. Currently we are only rendering a link anchor without text of the tweet.
  • Instagram Embed
    • Prevent editing of URL after first save
    • oEmbed data will provide embed code that is complete. Currently we are only rendering a link anchor without text.

If provider's oEmbed API does not support jsonp callback options, use (Noembed)[https://noembed.com/] until an in-house oEmbed API endpoint can be built. If the provider is not supported by Nombed, omit oEmbed data and generate embed code locally until either (1) the in-house oEmbed API is built, or (2) provider's oEmbed API supports jsonp callbacks.

@rpeterman-gp rpeterman-gp self-assigned this Oct 27, 2016
rpeterman-gp added a commit that referenced this issue Nov 1, 2016
Issue #349
- Added oEmbed data
- Prepopulate title with oEmbed data if no title has previously been
entered
- Unified spelling of event handler params in most embed types
rpeterman-gp added a commit that referenced this issue Nov 2, 2016
Issue #349
- Added oEmbed data from Twitter API to Twitter embed model
- Twitter embed modal now constructs a titel with oEmbed data if a title
has not already been entered
- Twitter embed URL's are no longer editable after being added.
- Added `embedCode` key to clean model of Facebook embed.
rpeterman-gp added a commit that referenced this issue Nov 2, 2016
Issue #349
- Instagram embed models now include oEmbed data
- Instagram embed modals now construct titles from oEmbed data, if one
has not already been entered.
- Updated toolbar positioning logic to allow each embed type to define a
selector to get a locator container.
- Added `src/js/templateCache.js` to .gitignore
rpeterman-gp added a commit that referenced this issue Nov 3, 2016
Issue #349
- Updated embed rendering to add object_type as a class to embed
container element for embed type layout styling.
- Added min-widths to Facebook, Twitter, and Instagram embed container
styling.
- Social post embeds should no longer run title generation when title is
already provided.
- Updated embed container positioning styles to not float embed on
screens smaller than a tablet.
rpeterman-gp added a commit that referenced this issue Feb 28, 2017
rpeterman-gp added a commit that referenced this issue May 1, 2017
Issue #349
- Updated duplication check logic in social and video embeds to check
that the URL on the item returned by the API match the new embed's URL
before adding its object_id to the model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant