Skip to content

feat(billing): redesign Subscriptions view to match user-tabs aesthetic#4127

Merged
PierreBrisorgueil merged 6 commits into
masterfrom
feat-subs-view-redesign
May 11, 2026
Merged

feat(billing): redesign Subscriptions view to match user-tabs aesthetic#4127
PierreBrisorgueil merged 6 commits into
masterfrom
feat-subs-view-redesign

Conversation

@PierreBrisorgueil
Copy link
Copy Markdown
Collaborator

@PierreBrisorgueil PierreBrisorgueil commented May 11, 2026

Summary

  • Plan cards redesigned: elevation="0" + 1px surface border; paid plan gets 3px primary left-edge accent for visual hierarchy
  • Status chip + action button moved to plan card header row (justify-space-between) — scannable in one glance, v-list wrapper removed
  • Meter mode: UsageBar + MeterProgress merged into single "Usage overview" card with v-divider (4 cards → 3 cards in meter mode)
  • Extras card: balance count promoted to primary v-chip in header row
  • All cards match flat Profile/Organizations tab style (elevation="0", rgba() CSS borders)
  • Decorative icons have aria-hidden="true"; all card headers use flex-wrap for responsive wrapping
  • CSS: uses rgba(var(--v-theme-*), alpha) comma convention — matches existing sibling convention

Test plan

  • Unit tests: 77/77 pass (75 existing + 2 new for plan card BEM class assertions)
  • Visual: sign in to trawl.me/users → Subscriptions tab — paid plan card has primary left accent, status chip inline in header
  • Mobile: header rows wrap gracefully at ≤960px

Visual expected outcome

Paid plan card: plan name + badge on left, status chip + action button on right, 3px primary left border accent.
Free plan card: plan name + badge, upgrade CTA, no accent border.
Meter mode: 3 cards (Usage overview with bar+progress / Breakdown chart / Extras with ledger) instead of 4.

Zero logic changes

All script logic, store interactions, composables, i18n keys, and event handlers are unchanged. Template restructure + CSS only.

Summary by CodeRabbit

  • Refactor

    • Restructured the subscriptions panel layout with dedicated visual cards for free and paid plans.
    • Reorganized meter mode UI with combined usage display, breakdown, and extras sections.
  • Tests

    • Added unit tests for plan card styling validation.

Review Change Stack

- Plan cards: elevation="0" + 1px surface border; paid plan gets 3px
  primary accent on left edge for immediate visual hierarchy
- Status chip + action button moved to header row end
  (justify-space-between) — scannable in one glance, no v-list wrapper
- Next billing date now inline with fa-solid fa-calendar icon, no list item
- Meter mode: UsageBar + MeterProgress merged into one card with v-divider
  separator (4 cards → 3 cards in meter mode)
- Extras card: balance count promoted to primary v-chip in header row;
  Buy units CTA + ledger section get more breathing room
- All cards use elevation="0" matching flat Profile/Organizations tab style
- 75/75 unit tests pass, zero logic changes
…sign

- Add aria-hidden="true" to decorative status icon and calendar icon
  (adjacent v-chip/text already conveys the semantic meaning)
- Add flex-wrap to extras card header row for consistent responsive
  behavior with sibling plan card headers
- Add 2 tests asserting BEM class presence for paid/free plan card
  (covers the primary accent border as class-based gate)
- 77/77 unit tests pass
Replace rgb(var(--v-) / alpha) slash-syntax with rgba(var(--v-), alpha)
comma syntax — matches existing sibling component convention
(billing.computeGauge.component.vue:108). The slash-alpha form mixed with
comma-separated CSS variables is invalid per CSS Color Level 4 and can
silently fail border rendering in Safari / older Chrome.

