feat: sponsors#2967
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughA new ChangesSponsors Page
Possibly related PRs
Suggested reviewers
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/pages/sponsors.vue (1)
9-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the page-level
$t()convention throughout<script setup>.This file already uses
$t()for SEO and OG metadata, and the repo guidance forapp/pages/*.vueis to use the Nuxt i18n globals directly instead of destructuringtfromuseI18n(). Keeping one access pattern here will make follow-up edits cleaner.Suggested tidy-up
-const { t } = useI18n() const currencyFormatter = useNumberFormatter({ style: 'currency', currency: 'USD', maximumFractionDigits: 0, }) function formatTierPrice(amount: number) { - return `${currencyFormatter.value.format(amount)}${t('sponsors_page.tiers.per_month')}` + return `${currencyFormatter.value.format(amount)}${$t('sponsors_page.tiers.per_month')}` }🤖 Prompt for 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. In `@app/pages/sponsors.vue` around lines 9 - 17, The script setup in the sponsors page mixes direct page-level i18n usage with a destructured t from useI18n(); update it to follow the app/pages/*.vue convention by removing the useI18n() destructuring and using the Nuxt global $t() consistently in formatTierPrice and any other script-side translations, matching the existing SEO/OG metadata style.Source: Learnings
🤖 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 `@app/pages/sponsors.vue`:
- Around line 91-145: The headline metrics in sponsors.vue are hardcoded
numerals, so they bypass locale formatting and won’t adapt on translated pages.
Update the metric blocks in the sponsors page template to use the existing
number formatting approach already used elsewhere (such as the
`useNumberFormatter`/`$n()` pattern), and keep the `+` suffix separate from the
formatted number. Focus on the static values in the section cards (`250`, `700`,
`200000`, `3400`) and preserve the current labels and layout.
---
Nitpick comments:
In `@app/pages/sponsors.vue`:
- Around line 9-17: The script setup in the sponsors page mixes direct
page-level i18n usage with a destructured t from useI18n(); update it to follow
the app/pages/*.vue convention by removing the useI18n() destructuring and using
the Nuxt global $t() consistently in formatTierPrice and any other script-side
translations, matching the existing SEO/OG metadata style.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1669dad4-4f5e-4004-918b-9144b0eb1dfa
📒 Files selected for processing (8)
app/components/AppFooter.vueapp/composables/useCommandPaletteGlobalCommands.tsapp/pages/about.vueapp/pages/sponsors.vuei18n/locales/en.jsoni18n/schema.jsonnuxt.config.tsserver/middleware/canonical-redirects.global.ts
| <div class="grid gap-4 sm:grid-cols-12"> | ||
| <section class="border border-border bg-bg-elevated rounded-lg p-5 sm:col-span-7"> | ||
| <div class="grid grid-cols-2 gap-4"> | ||
| <div> | ||
| <p class="font-mono text-2xl text-fg uppercase tracking-wider mb-2">250+</p> | ||
| <p class="text-fg-muted text-sm leading-relaxed m-0"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.people.contributors') }} | ||
| </p> | ||
| </div> | ||
| <div> | ||
| <p class="font-mono text-2xl text-fg uppercase tracking-wider mb-2">700+</p> | ||
| <p class="text-fg-muted text-sm leading-relaxed m-0"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.people.community_members') }} | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| <section class="border border-border rounded-lg p-5 bg-bg-subtle sm:col-span-5"> | ||
| <p class="font-mono text-2xl text-fg uppercase tracking-wider mb-2">200000+</p> | ||
| <p class="text-fg-muted text-sm leading-relaxed m-0"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.visitors.description') }} | ||
| </p> | ||
| </section> | ||
| <section class="border border-border rounded-lg p-5 bg-bg-subtle sm:col-span-4"> | ||
| <p class="font-mono text-2xl text-fg uppercase tracking-wider mb-2">3400+</p> | ||
| <p class="text-fg-muted text-sm leading-relaxed m-0"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.stars.title') }} | ||
| </p> | ||
| </section> | ||
| <section class="border border-border rounded-lg p-5 bg-bg-subtle sm:col-span-8"> | ||
| <p class="font-mono text-2xl text-fg uppercase tracking-wider mb-2"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.community.title') }} | ||
| </p> | ||
| <p class="text-fg-muted text-sm leading-relaxed m-0"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.community.description') | ||
| }}<sup>*</sup> | ||
| </p> | ||
| </section> | ||
| <section class="border border-border rounded-lg p-5 bg-bg-subtle sm:col-span-6"> | ||
| <p class="font-mono text-2xl text-fg uppercase tracking-wider mb-2"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.adoption.title') }} | ||
| </p> | ||
| <p class="text-fg-muted text-sm leading-relaxed m-0"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.adoption.description') }} | ||
| </p> | ||
| </section> | ||
| <section class="border border-border rounded-lg p-5 bg-bg-subtle sm:col-span-6"> | ||
| <p class="font-mono text-2xl text-fg uppercase tracking-wider mb-2"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.default_source.title') }} | ||
| </p> | ||
| <p class="text-fg-muted text-sm leading-relaxed m-0"> | ||
| {{ $t('sponsors_page.what_this_means_for_you.cards.default_source.description') }} | ||
| </p> | ||
| </section> | ||
| </div> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Locale-format the headline metrics instead of hardcoding raw numerals.
250+, 700+, 200000+, and 3400+ bypass localisation, so translated pages will still show unformatted English numerals. Since this page already formats currency via useNumberFormatter, these counts should go through $n() or the same formatter and append the + separately.
🤖 Prompt for 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.
In `@app/pages/sponsors.vue` around lines 91 - 145, The headline metrics in
sponsors.vue are hardcoded numerals, so they bypass locale formatting and won’t
adapt on translated pages. Update the metric blocks in the sponsors page
template to use the existing number formatting approach already used elsewhere
(such as the `useNumberFormatter`/`$n()` pattern), and keep the `+` suffix
separate from the formatted number. Focus on the static values in the section
cards (`250`, `700`, `200000`, `3400`) and preserve the current labels and
layout.
🧭 Context
A dedicated page for sponsors. This is useful for both current sponsors and those just considering it. It's a public and always-open source of important information