Skip to content

feat(Quote Replies): Add action buttons to replies in post notes (meatballs menu)#1662

Draft
marcustyphoon wants to merge 29 commits intoAprilSylph:masterfrom
marcustyphoon:quote-replies-post-notes
Draft

feat(Quote Replies): Add action buttons to replies in post notes (meatballs menu)#1662
marcustyphoon wants to merge 29 commits intoAprilSylph:masterfrom
marcustyphoon:quote-replies-post-notes

Conversation

@marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Dec 10, 2024

As a bit of an aside to the actual issue in question, #1655 (comment) also brought up that it's reasonable to expect Quote Replies to be usable from the replies themselves as well as the activity pane. It isn't... but we can probably do that!

As a bonus, this sidesteps #1658, since the post notes API is totally different. (No longer relevant)

Description

This implements an item in the meatball menu on certain replies in the post footer, allowing the user to activate Quote Replies directly from that location if they would have been able to from the relevant item in the activity menu/page.

Technical Details

  • The meatballs util has [register/unregister]ReplyMeatballItem modes added to target the meatball menus in post footer replies, which should be fairly self-explanatory, as the utility was recently factored to make adding modes easier and the code is similar to the other modes.
  • A notePropsObjects utility is added, similar to timelineObject and notificationObject... mostly. Note the plural. The note prop doesn't include enough information to correctly process threaded replies, so the utility returns both the note prop for the target reply and, if it exists, the note prop of its parent. Also, there are multiple React components in the tree with note props, not all of which contain all of the fields.
  • The result of said util is interpreted in Quote Replies in a determineNoteReplyType function, which is used both to determine if we should be able to quote-reply a reply (i.e. if it's targeting us) and, if so, what type of reply it will be and which of our blogs is being targeted.
  • As noted in below comments, creating content and tags is mostly a copy-paste job, but following the DRY rule here makes the code pretty complicated.

Testing steps

todo: list testing steps

@marcustyphoon marcustyphoon self-assigned this Jan 4, 2025
@marcustyphoon marcustyphoon marked this pull request as ready for review January 6, 2025 10:54
@marcustyphoon
Copy link
Collaborator Author

Man, I wish I had typescript and something similar to Zod. I mean, jesus.

@marcustyphoon

This comment was marked as resolved.

@marcustyphoon
Copy link
Collaborator Author

q: why did you make a PR that would immediately completely explode when it's merged with another active PR?
a: I am very smart

@marcustyphoon marcustyphoon marked this pull request as draft February 10, 2025 14:58
@marcustyphoon marcustyphoon force-pushed the quote-replies-post-notes branch from a16b5f8 to 551bf9e Compare February 16, 2025 21:00
@marcustyphoon marcustyphoon removed their assignment Feb 16, 2025
@marcustyphoon marcustyphoon self-assigned this Apr 27, 2025
@marcustyphoon
Copy link
Collaborator Author

q: why did you make a PR that would immediately completely explode when it's merged with another active PR?
a: I am very smart

Yeah, doing that "merge" took me slightly over an hour. Fun times.

(The actual issue was that I—at the time, cleverly—reused the verbiage/formatting/content code that's now part of the processReply function when quoting from the post notes. It would be possible to factor things now so that's still the case, but the processReply/processGenericReply flow is now complicated enough to understand that I think it's best to leave that on its own and live with the verbiage/formatting/content code effectively getting copy-pasted. DRY is a nice principle but it's not the be-all and end-all.)

@marcustyphoon marcustyphoon marked this pull request as ready for review April 28, 2025 06:21
@marcustyphoon
Copy link
Collaborator Author

Hm, this might be easier with the /v2/blog/[blog]/post/[post id]/replies/[reply id]/permalink?mode=replies endpoint used for replies permalinks.

@marcustyphoon marcustyphoon marked this pull request as draft May 28, 2025 21:21
@marcustyphoon
Copy link
Collaborator Author

Hm, this might be easier with the /v2/blog/[blog]/post/[post id]/replies/[reply id]/permalink?mode=replies endpoint used for replies permalinks.

yeah, I dunno, maybe... not.

@marcustyphoon marcustyphoon marked this pull request as ready for review August 8, 2025 14:43
@marcustyphoon marcustyphoon removed their assignment Aug 8, 2025
};

const determineNoteReplyType = ({ noteProps, parentNoteProps }) => {
if (userBlogNames.includes(noteProps.note.blogName)) return false;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Interesting note from testing: this line excludes quote replying yourself, which probably makes sense in general... but a) maybe it doesn't (something something group blogs), and b) that's inconsistent with the behavior on activity items, which totally does let you quote reply yourself!

@marcustyphoon
Copy link
Collaborator Author

  • fix this on narrow posts (notesPopover), in which the meatballs menu is apparently... completely different???

@marcustyphoon marcustyphoon changed the title Quote Replies: Add action buttons to replies in post notes feat(Quote Replies): Add action buttons to replies in post notes Oct 25, 2025
@marcustyphoon marcustyphoon self-assigned this Nov 25, 2025
@marcustyphoon
Copy link
Collaborator Author

You know... putting this in meatballs doesn't necessarily make a ton of sense, does it. No one's going to find it there. And now there's a juicy space right next to the like button...

@marcustyphoon marcustyphoon changed the title feat(Quote Replies): Add action buttons to replies in post notes feat(Quote Replies): Add action buttons to replies in post notes (meatballs menu) Feb 16, 2026
@marcustyphoon marcustyphoon marked this pull request as draft February 16, 2026 00:19
@marcustyphoon marcustyphoon removed their assignment Mar 2, 2026
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.

1 participant