custom amount ui prettier#4556
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThis PR reworks the custom plutonium purchase card to use CosmeticContainer and PurchaseButton, removes the busy-state guard from the buy flow, adds direct dollar pricing support to PurchaseButton, and updates supporting styles and locale strings. ChangesCustom Plutonium Purchase UI
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CustomCurrencyCard
participant PurchaseButton
participant CheckoutAPI
User->>CustomCurrencyCard: adjust amount slider/input
User->>PurchaseButton: click purchase button
PurchaseButton->>CustomCurrencyCard: onPurchaseDollar()
CustomCurrencyCard->>CheckoutAPI: createCustomCurrencyCheckout(amount)
CheckoutAPI-->>CustomCurrencyCard: checkout URL or false
alt checkout failed
CustomCurrencyCard->>User: alert failure
else checkout succeeded
CustomCurrencyCard->>User: redirect via window.location.href
end
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the custom plutonium purchase UI to match the cosmetics store card/purchase-button styling, and extends <purchase-button> to support displaying a direct dollar price even when there’s no catalog Product.
Changes:
- Add
dollarPricesupport to<purchase-button>so it can render a $ price without requiring aproduct. - Refactor
<custom-currency-card>to use<cosmetic-container>+<purchase-button>, and switch to a number input + slider UX. - Update shared CSS for the custom amount number input, and adjust English translations for the store.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/client/styles.css | Adds styling to make the custom amount <input type="number"> look consistent (removes spin buttons). |
| src/client/components/PurchaseButton.ts | Adds dollarPrice property and uses it when rendering the dollar purchase button. |
| src/client/components/CustomCurrencyCard.ts | Rebuilds the custom amount card UI around cosmetic-container and purchase-button, plus improved input UX. |
| resources/lang/en.json | Updates store strings (“Custom Amount” → “Choose Amount”) and adds store.plutonium_amount. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/client/components/CustomCurrencyCard.ts`:
- Line 92: The purchase handler in CustomCurrencyCard loses component context
because buy is a prototype method passed through onPurchaseDollar; update buy on
the CustomCurrencyCard class so it is permanently bound to the instance, and
ensure the PurchaseButton.executePurchase flow can invoke it safely without
relying on a detached this. Keep the fix localized to the buy method and the
onPurchaseDollar binding so this.amount remains accessible when the user clicks
Buy.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6ffce5da-f3cd-49c9-bbe9-7adb0c1bb352
📒 Files selected for processing (4)
resources/lang/en.jsonsrc/client/components/CustomCurrencyCard.tssrc/client/components/PurchaseButton.tssrc/client/styles.css
8b2ee72 to
7e09fb8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b2ee72f7a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Description:
fixed font,
sizing,
back box wrapping,
remove "buy for"
centre the text by removing the ^ v arrows
before:

after:

Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
w.o.n