Skip to content

Created a template for the secondary user product card in account overview#1671

Draft
enesihsa wants to merge 3 commits into
mainfrom
ea/multiple-accounts/secondary-user-account-overview
Draft

Created a template for the secondary user product card in account overview#1671
enesihsa wants to merge 3 commits into
mainfrom
ea/multiple-accounts/secondary-user-account-overview

Conversation

@enesihsa

Copy link
Copy Markdown
Contributor

TODO

Current situation/background

What does this PR change?

Next steps/further info

@enesihsa enesihsa added the feature Departmental tracking: work on a new feature label Jun 10, 2026
</div>
{groupedProductType.tierLabel && (
{isSecondary &&
primarySubscriber && ( // TODO Separate more properly.

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.

This is the main addition, makes it look like there is plenty of changes but not really, much is indentation. This conditional section renders the shared subscription details and leave subscription Card.Sections. Currently combined into a single one but there probably is a better way to do this?

</Card.Section>
</>
)}
{!isSecondary && (

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.

This also causes many indentation changes.

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.

!isSecondary just renders what we had before right?

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.

Yes, I think by default we show billing information and payment method since all other plans require some form of payment, but this is the only one that doesn't show these.

Comment on lines 313 to 321
{cardConfig.getBenefitsSectionCopy && nextPaymentDetails && (
<Card.Section backgroundColor="#edf5fA" removeBorders>
<p css={benefitsTextCss}>
{cardConfig.getBenefitsSectionCopy(
nextPaymentDetails,
)}
{isSecondary && primarySubscriber // TODO should probably find a better way to do this too.
? `You're enjoying ${mainPlan.name} as part of a shared subscription.`
: cardConfig.getBenefitsSectionCopy(
nextPaymentDetails,
)}
</p>

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.

It's possible that nextPaymentDetails will not exist, so
cardConfig.getBenefitsSectionCopy && nextPaymentDetails
Will always test false. You could do something like:
cardConfig.getBenefitsSectionCopy && (nextPaymentDetails || isSecondary) && (
And then
isSecondary ? "you are enjoying copy" : cardConfig.getBenefitsSectionCopy()

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.

Ah thanks, missed this one. Another question I had was would it be possible to have the secondary user details in the getBenefitsSectionCopy too (or a more generic way of fetching them), currently it has one for each Zuora subscription type I think, but there are exceptions now for secondary users and GW Gift subscriptions.

</div>
{groupedProductType.tierLabel && (
{isSecondary &&
primarySubscriber && ( // TODO Separate more properly.

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.

out of curiosity, why is the primarySubscriber needed?

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 product card will show the details (full name and email) of the associated primary user according to the figma models. In practice they preferably should come together (ie if the user is secondary then I assume backend should always return the primary user's details too?)

I should combine the primarySubscriber into determining isSecondary value probably unless if there's a scenario where we may have one but not the other.

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.

Ah ok, primarySubscriber is the owner of the original plan. That makes sense 👍 Oka, yeah you can put them together somewhere, as you are doing this check a couple of times across the file

@j-ruda-guardian j-ruda-guardian left a comment

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.

I think this looks good. May I ask you for a change that will make reviewing this files a lot easier:
Please, take the new secondary user card and extract it to a new file (This ProductCard file is already more than crowded enough) and then import it and render it conditionally like you are doing. That might solve this indentation nightmare and will also make the whole thing easier to review!

nice work, thank you!

@enesihsa enesihsa force-pushed the ea/multiple-accounts/secondary-user-account-overview branch from 044e650 to a756302 Compare June 15, 2026 14:32
@enesihsa enesihsa force-pushed the ea/multiple-accounts/secondary-user-account-overview branch from deb41d5 to a756302 Compare June 23, 2026 15:50
@enesihsa enesihsa force-pushed the ea/multiple-accounts/secondary-user-account-overview branch from 16d4f8c to 0567ca5 Compare June 23, 2026 16:10
/>
<JoinDateRow
}) =>
!primaryUser && (

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.

I am really confused as to why this keeps causing the same issue. At least it's much more manageable here and easier to verify that nothing actually changes apart from the addition of this condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants