mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 08:59:41 +08:00

post action feedback is the mechanism in which we provide visual feedback to the user when a post action is clicked, in cases where the action is a background (hidden to user) for example: copying text to the clipboard Core uses this to share post links, but other plugins (for example: AI) use this to share post transcripts via the clipboard. This adds a proper plugin API to consume this functionality `addPostMenuButton` can provide a builder that specified a function as the action. This function will be called with an object that has both the current post and a method for showing feedback.