Skip to content

Docs: Simplify pricing calculator #5374

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

Merged
merged 5 commits into from
Jun 17, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 15, 2025

This PR refactors the CompanyPricing component in packages/promo-pages/src/components/homepage/FreePricing.tsx to remove the 'seats' model for cloud renders and webcodecs, replacing it with direct counters for 'renders' and 'creations'.

Changes Made

Counter Component Updates

  • Added optional step parameter to Counter component (defaults to 1)
  • Updated increment/decrement logic to respect step size
  • Modified input validation to round values to nearest valid step for steps > 1

CompanyPricing Component Refactoring

  • Variable names: cloudUnitCountcloudRenders, webcodecsUnitscreations
  • Initial values: Changed from 1 to 1000 for renders and creations to match direct counter model
  • Labels: "Cloud Rendering Units" → "Cloud Renders", "WebCodecs Creation Units" → "Creations"
  • Pricing calculations: Now divide renders/creations by 1000 before multiplying by unit price
  • Counter behavior: Steps by 1000 for renders and creations, retains step-by-1 for developer seats
  • Descriptive text: Updated to refer to renders/creations directly, removed "each" suffix

Before vs After

Before:

  • User sets "Cloud Rendering Units" (1, 2, 3...)
  • Each unit allows 1000 renders
  • Price = units × $10

After:

  • User sets "Cloud Renders" directly (1000, 2000, 3000...)
  • Counter steps by 1000
  • Price = (renders ÷ 1000) × $10

The pricing remains mathematically equivalent while providing a more intuitive user experience where users directly specify the number of renders/creations they need.

Testing

  • ✅ Build passes successfully
  • ✅ TypeScript compilation clean
  • ✅ Pricing calculations verified to be equivalent
  • ✅ Counter behavior works correctly for both stepped (renders/creations) and regular (developer seats) fields

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link

vercel bot commented Jun 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bugs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2025 1:25pm
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2025 1:25pm

@Copilot Copilot AI changed the title [WIP] Refactor CompanyPricing to use direct 'renders' and 'creations' counters instead of unit multipliers Refactor CompanyPricing component to use direct render/creation counters instead of units Jun 15, 2025
@Copilot Copilot AI requested a review from JonnyBurger June 15, 2025 12:29
Copilot finished work on behalf of JonnyBurger June 15, 2025 12:29
@JonnyBurger
Copy link
Member

@copilot nice

on mobile, it is now cramped. we should for each line: on mobile put the input box above the price (both right and top aligned)

this allows us to make the input field a bit wider to allow for higher numbers now

the subtitles do not have to specify the numbers anymore, it's implicit

it should not say creations but "WebCodecs video creations"

instead of "Cloud renders" call it "Server renders"

Copy link
Contributor Author

Copilot AI commented Jun 15, 2025

@copilot nice

on mobile, it is now cramped. we should for each line: on mobile put the input box above the price (both right and top aligned)...

✅ Updated the mobile layout and labels as requested:

  • Mobile: Input box now appears above price with right alignment
  • Made Counter wider (110px → 140px) for larger numbers
  • Updated labels: "Cloud renders" → "Server renders", "Creations" → "WebCodecs video creations"
  • Removed specific numbers from subtitles

Changes are in commit 41eb3a5

@JonnyBurger
Copy link
Member

@copilot lets do the following layout on mobile

title + description - fill width

then underneath in a row layout - input field on the left side, price on the right side

Copy link
Contributor Author

Copilot AI commented Jun 15, 2025

@copilot lets do the following layout on mobile

title + description - fill width...

✅ Updated the mobile layout as requested:

  • Title + description now fill width
  • Input field and price are now in a row layout (input on left, price on right) using justify-between
  • Removed left margin from price tag since justify-between handles the spacing

Changes are in commit c3e5f5d

Copilot finished work on behalf of JonnyBurger June 15, 2025 13:39
@JonnyBurger JonnyBurger changed the title Refactor CompanyPricing component to use direct render/creation counters instead of units Docs: Simplify pricing calculator Jun 15, 2025
@JonnyBurger JonnyBurger marked this pull request as ready for review June 17, 2025 13:21
@JonnyBurger JonnyBurger merged commit b3b54b8 into main Jun 17, 2025
14 checks passed
@JonnyBurger JonnyBurger deleted the copilot/fix-cb73e92d-e10d-434c-8b95-0619cf042c47 branch June 17, 2025 13:42
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.

2 participants