-
Notifications
You must be signed in to change notification settings - Fork 8k
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
show upgrade badge and hide /team/null when team unpublished #7059
show upgrade badge and hide /team/null when team unpublished #7059
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
apps/web/pages/event-types/index.tsx
Outdated
@@ -60,6 +60,8 @@ import SkeletonLoader from "@components/eventtype/SkeletonLoader"; | |||
|
|||
import { ssrInit } from "@server/lib/ssr"; | |||
|
|||
import { UpgradeTeamsBadge } from "../../../../packages/ui/components/badge/UpgradeTeamsBadge"; |
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.
import { UpgradeTeamsBadge } from "../../../../packages/ui/components/badge/UpgradeTeamsBadge"; | |
import { UpgradeTeamsBadge } from "@calcom/ui/components/badge/UpgradeTeamsBadge"; |
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.
@sean-brydon does this really belong in @calcom/ui? NIT
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.
Likely not to be honest @emrysal
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.
true. its a smart component, better in features
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.
but we actually dont wanna use this component at all haha
You can create a unpublished team by going to step one of create a team -> Then just hit back or navigate back to localhost:3000 |
actually the badge needs to link to stripe not to /teams we need to replace that @zomars |
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.
Approved although it is not clear whether your request for feedback was intended to be a blocker @PeerRich (just approving and not auto-merge in case it was)
apps/web/pages/event-types/index.tsx
Outdated
{`/${group.profile.slug}/${type.slug}`} | ||
</small> | ||
) : ( | ||
<UpgradeTeamsBadge /> |
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.
@zomars can we give this a props => upgradeLink={true} that uses the "upgrade" stripe api link vs the /team url
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.
keep the logic with tooltip etc but link to the stripe checkout
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.
No need to prop AFAIK. we can encapsulate that logic in the components itself.
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 sure what that means but if you have a free minute may you wanna add that? you built the initial "upgrade here" top bar banner
asked @CarinaWolli to help make a new prop that makes the Upgrade batch link to stripe instead fo /teams |
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.
@PeerRich the <UpgradeTeamsBadge/>
only shows when the user doesn't already have a paid plan (so no team and not premium user name). So it's not working for that case as user can already have teams or a premium name and we still want the upgrade badge here to upgrade their new team
…null-teams-and-hide-slug
📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖
|
Page | Size (compressed) |
---|---|
global |
210.05 KB (🟡 +1 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
One Page Changed Size
The following page changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load | % of Budget (350 KB ) |
---|---|---|---|
/event-types |
354.68 KB |
564.73 KB | 161.35% (🟡 +0.02%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link
is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.
I made changes myself, needs someone else to review my changes 🙏
…7059) * untested but i think this works * fix upgrade badge --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com>
…7059) * untested but i think this works * fix upgrade badge --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com>
untested but i think this works
@zomars how can i test an unpublished team on localhost?