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

Pinned posts #5055

Merged
merged 19 commits into from
Sep 27, 2024
Merged

Pinned posts #5055

merged 19 commits into from
Sep 27, 2024

Conversation

mozzius
Copy link
Member

@mozzius mozzius commented Aug 31, 2024

Dependant on bluesky-social/atproto#2771 Ready to go!

  • Allows a user to pin and unpin a single post to the top of their profile feed
  • Pinning a second post replaces the original
  • Adds a ReasonPin reason, which custom feeds can also use if they want to indicate a post is pinned
Screenshot 2024-09-28 at 00 07 16

Copy link

render bot commented Aug 31, 2024

Copy link

github-actions bot commented Aug 31, 2024

Old size New size Diff
9.81 MB 9.81 MB -21 B (-0.00%)

@mozzius mozzius force-pushed the samuel/pinned-posts branch from 7e1a414 to 6df7a66 Compare September 25, 2024 14:25
@arcalinea arcalinea temporarily deployed to samuel/pinned-posts - social-app PR #5055 September 25, 2024 14:25 — with Render Destroyed
@arcalinea arcalinea temporarily deployed to samuel/pinned-posts - social-app PR #5055 September 25, 2024 15:41 — with Render Destroyed
@arcalinea arcalinea temporarily deployed to samuel/pinned-posts - social-app PR #5055 September 25, 2024 15:54 — with Render Destroyed
@arcalinea arcalinea temporarily deployed to samuel/pinned-posts - social-app PR #5055 September 25, 2024 15:59 — with Render Destroyed
@mozzius mozzius marked this pull request as ready for review September 25, 2024 15:59
Copy link
Member

@estrattonbailey estrattonbailey left a comment

Choose a reason for hiding this comment

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

Fire, great work! Let's give it another pass once appview gets in before merging, but LGTM

}: {
postUri: string
postCid: string
action: 'pin' | 'unpin'
Copy link
Member

Choose a reason for hiding this comment

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

Nice, dig the action

Copy link
Member Author

Choose a reason for hiding this comment

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

I always get confused by boolean args

@mozzius
Copy link
Member Author

mozzius commented Sep 26, 2024

yep, gotta get the new lexicons in first

@mozzius mozzius force-pushed the samuel/pinned-posts branch from 0bcb0fe to 30fe75c Compare September 27, 2024 20:35
@arcalinea arcalinea temporarily deployed to samuel/pinned-posts - social-app PR #5055 September 27, 2024 20:35 — with Render Destroyed
@arcalinea arcalinea temporarily deployed to samuel/pinned-posts - social-app PR #5055 September 27, 2024 20:38 — with Render Destroyed
@arcalinea arcalinea temporarily deployed to samuel/pinned-posts - social-app PR #5055 September 27, 2024 20:40 — with Render Destroyed
@arcalinea arcalinea temporarily deployed to samuel/pinned-posts - social-app PR #5055 September 27, 2024 20:47 — with Render Destroyed
@arcalinea arcalinea temporarily deployed to samuel/pinned-posts - social-app PR #5055 September 27, 2024 20:55 — with Render Destroyed
Copy link
Contributor

@haileyok haileyok left a comment

Choose a reason for hiding this comment

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

party time

if (!isReply) return true
if (isRepost) return true
if (isRepost || isPin) return true
return isReply && isAuthorReplyChain(this.params.actor, post, feed)
Copy link
Contributor

Choose a reason for hiding this comment

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

think we could change this to rm the isReply &&

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm really confused by the logic so I'm just not gonna touch it 😅

@@ -106,7 +108,9 @@ let PostDropdownBtn = ({
const {_} = useLingui()
const defaultCtrlColor = theme.palette.default.postCtrl
const langPrefs = useLanguagePrefs()
const postDeleteMutation = usePostDeleteMutation()
const {mutateAsync: deletePostMutate} = usePostDeleteMutation()
const {mutateAsync: pinPostMutate, isPending: isPinPending} =
Copy link
Contributor

Choose a reason for hiding this comment

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

"Is the pinned post pending or is the pinned post done pending pinning?"

Try saying that 5 times fast.

@mozzius mozzius merged commit 4b5d6e6 into main Sep 27, 2024
6 checks passed
@mozzius mozzius deleted the samuel/pinned-posts branch September 27, 2024 21:50
estrattonbailey added a commit that referenced this pull request Sep 30, 2024
* origin/main:
  Use Inter variable font (#5540)
  Fix name in `feature_request.yml` (#5542)
  Fix sticky offset, gear color (#5537)
  Move email test to root tests dir (#5527)
  revamp issue templates, add new arch template (#5532)
  use PressableScale for animation (#5541)
  Rework native autocomplete (#5521)
  Pinned posts (#5055)
  Remove Segment (#5518)
  Fix alignment of cancel button on search (#5520)
  [Share Extension] Support on Android for sharing videos to app (#5466)
  Ignore bogus onScroll values (#5499)
  add podcasts to spotify embeds (#5514)
  Tweak font size of "Write your reply" (#5513)
  Lazy load ViewShot (#5517)
  [Share Extension] Support images/movies from other apps like iMessage (#5515)
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