Combined archive + optional refund flow#3501
Draft
Twixes wants to merge 3 commits into
Draft
Conversation
Introduce a self-contained, delightful Refund action as a UI component plus a Storybook story. A refund is psychologically the opposite of every other review-bar action — it spends less money, not more — so it's styled apart from the primary CTAs (warm gold, coin-return iconography) and made to feel good rather than punitive. Hover shows a gold sheen sweep and a coin flip; confirm leans into PostHog's "only pay for work that helped" philosophy, then celebrates with confetti fired from the button and a "+amount" coin-return flourish. Respects prefers-reduced-motion throughout. Ships as a component + story (no live wiring) since there's no refund backend in this repo yet; drop it into the review bar once the endpoint exists. Generated-By: PostHog Code Task-Id: 1d16eb2b-0862-4770-88c8-888603e42de0
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found 2 issues in 1 file · 2 warnings. 2 warnings
Reviewed by React Doctor for commit |
Contributor
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
Replace the standalone RefundButton with ArchiveRefundDialog: one Archive action with an honest "Also refund" opt-in, instead of two confusable top-bar buttons. Ticking the opt-in unfurls a warm gold panel with PostHog's "only pay for work that helped" philosophy (and a "What?"-style tooltip on the checkbox), turns the confirm button to gold, and — on confirm — celebrates with confetti fired from the trigger plus a coins-fly-back flourish. Refund stays a deliberate opt-in, never confused with the primary "use the product" CTAs. Respects prefers-reduced-motion throughout. Still a component + Storybook story, no live wiring, until a refund backend exists in this repo. Generated-By: PostHog Code Task-Id: 1d16eb2b-0862-4770-88c8-888603e42de0
Associate the refund opt-in label with its checkbox via htmlFor/id (noLabelWithoutControl) and sort the label's Tailwind classes (useSortedClasses). Generated-By: PostHog Code Task-Id: 1d16eb2b-0862-4770-88c8-888603e42de0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Refunds are psychologically the opposite of every other action in the PR
review bar — they spend less money, not more — but a standalone Refund button
sitting next to Archive is confusing (the thread's original gripe: two buttons
that look like near-duplicates). The ask was to keep them from competing while
still making refunds feel good, not punitive.
Changes
Reworked into a single combined flow —
ArchiveRefundDialog(UI component +Storybook story):
modal ("Also refund…"), with a "What?"-style tooltip explaining the
philosophy — so there's no second confusable top-bar button.
the confirm button turns to gold and reads "Archive & refund $X".
existing
confettiprimitive) plus a "+amount" coins-fly-back flourish.checkbox. Handles submitting/error states and respects
prefers-reduced-motionthroughout.Still ships as a component + story with no live wiring, since there's no refund
backend in this repo yet — drop it into the review bar once the endpoint exists.
Explore it in Storybook under Components/Refund/ArchiveRefundDialog.
How did you test this?
Not run locally (no
node_modulesin this environment). Reviewed againstexisting patterns (
ArchiveRunningTaskDialog, theconfettiprimitive, quillButton/ RadixAlertDialogusage). Please eyeball the Storybook story beforemerge.
Automatic notifications
Created with PostHog from a Slack thread