Also remove empty spacer div; replace with conditional mt-6 on the
CTAs container for a cleaner box-model approach.
Copilot AI review requested due to automatic review settings May 11, 2026 20:04
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.54%. Comparing base (fe1497f) to head (7a1c67d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4127   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          31       31           
  Lines        1089     1089           
  Branches      302      302           
=======================================
  Hits         1084     1084           
  Misses          5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Redesigns the Billing “Subscriptions” tab UI to match the flatter “user-tabs” card aesthetic (borders instead of elevation) while keeping existing billing logic/composables intact.

Changes:

  • Restructured the plan summary cards (free vs paid) to place status + actions in the paid plan header row and added paid/free BEM modifier classes for styling.
  • Simplified meter-mode layout by merging UsageBar + MeterProgress into a single “Usage overview” card and promoting extras balance into a header chip.
  • Added/updated scoped CSS borders for consistent flat cards and added unit tests asserting paid/free plan card modifier classes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/modules/billing/components/billing.subscriptions.component.vue Template restructuring for plan/meter cards + new flat-border styling (paid left-accent, consistent borders).
src/modules/billing/tests/billing.subscriptions.component.unit.tests.js Adds unit tests to assert the new paid/free plan card BEM modifier classes.

>
<div class="d-flex align-center mb-4">
<div class="d-flex align-center mb-3">
<v-icon icon="fa-solid fa-triangle-exclamation" color="error" size="small" class="mr-3" />
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@PierreBrisorgueil has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 15 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4deb6ad0-30c6-4b85-91b8-311f728463a1

📥 Commits

Reviewing files that changed from the base of the PR and between afda8fd and 7a1c67d.

📒 Files selected for processing (1)
  • src/modules/billing/components/billing.subscriptions.component.vue

Walkthrough

Billing subscriptions component template and styles are refactored to restructure plan cards, error/loading states, and meter-mode cards using dedicated BEM modifier classes. Unit tests are added to validate the new plan card CSS class application.

Changes

Plan Cards and Error/Loading States UI Refactoring

Layer / File(s) Summary
Container and Loading State
src/modules/billing/components/billing.subscriptions.component.vue
Outer v-container gains billing-subscriptions class; explicit loading section with centered indeterminate progress indicator is inserted before other non-main states.
Error State Card
src/modules/billing/components/billing.subscriptions.component.vue
Subscription-fetch error card gains billing-subscriptions__error-card class with adjusted header layout and icon spacing; same conditional gating preserved.
Free Plan Card
src/modules/billing/components/billing.subscriptions.component.vue
Free-plan card redesigned with billing-subscriptions__plan-card--free class and updated header spacing/layout.
Paid Plan Card
src/modules/billing/components/billing.subscriptions.component.vue
Paid-plan card replaces prior list-based status layout with billing-subscriptions__plan-card--paid class; header now shows current plan badge, status icon/chip, and optional action button; CTA row margin behavior adjusted.
Meter Mode Secondary Cards
src/modules/billing/components/billing.subscriptions.component.vue
Usage overview card combines BillingUsageBarComponent and meter progress within single bordered card; breakdown and extras cards added as separate bordered cards with inline balance chip header in extras.
Scoped CSS Styles
src/modules/billing/components/billing.subscriptions.component.vue
Old .billing-subscriptions__status-row styles removed; new scoped CSS rules added for paid/free plan cards, error card, and consistent borders for meter-area secondary cards.
Unit Tests for BEM Classes
src/modules/billing/tests/billing.subscriptions.component.unit.tests.js
Two tests added: paid plan card receives billing-subscriptions__plan-card--paid class; free plan card receives billing-subscriptions__plan-card--free class.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • pierreb-devkit/Vue#4068: Both PRs modify billing subscriptions component UI around subscription status/error presentation with layout and class adjustments.
  • pierreb-devkit/Vue#4079: Both PRs modify the billing subscriptions component template/UI and related unit tests for status display and CTA logic.
  • pierreb-devkit/Vue#4081: Both PRs modify billing subscriptions component template/CSS and change status presentation/error handling with layout and class updates.

Suggested labels

billing

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description covers the key changes, test results, and visual outcomes. However, it does not follow the provided template structure with required sections like Risk level, Validation checklist, and Guardrails check. Restructure the description to follow the template: add Summary section (why), Scope section (modules and risk level), Validation checklist items, Guardrails check items, and any applicable Infra/Stack alignment details.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: a redesign of the Subscriptions view to match the user-tabs aesthetic, which is the primary focus of the template and CSS restructuring.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-subs-view-redesign

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 and usage tips.

coderabbitai[bot]
coderabbitai Bot previously requested changes May 11, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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/modules/billing/components/billing.subscriptions.component.vue`:
- Around line 899-901: Replace the exclusion-based selector
".billing-subscriptions
.v-card:not(.billing-subscriptions__plan-card):not(.billing-subscriptions__error-card)"
with a positive BEM class approach: add a new class name (e.g.
"billing-subscriptions__meter-card") to the meter-related cards (usage overview,
breakdown, extras) in the template/component and then apply the border styling
to ".billing-subscriptions__meter-card" instead; update any existing CSS rules
and the template markup where those meter cards are created so they include the
new "billing-subscriptions__meter-card" class (leaving
".billing-subscriptions__plan-card" and ".billing-subscriptions__error-card"
unchanged).
🪄 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: ASSERTIVE

Plan: Pro

Run ID: 771ebb06-7c40-47fa-87e7-b0f8d103c113

📥 Commits

Reviewing files that changed from the base of the PR and between fe1497f and afda8fd.

📒 Files selected for processing (2)
  • src/modules/billing/components/billing.subscriptions.component.vue
  • src/modules/billing/tests/billing.subscriptions.component.unit.tests.js

Comment thread src/modules/billing/components/billing.subscriptions.component.vue Outdated
@PierreBrisorgueil PierreBrisorgueil enabled auto-merge (squash) May 11, 2026 20:20
…lass

Add billing-subscriptions__meter-card to the 3 meter-mode cards (usage
overview, breakdown, extras) and target the border rule via the positive
BEM class instead of a .not() exclusion chain. Cleaner intent, explicit
coupling between markup and style.

Per CodeRabbit suggestion on PR #4127.
@PierreBrisorgueil PierreBrisorgueil dismissed coderabbitai[bot]’s stale review May 11, 2026 20:21

Issue addressed: replaced exclusion-based :not() CSS selector with positive BEM class billing-subscriptions__meter-card on all 3 meter cards. Push afda8fd → latest.

@PierreBrisorgueil PierreBrisorgueil merged commit 15fd466 into master May 11, 2026
3 of 4 checks passed
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