Repository navigation
docs: replace live tweet embeds with static copies - #7703
Conversation
Ports #7698 to v11/www: a StaticTweet component replaces the react-tweet embed in the server actions post and the twitter-tweet blockquotes on the testimonials page, and react-tweet, X's widgets.js and docusaurus.twitterReload.js go. Co-authored-by: Alex / KATT <[email protected]>
The old-docs copy converts v11/www's <StaticTweet> into a static card styled by .tweet, instead of turning react-tweet embeds into links or a note that the post was deleted. Recopies the server actions post and the v11, v10 and v9 testimonials pages. Co-authored-by: Alex / KATT <[email protected]>
…weets Ports #7698's restyle to v11/www: StaticTweet looks like a classic embedded tweet, links its author and the tweet on twitter.com, deleted or not, and takes the tweet's id instead of a URL. Co-authored-by: Alex / KATT <[email protected]>
The old-docs copy's <StaticTweet> cards get trpc.io's Twitter-style markup and styles: the bird, the author linking to their profile, the time as embeds show it, and the timestamp and "Read more on Twitter" linking to the tweet on twitter.com. Recopies the server actions post and the v11, v10 and v9 testimonials pages. Co-authored-by: Alex / KATT <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
The v12 version of #7698. v12's site (
next/www) has no live Twitter embed, but its copies of trpc.io's Using Server Actions with tRPC post and Testimonials pages (v11, v10, v9), generated fromv11/wwwbyold-docs:copy, inherited the problems: Dan Abramov's deleted tweet showed as a "Post deleted" note, and the testimonials were rawtwitter-tweetblockquotes witht.colinks.Changes
v11/www: docs: replace live tweet embeds with static copies #7698's changes, byte-for-byte.StaticTweetcomponent styled like a Twitter embedded tweet replaces thereact-tweetembed and thetwitter-tweetblockquotes.react-tweetis removed fromv11/www/package.jsonandv11/pnpm-lock.yaml. The lockfile change is removals only:react-tweet,swranduse-sync-external-store.widgets.jsanddocusaurus.twitterReload.jsare removed too.next/www/build/old-docs-convert.ts:<StaticTweet>, alone or in the<div>that lays it out, becomes the same card in HTML. It replaces the react-tweet conversion and thedeletedTweetslist, and is tested inold-docs-convert.test.ts.12:58 AM · Feb 10, 2024, UTC) and "Read more on Twitter". Both link to the tweet on twitter.com, deleted or not, and gone tweets also get an "Archived copy" link.next/www/src/styles.css:figure.tweet, the same styles as trpc.io's, in light and dark mode (.dark).blog/trpc-actions.md,v11/docs/community/love.md,v10/docs/community/love.mdandv9/docs/love.md. No other wording changes.Tweets and where their content came from
Same content as #7698. No content was written by hand, and every timestamp matches the one encoded in the tweet's ID.
react-tweetAPI response the embed used: https://web.archive.org/web/20240526122424/https://react-tweet.vercel.app/api/tweet/1756120297529368801og:descriptionmatches the embed fallback already on the page: https://web.archive.org/web/20220808123409/https://twitter.com/ralex1993/status/1556619478556876802cdn.syndication.twimg.com/tweet-result), matching the embed fallback text already on the pageVerified with
pnpm check,pnpm typecheck,pnpm vp test run www/,old-docs:checkandpnpm docs:build.Need help on this PR? Tag
@codesmith-botwith what you need.