Skip to content

Angular SDK: the subscription page redesign and app-style theming from Svelte (TBP-944), v0.9.0 - #43

Merged
iman-nebulr merged 4 commits into
mainfrom
feat/tbp-944-subscription-redesign-theming
Nov 10, 2026
Merged

iman-nebulr merged 4 commits into
mainfrom
feat/tbp-944-subscription-redesign-theming

Conversation

@iman-nebulr

Copy link
Copy Markdown
Contributor

Angular apps now get the same subscription page and the same theming as Svelte apps (bridge-svelte 0.9.2 and 0.9.3). Ticket: TBP-944. This PR also bumps the package to 0.9.0. It is not merged, published or tagged.

What an Angular app looks like now

The subscription page (/subscription, from bridgeBillingRoutes()):

  • At the top is a panel with the current plan, its renewal date and the card on file ("Renews Dec 10, 2026 · Card ending 4242"), with "Manage billing" next to it.
  • Below that, under a "Change plan" heading, each plan is a card with its own background, border and shadow. The price is shown large ("$29 / month"), with a check mark beside each feature.
  • The buttons say "Choose Pro" for a workspace with no plan yet, and "Upgrade to Team" or "Switch to Free" once it has one. The current plan has a border in the app's brand colour and a "Your plan" label.

After paying, or after picking a Free plan, the user comes straight back to the subscription page. A green banner there says "You're on Pro now". It shows once, can be closed, and is gone after a reload. The separate "You're all set" page is no longer part of the normal flow, but it still works for any app that links to it.

An app can send people somewhere else after checkout (for example its dashboard) with one setting, and show the same banner there.

Theming:

  • Bridge pages now follow the app's own text: font, colour and size. If the app's body text is 18px, Bridge's text is sized to match.
  • An app with a strong style of its own (heavy headings, bold buttons, hard drop shadows) can now carry that onto the Bridge pages with a few settings.
  • The app's own CSS now always wins over Bridge's, with no !important needed. Tailwind's reset can no longer strip Bridge's buttons.
  • With no settings at all, everything looks the same as before.

Checked

  • The Angular page and the Svelte page, rendered with the same plan data, are pixel-identical. There are 0 differing pixels on all three screens compared.
  • In a real browser (Chromium):
    • Bridge's button text grows with the app's body text size.
    • The weight and shadow settings apply.
    • A plain CSS rule in the app beats Bridge's own rule.
    • Buttons keep their colour when the app sets nothing.
  • 377 unit tests pass, and the library, the package check and the demo app all build.

Screenshots

Side by side, same data:

  • Angular subscription page: /private/tmp/claude-501/-Users-iman-code-thebridge-platform-bridge-server/a9d88945-4010-4780-a810-c20f75dcea1c/scratchpad/port-angular/angular-subscription.png
  • Svelte subscription page: /private/tmp/claude-501/-Users-iman-code-thebridge-platform-bridge-server/a9d88945-4010-4780-a810-c20f75dcea1c/scratchpad/port-angular/svelte-subscription.png
  • Angular, Monthly tab: /private/tmp/claude-501/-Users-iman-code-thebridge-platform-bridge-server/a9d88945-4010-4780-a810-c20f75dcea1c/scratchpad/port-angular/angular-subscription-monthly.png
  • Svelte, Monthly tab: /private/tmp/claude-501/-Users-iman-code-thebridge-platform-bridge-server/a9d88945-4010-4780-a810-c20f75dcea1c/scratchpad/port-angular/svelte-subscription-monthly.png
  • Angular plan picker for a workspace with no plan: /private/tmp/claude-501/-Users-iman-code-thebridge-platform-bridge-server/a9d88945-4010-4780-a810-c20f75dcea1c/scratchpad/port-angular/angular-plan-selector.png
  • Svelte plan picker for a workspace with no plan: /private/tmp/claude-501/-Users-iman-code-thebridge-platform-bridge-server/a9d88945-4010-4780-a810-c20f75dcea1c/scratchpad/port-angular/svelte-plan-selector.png
  • Angular with a bold theme set through settings alone: /private/tmp/claude-501/-Users-iman-code-thebridge-platform-bridge-server/a9d88945-4010-4780-a810-c20f75dcea1c/scratchpad/port-angular/angular-subscription-themed.png

