Skip to content

Add X.com embed support and fix deprecated string refs in Twitter block#1245

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-twitter-add-x-com-embed
Draft

Add X.com embed support and fix deprecated string refs in Twitter block#1245
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-twitter-add-x-com-embed

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 21, 2026

Twitter rebranded to X.com, so x.com tweet URLs were silently unhandled. The existing Twitter block also used deprecated React string refs (this.refs.ref), broken in modern React.

Changes

  • Routing (routeToBlock.ts): Added x.com, www.x.com, and www.twitter.com as aliases routing to the existing routeTwitter handler
  • Tweet block (blocks/tweet/index.tsx): Replaced deprecated string ref with React.createRef<HTMLDivElement>()
  • Storybook (stories/ReactEmbed.stories.tsx): Added an x.com tweet URL to the examples list
// Both now work
<Embed url="https://twitter.com/user/status/123" />
<Embed url="https://x.com/user/status/123" />

Copilot AI linked an issue Apr 21, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix Twitter and add x.com embed support Add X.com embed support and fix deprecated string refs in Twitter block Apr 21, 2026
Copilot AI requested a review from streamich April 21, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Twitter and X.com

2 participants