Skip to content

store popup#4435

Open
ryanbarlow97 wants to merge 1 commit into
mainfrom
popupfix
Open

store popup#4435
ryanbarlow97 wants to merge 1 commit into
mainfrom
popupfix

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

Description:

change the generic popup:
image

into a popup i added for clan system:
image

caps doesn't have a "buy" button:
image

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory

Please put your Discord username so you can be contacted if a bug or regression is found:

w.o.n

@ryanbarlow97 ryanbarlow97 added this to the v33 milestone Jun 28, 2026
@ryanbarlow97 ryanbarlow97 self-assigned this Jun 28, 2026
Copilot AI review requested due to automatic review settings June 28, 2026 20:17
@ryanbarlow97 ryanbarlow97 requested a review from a team as a code owner June 28, 2026 20:17
@ryanbarlow97 ryanbarlow97 added the UI/UX UI/UX changes including assets, menus, QoL, etc. label Jun 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 390e7d96-1320-4204-bb9f-a33b0ce80e81

📥 Commits

Reviewing files that changed from the base of the PR and between d42b095 and bbd8b2a.

📒 Files selected for processing (3)
  • resources/lang/en.json
  • src/client/Cosmetics.ts
  • src/client/components/ConfirmDialog.ts

Walkthrough

ConfirmDialog gains five new properties (heading, confirmText, showClose, wide, buttons) controlling layout and action rendering. The insufficient-currency path in Cosmetics.ts is rewritten to use this dialog instead of a plain alert, with hard-currency and soft-currency flows handled separately. Locale keys are split into title and body strings.

Changes

Insufficient Currency Confirm Dialog

Layer / File(s) Summary
ConfirmDialog new properties and conditional rendering
src/client/components/ConfirmDialog.ts
Adds heading, confirmText, showClose, wide, and buttons ("confirmCancel" | "confirmOnly" | "none") properties. Card width responds to wide; close button and heading render conditionally; footer buttons switch based on buttons value; confirm label prefers confirmText.
Insufficient-currency dialog in Cosmetics.ts
src/client/Cosmetics.ts
Imports ConfirmDialog type and module. Replaces the plain alert with a programmatic confirm-dialog element: localized heading and body, warning variant, wide layout. Hard currency gets confirm-only buttons that redirect to the packs tab; soft currency gets no buttons (dismiss only).
Locale key split
resources/lang/en.json
Removes not_enough_currency and adds insufficient_currency_title and insufficient_currency_body with {amount} and {currency} placeholders.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • evanpelle

Poem

🪙 Not enough coins? No plain alert now,
A polished dialog takes a bow.
Hard gold says "Buy more!" with a link,
Soft gold just closes in a blink.
Clean keys, clean types — nice and neat! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too vague to describe the specific popup changes in this patch. Use a more specific title like "Update store insufficient-currency popup" or similar.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description matches the UI popup and translation updates in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread src/client/Cosmetics.ts
resolved.type === "flag"
? translateCosmetic("flags", c.name)
: translateCosmetic("territory_patterns.pattern", c.name);
const dialog = document.createElement("confirm-dialog") as ConfirmDialog;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

instead can we use this as an elemnt like:

return html<confirm-dialogue> ... </confirm-dialogue>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI/UX UI/UX changes including assets, menus, QoL, etc.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants