Skip to content

Redesign Squarelet billing pages - #716

Merged
allanlasser merged 86 commits into
release-billing-uifrom
677-redesign-billing
Jul 28, 2026
Merged

Redesign Squarelet billing pages#716
allanlasser merged 86 commits into
release-billing-uifrom
677-redesign-billing

Conversation

@dnass

@dnass dnass commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@allanlasser
allanlasser temporarily deployed to squarelet-pi-677-redesi-v2n1vz July 6, 2026 12:13 Inactive
@allanlasser
allanlasser temporarily deployed to squarelet-pi-677-redesi-v2n1vz July 6, 2026 12:38 Inactive
Comment thread squarelet/organizations/views/subscription.py Outdated
Comment thread squarelet/organizations/urls.py Outdated
Comment thread squarelet/organizations/views/subscription.py Outdated
Comment thread squarelet/organizations/views/subscription.py Outdated
Comment thread squarelet/templates/subscriptions/manage_subscriptions.html
@mitchelljkotler
mitchelljkotler self-requested a review July 6, 2026 17:52
@allanlasser
allanlasser self-requested a review July 6, 2026 17:53
@allanlasser
allanlasser temporarily deployed to squarelet-pi-677-redesi-v2n1vz July 6, 2026 21:20 Inactive
@allanlasser
allanlasser temporarily deployed to squarelet-pi-677-redesi-v2n1vz July 6, 2026 21:21 Inactive
@allanlasser
allanlasser temporarily deployed to squarelet-pi-677-redesi-v2n1vz July 7, 2026 13:29 Inactive
@allanlasser
allanlasser temporarily deployed to squarelet-pi-677-redesi-v2n1vz July 7, 2026 19:22 Inactive

@mitchelljkotler mitchelljkotler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like it is still under development, let me know if you have any questions

Comment thread squarelet/organizations/views/detail.py Outdated
Comment thread squarelet/subscriptions/views.py Outdated
Comment thread squarelet/subscriptions/views.py Outdated
form_class = UpdateSubscriptionFrequencyForm
template_name = "subscriptions/update_subscription_frequency.html"

def get_queryset(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You shouldn't need to override get_queryset or get_object here - it should do the right thing if you pass in a slug as a kwarg from the URL

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The route 404s when I remove these overrides. The URL also contains the subscription pk, could that be the issue?

Comment thread squarelet/subscriptions/views.py Outdated
form_class = CancelSubscriptionForm
template_name = "subscriptions/cancel_subscription.html"

def get_queryset(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here

Comment thread squarelet/users/views.py Outdated
@allanlasser
allanlasser temporarily deployed to squarelet-pi-677-redesi-v2n1vz July 7, 2026 20:33 Inactive
@dnass

dnass commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@mitchelljkotler Thanks for reviewing. The only piece of this I haven't tackled yet is switching from a monthly plan to annual or vice versa. I'm happy to take a crack at it if you can lay out the general approach for me.

@mitchelljkotler
mitchelljkotler force-pushed the update-payment-handling-multiple-subscriptions branch from 452a3ad to 2b41be1 Compare July 8, 2026 13:34
@allanlasser

Copy link
Copy Markdown
Member

I made a few fixes and one change so far:

  1. FIX: calls individual_organization.subscriptions.first() when constructing context for the /selectplan view. It was erroring since it hadn't been updated to the multi-subscription assumption.
  2. FIX: adds proper card-call mocking for tests
  3. CHANGE: prefers username as the URL param for individual organizations, not the slug of the individual_organization. The slug and the username will diverge, like for my username (lasser.allan gets slugified to lasserallan), which breaks some pages. Individual organizations are an invisible concept for users, so it's better to prefer the username here. I added a class mixin for finding the right object based on whether we're dealing with an individual or group org.

Flagging that this should be rebased against master, and there'll be some merge conflicts along the way.

This was linked to issues Jul 13, 2026
@dnass
dnass force-pushed the 677-redesign-billing branch from b57613c to 8d673c3 Compare July 20, 2026 17:45
@dnass
dnass changed the base branch from update-payment-handling-multiple-subscriptions to master July 20, 2026 17:45
@gitguardian

gitguardian Bot commented Jul 20, 2026

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@dnass
dnass marked this pull request as ready for review July 20, 2026 17:46

@allanlasser allanlasser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We already have a squarelet/payments/forms.py and squarelet/payments/views.py—let's update those files intead of adding the subscriptions module.

@dnass
dnass force-pushed the 677-redesign-billing branch from 8d673c3 to bca21fb Compare July 22, 2026 14:40

@allanlasser allanlasser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • Need a consolidated view of all payments in addition to a payment history for a specific org. Let's use the templates/subscriptions/payments.html as a base for two layouts:
    1. A template "organization_payments.html" that lists just payments for a single org.
    2. A template "payments_hub.html" that list all payments a user can see, across all orgs they belong to. Just show the 5 most recent payments, with a link to view all payments for the org—this leads to the organziation_payments template.
  • Support removing cards
  • Activity stream logging when staff take actions for accountability
  • Update "Upgrade" button link (currently points to old payment page)
  • Modify current subscription in-place (upgrade/downgrade) for pro-ration benefits. No support for adding second subscription yet—will come in follow-up change. Moving this handling to a new branch and PR
  • Changing plan frequency is unimplemented Move change frequency feature to a new branch and PR #755
  • #753

@allanlasser

allanlasser commented Jul 24, 2026

Copy link
Copy Markdown
Member
Screenshot 2026-07-24 at 09 36 11

Belonging to an organization with multiple subscriptions creates some unintentional chaos on user profile pages. This worked well when there was just 1 subscription. Perhaps we can consolidate this into a single card—the most important information is the benefits a user inherits, and making that clear to them.

Update: I'm thinking about tying the benefits list data to entitlements; this way, benefits are an "plain language" description of the entitlement and they can be composed on plans.

Update 2: We can handle this separately without blocking this branch. I opened #753 to address.

Comment thread squarelet/templates/organizations/includes/plan_card.html Outdated
dnass and others added 27 commits July 28, 2026 16:16
1. Use username for user payment routes, not individual_org slug.
2. Protect individual payment routes to just object owners or staff.
The ability to change a subscription's billing frequency is not ready to
ship with the billing redesign. Extract this work-in-progress to the
677-billing-frequency branch and remove it here: the org and user
UpdateSubscriptionFrequency views, BaseUpdateSubscriptionFrequency,
UpdateSubscriptionFrequencyForm, both update-frequency URLs, the
update_subscription_frequency template, and the "Change to monthly/annual"
link on the manage subscriptions page. The informational Annual/Monthly
badge is kept.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@allanlasser
allanlasser force-pushed the 677-redesign-billing branch from 8d07584 to ed59dad Compare July 28, 2026 20:26
@allanlasser

Copy link
Copy Markdown
Member

This code is in great shape. I've moved any further changes onto dedicated branches for smaller, interative PRs upon this foundation. I'm merging this into a release-ready branch so we can mark it done, but hold off on merging until all the follow-on work is complete.

@allanlasser
allanlasser merged commit 4027157 into release-billing-ui Jul 28, 2026
5 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.

Redesign subscription page Showing incorrect receipts

3 participants