From 27c4754d7143c005aa060f72d7f49be58a211a56 Mon Sep 17 00:00:00 2001 From: Alek Petuskey Date: Wed, 29 Jan 2025 11:12:38 -0800 Subject: [PATCH] pricing update (#1192) * pricing update * Address comments * Address comments --------- Co-authored-by: Alek Petuskey --- pcweb/github.py | 30 +--------------- pcweb/pages/pricing/faq.py | 2 +- pcweb/pages/pricing/header.py | 2 +- pcweb/pages/pricing/pricing.py | 1 - pcweb/pages/pricing/table.py | 64 +++++++--------------------------- pcweb/pcweb.py | 3 -- 6 files changed, 15 insertions(+), 87 deletions(-) diff --git a/pcweb/github.py b/pcweb/github.py index 8514843c4c..3d1e9d7532 100644 --- a/pcweb/github.py +++ b/pcweb/github.py @@ -1,36 +1,8 @@ """Github stars count for the reflex repository.""" -import asyncio -import httpx - import reflex as rx -import contextlib - -GITHUB_API_URL = "https://api.github.com/repos/reflex-dev/reflex" - - -def get_stars_on_build(): - """Fetch the stars when app is built as default""" - resp = httpx.get(GITHUB_API_URL) - resp.raise_for_status() - data = resp.json() - return int(data.get("stargazers_count", 21000)) - - -REFLEX_STAR_COUNT = get_stars_on_build() - -async def fetch_count(): - """Fetch the stars count of the reflex repository.""" - try: - while True: - with contextlib.suppress(Exception): - global REFLEX_STAR_COUNT - data = httpx.get(GITHUB_API_URL).json() - REFLEX_STAR_COUNT = int(data["stargazers_count"]) - await asyncio.sleep(3600) - except asyncio.CancelledError: - pass +REFLEX_STAR_COUNT = 21500 class GithubStarState(rx.State): diff --git a/pcweb/pages/pricing/faq.py b/pcweb/pages/pricing/faq.py index bf0c909516..748dd0312b 100644 --- a/pcweb/pages/pricing/faq.py +++ b/pcweb/pages/pricing/faq.py @@ -129,5 +129,5 @@ def faq() -> rx.Component: class_name="max-w-[40rem] flex justify-center items-center flex-col mx-auto w-full gap-2", ), sales_button(), - class_name="flex flex-col gap-8 w-full max-w-[64.19rem] 2xl:border-x border-slate-4 2xl:border-b pb-[6rem]", + class_name="flex flex-col gap-8 w-full max-w-[64.19rem] 2xl:border-x border-slate-4 2xl:border-b pb-[6rem] pt-16", ) diff --git a/pcweb/pages/pricing/header.py b/pcweb/pages/pricing/header.py index 964462dc16..28085dfe53 100644 --- a/pcweb/pages/pricing/header.py +++ b/pcweb/pages/pricing/header.py @@ -5,7 +5,7 @@ def header() -> rx.Component: return rx.box( rx.el.h1( - "Find a plan that's right for you", + "Pricing that scales with you", class_name="gradient-heading font-semibold text-4xl xl:text-5xl text-center", ), rx.el.h2( diff --git a/pcweb/pages/pricing/pricing.py b/pcweb/pages/pricing/pricing.py index 8613416528..bb85450f4f 100644 --- a/pcweb/pages/pricing/pricing.py +++ b/pcweb/pages/pricing/pricing.py @@ -25,7 +25,6 @@ def pricing() -> rx.Component: plan_cards(), comparison_table_hosting(), comparison_table_oss(), - calculator_section(), faq(), class_name="flex flex-col relative justify-center items-center w-full", ), diff --git a/pcweb/pages/pricing/table.py b/pcweb/pages/pricing/table.py index 1e59d3a449..52cf9d76de 100644 --- a/pcweb/pages/pricing/table.py +++ b/pcweb/pages/pricing/table.py @@ -26,7 +26,7 @@ display: grid !important; grid-template-columns: minmax(100px, 1fr) repeat(4, minmax(100px, 1fr)) !important; padding: 1rem 2.5rem; - gap: 6rem !important; + gap: 1rem !important; } .rt-ScrollAreaViewport { padding-top: 2rem; @@ -35,10 +35,8 @@ FRAMEWORK_SECTION = [ ("Open Source Framework", True, True, True, True), - ("Templates", True, True, True, True), ("One Click Auth", False, False, True, True), ("Embed Reflex Apps", False, False, True, True), - ("Built-in Testing", False, False, True, True), ] REFLEX_BRANDING_SECTION = [ @@ -49,30 +47,17 @@ ("Number of Generations", "5/month", "100/month/seat", "250/month/seat", "Custom"), ] -DATABASE_SECTION = [ - ("Connect your own SQL DB", True, True, True, True), - ("Database Editor UI", False, False, True, True), - ("Database Migration Tool", False, False, True, True), -] - HOSTING_TEXT_SECTION = [ - ("Compute Limits", "1 CPU, .5GB", "5 CPU, 10GB", "Custom", "Custom"), ("Regions", "Single", "Multiple", "Multiple", "Multiple"), - ("Build logs", "7 day", "30 days", "90 days", "Custom"), - ("Runtime logs", "1 day", "7 days", "30 days", "Custom"), + ("Logs", "1 day", "30 days", "90 days", "Custom"), ] HOSTING_BOOLEAN_SECTION = [ ("CLI Deployments", True, True, True, True), + ("Automatic CI / CD Deploy (Github)", True, True, True, True), ("Custom Domains", False, True, True, True), - ("Automatic CI / CD Deploy (Github)", False, False, True, True), - ("Secrets", True, True, True, True), - ("Secret Manager", False, False, True, True), - ("App Analytics", False, False, True, True), - ("Traces", False, False, True, True), - ("Custom Alerts", False, False, True, True), - ("Rollbacks", False, False, True, True), - ("Large File Support", False, False, True, True), + ("Secret Manager", False, True, True, True), + ("App Analytics", False, True, True, True), ("On Prem Hosting", False, False, False, True), ] @@ -81,8 +66,6 @@ ("HTTP/SSL", True, True, True, True), ("DDos Protection", True, True, True, True), ("2 Factor Auth", True, True, True, True), - ("Rich Permissions Control", False, False, True, True), - ("Connect to Analytics Vendors", False, False, True, True), ("Audit Logs", False, False, False, True), ("SSO", False, False, False, True), ] @@ -92,10 +75,8 @@ ] SUPPORT_BOOLEAN_SECTION = [ - ("White Glove Onboarding", False, False, False, True), ("Support SLAs Available", False, False, False, True), - ("Migrate Existing Apps", False, False, False, True), - ("Priority Support with Reflex Engineering Team", False, False, False, True), + ("Personalized Onboarding", False, False, False, True), ("", "", "", "", ""), ] @@ -164,7 +145,7 @@ def create_table_row_header(name: list, coming_soon: bool = False) -> rx.Compone rx.table.column_header_cell("Team", class_name=STYLES["header_cell_sub"]), rx.table.column_header_cell("Enterprise", class_name=STYLES["header_cell_sub"]) ], - class_name="w-full [&>*:not(:first-child)]:text-center bg-slate-2 border border-slate-3 rounded-2xl z-[6] !h-[3.625rem] relative", + class_name="w-full [&>*:not(:first-child)]:text-center bg-slate-2 border border-slate-3 rounded-2xl z-[6] !h-[3.625rem] relative align-content center", padding_x="5rem !important", ) @@ -261,44 +242,23 @@ def table_body_hosting() -> rx.Component: def table_body_oss() -> rx.Component: return rx.table.root( - rx.el.style(TABLE_STYLE), rx.table.header( - create_table_row_header("Framework"), + create_table_row_header("AI", coming_soon=True), class_name="relative", ), create_table_body( - *[ - create_checkmark_row(feature, checks) - for feature, *checks in FRAMEWORK_SECTION - ], - *[create_table_row(row) for row in REFLEX_BRANDING_SECTION], + *[create_table_row(row) for row in REFLEX_AI_SECTION], ), rx.table.header( - create_table_row_header("Database"), + create_table_row_header("Framework"), class_name="relative", ), create_table_body( *[ create_checkmark_row(feature, checks) - for feature, *checks in DATABASE_SECTION + for feature, *checks in FRAMEWORK_SECTION ], - ), - rx.table.header( - create_table_row_header("AI", coming_soon=True), - class_name="relative", - ), - create_table_body( - *[create_table_row(row) for row in REFLEX_AI_SECTION], - ), - create_table_body( - rx.table.row( - rx.table.cell(), - *[ - rx.table.cell(create_action_button(text, variant, extra)) - for text, variant, extra in PLAN_BUTTONS - ], - class_name="w-full [&>*:not(:first-child)]:text-center bg-slate-1 !py-[1.25rem] border-y border-slate-4 !h-[76px] relative", - ), + *[create_table_row(row) for row in REFLEX_BRANDING_SECTION], ), create_table_body( *[create_table_row(row) for row in ASTERIX_SECTION], diff --git a/pcweb/pcweb.py b/pcweb/pcweb.py index 96719f0d14..6d5b038bf3 100644 --- a/pcweb/pcweb.py +++ b/pcweb/pcweb.py @@ -5,7 +5,6 @@ import reflex as rx from pcweb import styles -from pcweb.github import fetch_count from pcweb.pages import page404, routes from pcweb.pages.docs import outblocks, exec_blocks from pcweb.whitelist import _check_whitelisted_path @@ -144,5 +143,3 @@ app.add_page(lambda: rx.fragment(), route=source, on_load=rx.redirect(target)) app.add_page(page404.component, route=page404.path) - -app.register_lifespan_task(fetch_count)