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

[Embeds] Embed for single post #3450

Merged
merged 28 commits into from
Apr 13, 2024
Merged

[Embeds] Embed for single post #3450

merged 28 commits into from
Apr 13, 2024

Conversation

mozzius
Copy link
Member

@mozzius mozzius commented Apr 8, 2024

Stacked on #3448

This PR adds support for embedding a single post. It takes an AT URI in the search parameters, and supports rich text and embeds

Screenshot 2024-04-09 at 00 00 55

Test plan

  1. Start the dev server (cd bskyembed and yarn dev)
  2. Find the AT URI of a post you want to test (I do this by opening the network tab, clicking on a post, then searching for getPostThread - it's passed as a query string)
  3. Add ?uri=<at-uri> to the query string (i.e. http://localhost:5173/?uri=at://did:plc:wqwdm7xgynf7amclnjfhvncr/app.bsky.feed.post/3kpvyeesjry2o)
  4. Test all kinds of posts you can think of - different combinations of embeds, complicated facets etc

@mozzius mozzius changed the base branch from main to samuel/embeds April 8, 2024 22:46
Copy link

github-actions bot commented Apr 8, 2024

Old size New size Diff
6.4 MB 6.4 MB 0 B (0.00%)

@mozzius
Copy link
Member Author

mozzius commented Apr 9, 2024

Image embeds

Screenshot 2024-04-09 at 14 09 45
Screenshot 2024-04-09 at 14 09 29
Screenshot 2024-04-09 at 14 09 01
Screenshot 2024-04-09 at 14 08 36
Screenshot 2024-04-09 at 14 08 18

@mozzius
Copy link
Member Author

mozzius commented Apr 9, 2024

external embed

Screenshot 2024-04-09 at 14 28 03

@mozzius
Copy link
Member Author

mozzius commented Apr 9, 2024

Quote post (+ with media)

Screenshot 2024-04-09 at 14 46 48
Screenshot 2024-04-09 at 14 46 09
Screenshot 2024-04-09 at 14 42 19

@mozzius
Copy link
Member Author

mozzius commented Apr 9, 2024

Lists and feeds
Screenshot 2024-04-09 at 15 19 38
Screenshot 2024-04-09 at 15 12 42

@mozzius
Copy link
Member Author

mozzius commented Apr 9, 2024

PWI opt out

Screenshot 2024-04-09 at 16 49 23
Screenshot 2024-04-09 at 17 37 08

bskyweb/static.go Outdated Show resolved Hide resolved
@mozzius mozzius marked this pull request as ready for review April 9, 2024 16:18

// Case 3.6: Post blocked
if (AppBskyEmbedRecord.isViewBlocked(record)) {
return <Info>The quoted post is blocked</Info>
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to give more context on what "blocked" means? Might be confusing for someone who doesn't use Bluesky, but idk.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I went back and forth on this but I wasn't able to summarise the rather complex behaviour at play here 😅 open to suggestions

Copy link
Contributor

Choose a reason for hiding this comment

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

Ha yea notice I didn't give a suggestion 😅 not really sure how to word this either based on the actual behavior but also trying to be relatively simple for outsiders.

bskyembed/src/main.tsx Outdated Show resolved Hide resolved
@mozzius mozzius changed the base branch from samuel/embeds to main April 10, 2024 15:36
@mozzius mozzius mentioned this pull request Apr 11, 2024
if (pwiOptOut) {
return (
<Info>
The author of this quoted post has requested their posts not be
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the locale be configured via the embed? Or is the locale of the post gonna be used?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question, I'll add to the trello

@mozzius mozzius force-pushed the samuel/embeds-2 branch 2 times, most recently from 05fe8b9 to 65bca74 Compare April 12, 2024 14:55
Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

amazing

@gaearon gaearon merged commit 8e29b1f into main Apr 13, 2024
6 checks passed
@gaearon gaearon deleted the samuel/embeds-2 branch April 13, 2024 01:07
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.

5 participants