Skip to content

Consolidate benefits display into single card - #754

Open
allanlasser wants to merge 5 commits into
masterfrom
allanlasser/issue753
Open

Consolidate benefits display into single card#754
allanlasser wants to merge 5 commits into
masterfrom
allanlasser/issue753

Conversation

@allanlasser

@allanlasser allanlasser commented Jul 27, 2026

Copy link
Copy Markdown
Member

Closes #753

  • Adds new "benefits" field to Entitlement, which Plan can compose into a single list.
  • Falls back to existing Plan.benefits value, deduplicating strings when possible.
  • Shows a single "As a member of Org A, Org B, you inherit: "
  • Shows the same consolidated benefits list for multiple owned plans.

@allanlasser
allanlasser requested a review from dnass July 27, 2026 15:37
@allanlasser
allanlasser temporarily deployed to squarelet-pi-allanlasse-niijsa July 27, 2026 15:40 Inactive
Comment thread squarelet/organizations/models/organization.py Outdated
Comment thread squarelet/templates/organizations/includes/plan_card.html Outdated
@allanlasser allanlasser linked an issue Jul 27, 2026 that may be closed by this pull request
@allanlasser
allanlasser force-pushed the 677-redesign-billing branch from 8d07584 to ed59dad Compare July 28, 2026 20:26
@allanlasser
allanlasser changed the base branch from 677-redesign-billing to release-billing-ui July 28, 2026 21:45
@allanlasser allanlasser added this to the Payments & Plans milestone Aug 4, 2026
@allanlasser
allanlasser requested a review from dnass August 7, 2026 20:01
Comment thread squarelet/templates/organizations/includes/plan_card.html Outdated
Comment thread squarelet/organizations/views/detail.py
Comment thread squarelet/users/views.py
Comment thread squarelet/users/views.py
Comment on lines 204 to 209
return [
(org, sub.plan)
for org in user.organizations.filter(individual=False)
for sub in org.subscriptions.select_related("plan")
if not sub.plan.free
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't seem to handle member orgs that inherit plans from a parent, only orgs with their own direct subscriptions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's still an issue here with multiple levels of benefit inheritance. Here's an org that has its own subscription plus an inherited subscription via an affiliation:

Image

A user in this org only sees the inherited benefits from the org's direct subscription, not the org's own inherited benefits:
Image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's a comment that says:

Plans the org inherits from parents/groups are intentionally excluded here -- those are an org-level concept and confuse users when surfaced on their personal page

but that's from before we were consolidating the benefits. IMO it's now more confusing NOT to include inherited benefits. In this context, users have no reason to know or care whether they have 50 requests because of their org's subscription or their org's affiliate's subscription — they should see the full total of benefits available to them.

@allanlasser
allanlasser force-pushed the release-billing-ui branch 2 times, most recently from f643585 to 6590b34 Compare August 18, 2026 19:43
- Adds new "benefits" field to `Entitlement`, which `Plan` can compose into a single list.
- Falls back to existing `Plan.benefits` value, deduplicating strings when possible.
- Shows a single "As a member of Org A, Org B, you inherit: <benefits list>"
@allanlasser
allanlasser force-pushed the allanlasser/issue753 branch from 89143f5 to 4bfa43f Compare August 26, 2026 11:09
@allanlasser
allanlasser changed the base branch from release-billing-ui to master August 26, 2026 11:34
@allanlasser
allanlasser requested a review from dnass August 26, 2026 12:20
Comment thread squarelet/users/views.py
Comment on lines 204 to 209
return [
(org, sub.plan)
for org in user.organizations.filter(individual=False)
for sub in org.subscriptions.select_related("plan")
if not sub.plan.free
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's still an issue here with multiple levels of benefit inheritance. Here's an org that has its own subscription plus an inherited subscription via an affiliation:

Image

A user in this org only sees the inherited benefits from the org's direct subscription, not the org's own inherited benefits:
Image

{% trans "You&rsquo;re inheriting these benefits as a member of" %}
{% else %}
{% trans "Inherits" %}
{% trans "Inherits these benefits as a member of" %}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be "as an affiliate of"?

</div>

{% if subscription_benefits %}
<div class="plan-detail">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Feels like either the row gaps should be uniform here or Included benefits should be visually offset some other way, like in a nested box.

Image

Comment thread squarelet/users/views.py
Comment on lines 204 to 209
return [
(org, sub.plan)
for org in user.organizations.filter(individual=False)
for sub in org.subscriptions.select_related("plan")
if not sub.plan.free
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's a comment that says:

Plans the org inherits from parents/groups are intentionally excluded here -- those are an org-level concept and confuse users when surfaced on their personal page

but that's from before we were consolidating the benefits. IMO it's now more confusing NOT to include inherited benefits. In this context, users have no reason to know or care whether they have 50 requests because of their org's subscription or their org's affiliate's subscription — they should see the full total of benefits available to them.

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.

Consolidate inherited subscriptions/benefits

2 participants