(These files are on the Air that made them. They are not attached to the PR.)

Worth knowing

  • Plan buttons no longer say "Select free plan" or "29 USD / month". Any app test that matches that text needs updating, as with Svelte.
  • The end-to-end browser tests were updated to the new flow but not run here: they need the local Bridge stack.
  • The guides and the AI agent prompts are updated to match.

…d app-style theming, ported from bridge-svelte (TBP-944)

Ports bridge-svelte 0.9.2 (TBP-813) and 0.9.3 (TBP-814) to Angular.

A completed checkout, or a Free pick, used to stop on /subscription/success
("You're all set") and wait for "Continue". It now lands on
billing.successRoute, the subscription page by default, which shows
<bridge-checkout-notice>: a one-time, dismissible banner naming the plan.
The OAuth-callback page records the checkout after confirming it; the plan
picker records a Free pick before navigating (not when the page listens to
(select)). The signal (checkoutResult, takeCheckoutResult,
clearCheckoutResult) is in memory only, so a reload never shows it again.
/subscription/success is still served, and clears the signal.
bridgeBillingRoutes({ checkoutNotice: false }) hides the banner.

The subscription page: plan cards and the current-plan panel are surfaces
from the --bridge-* tokens (new --bridge-card-bg, --bridge-card-shadow), a
large formatted price, "Choose / Upgrade to / Switch to" buttons, the
current plan flagged in the primary colour, check marks on features, a
"Change plan" heading beside the interval switch (new heading input), and
the renewal date and card under the current plan.

Theming: every text size scales from --bridge-text-base (a registered
@Property from var(--bridge-font-size, 1em) on the body), weights come from
--bridge-font-weight-heading / -button / -label, buttons take
--bridge-button-shadow, and --bridge-card-shadow also covers the plan-change
dialog. The whole stylesheet, and <bridge-login>'s own styles, sit in
@layer bridge, ordered after Tailwind v4's layers, so any unlayered app CSS
wins without !important. Every default is the previous value.

Additive: new inputs, exports and config keys only. The plan button labels
change, as in svelte.

Refs: TBP-944
…ew plan card labels and the bridge cascade layer (TBP-944)

Mirrors bridge-svelte's TBP-813 / TBP-814 tests.

Unit (vitest): billing.successRoute defaults and overrides; the callback
records a confirmed checkout after re-reading billing, and nothing on a
failure, a cancel or a sign-in; the checkoutResult signal; the plan-format
helpers; the default card's Choose / Upgrade to / Switch to labels, current
flag, price block and heading; a Free pick recording the result and landing
on successRedirect (not with (select)); <bridge-checkout-notice> shown once,
dismissible, with a template; the subscription page from
bridgeBillingRoutes() showing it once, after a Free pick, hidden with
checkoutNotice: false, the old success page clearing it, the summary panel's
meta line; the Stripe return on the callback page landing on /subscription
with the banner. styles-layer.spec.ts pins the layer order, the
@Property, one @layer bridge block, text-base sizes, weight and shadow
tokens with the old values as fallbacks, and component styles in the layer
(the dev badge excluded). Mutation-checked: removing the record in the
picker, the callback or the callback page, the banner on the page, or the
banner's clear fails the suite.

Playwright: the Free-pick flow and the welcome paywall expect the landing
on /subscription with the banner and the new labels; app-style-wins.spec.ts
ports svelte's computed-style checks.

Refs: TBP-944
…r; match the app's type and shadows; the app's CSS wins (TBP-944)

The Angular equivalents of bridge-svelte's TBP-813 / TBP-814 doc changes:
theming (matching your app's look, type and shadow tokens, the bridge
layer, Tailwind), mechanisms, config, the billing setup and onboarding
pages, and the billing, branding and sdk-auth agent guides. Also fixes the
add-billing page's stale paymentErrorRoute default (/payment-error).

Refs: TBP-944
…0.9.3: a checkout lands back in the app with a banner, and the app's CSS always wins (TBP-944)

Refs: TBP-944
@iman-nebulr
iman-nebulr merged commit b991bb2 into main Nov 10, 2026
9 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