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

feat: add tweet element #228

Merged
merged 5 commits into from
Mar 30, 2022
Merged

feat: add tweet element #228

merged 5 commits into from
Mar 30, 2022

Conversation

Fweddi
Copy link
Contributor

@Fweddi Fweddi commented Mar 23, 2022

What does this change?

Old tweet element:

image

New tweet element (as rendered in ProseMirror):

image

Notes

  1. This element is one of two ways of embedding tweets. If you choose to embed a tweet element using Twitter's embed code, you will get a generic Embed element, which has a rich preview. If you choose to embed a tweet element using a Twitter url, you will get a Tweet element powered by Embedly, which has a very basic preview (as above). Even though the preview looks worse, we recommend users use the Tweet element over the generic Embed element, as Embedly is more likely to support any third-party changes.

  2. We are dropping the caption field. This is because in a sample of a few hundred tweet elements, we did not see any caption fields present. It was likely never important - the field was not being persisted in the flexible model for the Tweet element fields, though it may have been surfacing in the generic Element fields. We are keeping the caption field in the data model, so that it is backwards compatible with any elements that may have had this field, but we are silently dropping the ability to create new captions.

How to test

See if you can create a tweet element in the demo file. Run the new fixture test for the tweet element.

How can we measure success?

The element replicates the previous element as closely as possible (with noted upgrades).

@Fweddi Fweddi changed the title Add tweet element feat: add tweet element Mar 23, 2022
@Fweddi Fweddi marked this pull request as ready for review March 25, 2022 10:34
@Fweddi Fweddi requested a review from a team March 25, 2022 10:34
Copy link
Contributor

@jonathonherbert jonathonherbert left a comment

Choose a reason for hiding this comment

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

LGTM. One non-blocker that might dry up some code. If it makes sense to you I'll wait for the PR in flex before approving, just to save us another PR if something crops up there.

@Fweddi Fweddi merged commit 6bd7cda into main Mar 30, 2022
@Fweddi Fweddi deleted the fp/jh/add-twitter-element branch March 30, 2022 15:16
@github-actions
Copy link
Contributor

🎉 This PR is included in version 4.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants