Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Display costs for each quest #194

Merged
merged 3 commits into from
Nov 17, 2024
Merged

feat: Display costs for each quest #194

merged 3 commits into from
Nov 17, 2024

Conversation

evadecker
Copy link
Contributor

@evadecker evadecker commented Nov 17, 2024

What changed?

  • Update quests schema to support defining an array of costs
  • Display all costs with descriptions on quest
  • Sum the costs as the primary value, display cost breakdown in a popover on click
  • Display "Free" if there are no costs associated with a given quest
  • Update admin page for editing quests to support adding costs
  • Resolves Add cost fields for each quest #153

CleanShot 2024-11-16 at 19 07 02@2x

CleanShot 2024-11-16 at 19 20 26@2x

Why?

Name changes can be pricey depending on the state. This data structure should allow us to:

  1. Provide context for the costs of each quest
  2. Automate calculations to prevent data from going stale
  3. Keep the primary view simple by showing only the total cost

Copy link

changeset-bot bot commented Nov 17, 2024

🦋 Changeset detected

Latest commit: 7b80f44

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
namesake Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 17, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 8.57%
⬆️ +0.06%
376 / 4385
🔵 Statements 8.57%
⬆️ +0.06%
376 / 4385
🔵 Functions 2.12%
🟰 ±0%
2 / 94
🔵 Branches 9.78%
🟰 ±0%
9 / 92
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
convex/quests.ts 58.41%
⬆️ +2.03%
100%
🟰 ±0%
11.11%
🟰 ±0%
58.41%
⬆️ +2.03%
19-23, 29-33, 39-40, 50-56, 78-87, 93-94, 100-101, 107-116
convex/schema.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/components/NumberField/NumberField.tsx 0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
1-86
src/components/Slider/Slider.tsx 0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
1-80
src/routes/_authenticated/admin/quests/$questId.tsx 0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
1-234
Generated in workflow #121 for commit 7b80f44 by the Vitest Coverage Report Action

Copy link

cloudflare-workers-and-pages bot commented Nov 17, 2024

Deploying namesake with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7b80f44
Status: ✅  Deploy successful!
Preview URL: https://e4c92e56.namesake-639.pages.dev
Branch Preview URL: https://costs.namesake-639.pages.dev

View logs

@evadecker evadecker merged commit fa35737 into main Nov 17, 2024
7 checks passed
@evadecker evadecker deleted the costs branch November 17, 2024 00:23
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.

Add cost fields for each quest
1 participant