-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Account page improvements #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # template/app/src/user/AccountPage.tsx # template/e2e-tests/tests/utils.ts
@infomiho this is not urgent, but you did self-assign. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smaller comments - sorry it took so long to review!
<WaspRouterLink | ||
to={routes.PricingPageRoute.to} | ||
className='font-medium text-sm text-primary hover:text-primary/80 transition-colors duration-200' | ||
> | ||
<Button variant='link'>Buy More Credits</Button> | ||
</WaspRouterLink> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have some sort of asChild
or as
attribute on Link
so it renders as a button?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not as far as I can tell.
<Separator /> | ||
<div className='py-4 px-6'> | ||
<div className='grid grid-cols-1 sm:grid-cols-3 sm:gap-4'> | ||
<dt className='text-sm font-medium text-muted-foreground'>Credits</dt> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should dt
be used in dl
? https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was old code.
From what I can see we use "description list" but without <dl>
to emulate what looks like a table.
Really weird.
If we want a table we should use table. I think it might be best to turn all of these into <div>
for now.
Then later we can create a proper table.
Credits | ||
</dt> | ||
<dd className="text-foreground mt-1 text-sm sm:col-span-1 sm:mt-0"> | ||
{user.credits + " credits"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{user.credits + " credits"} | |
{user.credits} credits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This screws up the <dd>
rendering. It makes it have 2 children instead of one.
Which screws up locator
text search in playwright
.
Actually wanted to have it that way. 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually works now that we no longer have <dd>
Always display both subscription plan and credits information.
Currently, when subscriptions ends we don't display credits even though users use them.
This is because we rely on
subscriptionStatus && subscriptionPlan && datePaid
being null/undefined to show credits.This fixes #503
Always display customer portal link button ("manage payment details") if possible. User's may use it to view past invoices, so it is important even when we don't have a subscription. Previously we only displayed it when we had subscription data.
Rename the "buy more/upgrade" button to "buy more credits" and move it to credits row.
Display it only if no active subscription.
If we want to manage/upgrade subscription we can always use the "manage payment details" button.
Only thing we need to navigate to pricing page for is to buy more credits.