Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 38 additions & 39 deletions pcweb/pages/pricing/plan_cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from reflex_ui.blocks.demo_form import demo_form_dialog

from pcweb.components.hosting_banner import HostingBannerState
from pcweb.components.number_flow import number_flow
from pcweb.constants import PRO_TIERS_TABLE, REFLEX_BUILD_URL, REFLEX_CLOUD_URL

Copy link
Contributor

Choose a reason for hiding this comment

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

logic: REFLEX_CLOUD_URL is imported but never used - remove it

Suggested change
from pcweb.constants import PRO_TIERS_TABLE, REFLEX_BUILD_URL

Context Used: Rule from dashboard - Remove commented-out code before merging PRs. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/pages/pricing/plan_cards.py
Line: 11:11

Comment:
**logic:** `REFLEX_CLOUD_URL` is imported but never used - remove it

```suggestion
from pcweb.constants import PRO_TIERS_TABLE, REFLEX_BUILD_URL
```

**Context Used:** Rule from `dashboard` - Remove commented-out code before merging PRs. ([source](https://app.greptile.com/review/custom-context?memory=d49e2a0e-27a4-4cd6-b764-58c8a6fc4032))

How can I resolve this? If you propose a fix, please make it concise.

YEARLY_MONTHS_FREE = 2 # 2 months free
Expand Down Expand Up @@ -199,43 +198,43 @@ def pricing_cards() -> rx.Component:
target="_blank",
),
),
card(
"Pro",
number_flow(
value=rx.cond(
monthly_yearly_toggle_cs.value == "monthly",
ProTierState.selected_tier["price"],
round(
ProTierState.selected_tier["price"]
* YEARLY_DISCOUNT_MULTIPLIER,
1,
),
),
trend="0",
prefix="$",
suffix=" /monthly",
class_name="text-3xl text-secondary-12 font-semibold py-4",
),
"Build, deploy and scale your apps.",
[
Feature("TokenCircleIcon", "", pro_tiers_select()),
Feature("SquareLock02Icon", "Private Projects"),
Feature("CursorInWindowIcon", "Full-Fledged Browser IDE"),
Feature("PlugSocketIcon", "Integrations"),
Feature("GithubIcon", "Connect to Github"),
Feature("Globe02Icon", "Custom Domains"),
Feature("CpuIcon", "Up to 8 GB RAM / 4 vCPU per deployed app"),
],
ui.button(
"Start with Pro plan",
variant="secondary",
size="lg",
class_name="w-full font-semibold",
on_click=ProTierState.redirect_to_billing(
monthly_yearly_toggle_cs.value == "yearly"
),
),
),
# card(
# "Pro",
# number_flow(
# value=rx.cond(
# monthly_yearly_toggle_cs.value == "monthly",
# ProTierState.selected_tier["price"],
# round(
# ProTierState.selected_tier["price"]
# * YEARLY_DISCOUNT_MULTIPLIER,
# 1,
# ),
# ),
# trend="0",
# prefix="$",
# suffix=" /monthly",
# class_name="text-3xl text-secondary-12 font-semibold py-4",
# ),
# "Build, deploy and scale your apps.",
# [
# Feature("TokenCircleIcon", "", pro_tiers_select()),
# Feature("SquareLock02Icon", "Private Projects"),
# Feature("CursorInWindowIcon", "Full-Fledged Browser IDE"),
# Feature("PlugSocketIcon", "Integrations"),
# Feature("GithubIcon", "Connect to Github"),
# Feature("Globe02Icon", "Custom Domains"),
# Feature("CpuIcon", "Up to 8 GB RAM / 4 vCPU per deployed app"),
# ],
# ui.button(
# "Start with Pro plan",
# variant="secondary",
# size="lg",
# class_name="w-full font-semibold",
# on_click=ProTierState.redirect_to_billing(
# monthly_yearly_toggle_cs.value == "yearly"
# ),
# ),
# ),
popular_card(
Comment on lines +202 to 238
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Remove commented-out code before merging

Suggested change
# "Pro",
# number_flow(
# value=rx.cond(
# monthly_yearly_toggle_cs.value == "monthly",
# ProTierState.selected_tier["price"],
# round(
# ProTierState.selected_tier["price"]
# * YEARLY_DISCOUNT_MULTIPLIER,
# 1,
# ),
# ),
# trend="0",
# prefix="$",
# suffix=" /monthly",
# class_name="text-3xl text-secondary-12 font-semibold py-4",
# ),
# "Build, deploy and scale your apps.",
# [
# Feature("TokenCircleIcon", "", pro_tiers_select()),
# Feature("SquareLock02Icon", "Private Projects"),
# Feature("CursorInWindowIcon", "Full-Fledged Browser IDE"),
# Feature("PlugSocketIcon", "Integrations"),
# Feature("GithubIcon", "Connect to Github"),
# Feature("Globe02Icon", "Custom Domains"),
# Feature("CpuIcon", "Up to 8 GB RAM / 4 vCPU per deployed app"),
# ],
# ui.button(
# "Start with Pro plan",
# variant="secondary",
# size="lg",
# class_name="w-full font-semibold",
# on_click=ProTierState.redirect_to_billing(
# monthly_yearly_toggle_cs.value == "yearly"
# ),
# ),
# ),
popular_card(

Context Used: Rule from dashboard - Remove commented-out code before merging PRs. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/pages/pricing/plan_cards.py
Line: 202:238

Comment:
**logic:** Remove commented-out code before merging

```suggestion
```

**Context Used:** Rule from `dashboard` - Remove commented-out code before merging PRs. ([source](https://app.greptile.com/review/custom-context?memory=d49e2a0e-27a4-4cd6-b764-58c8a6fc4032))

How can I resolve this? If you propose a fix, please make it concise.

"Enterprise",
"Custom",
Expand Down Expand Up @@ -263,7 +262,7 @@ def pricing_cards() -> rx.Component:
),
),
),
class_name="grid xl:grid-cols-3 grid-cols-1 gap-4 w-full",
class_name="grid grid-cols-1 xl:grid-cols-2 gap-4 w-full xl:w-auto mx-auto justify-items-center",
)


Expand Down
210 changes: 165 additions & 45 deletions pcweb/pages/pricing/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,127 @@
from reflex_ui.blocks.demo_form import demo_form_dialog

from pcweb.components.hosting_banner import HostingBannerState
from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL
from pcweb.constants import REFLEX_BUILD_URL # , REFLEX_CLOUD_URL
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: REFLEX_CLOUD_URL is commented out but never used - remove the commented import

Suggested change
from pcweb.constants import REFLEX_BUILD_URL # , REFLEX_CLOUD_URL
from pcweb.constants import REFLEX_BUILD_URL

Context Used: Rule from dashboard - Remove commented-out code before merging PRs. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/pages/pricing/table.py
Line: 6:6

Comment:
**logic:** `REFLEX_CLOUD_URL` is commented out but never used - remove the commented import

```suggestion
from pcweb.constants import REFLEX_BUILD_URL
```

**Context Used:** Rule from `dashboard` - Remove commented-out code before merging PRs. ([source](https://app.greptile.com/review/custom-context?memory=d49e2a0e-27a4-4cd6-b764-58c8a6fc4032))

How can I resolve this? If you propose a fix, please make it concise.


CLOUD_HOSTING_FEATURES = [
("Max # Apps", "1", "5", "10"),
("Max Machine Size", "1cpu, 1gb", "2cpu, 4gb shared", "Beyond 2cpu, 4gb"),
("Dedicated Machines", False, False, True),
("Custom Domains", "0", "5", "Unlimited"),
("App Metrics", True, True, True),
("Log Retention", "1 hour", "7 day", "90-Day Log History"),
("Multiple Regions", False, True, True),
('"Built with Reflex" Attribution', True, False, False),
("One-click rollbacks", True, True, True),
(
"Max # Apps",
"1",
# "5",
"10",
),
(
"Max Machine Size",
"1cpu, 1gb",
# "2cpu, 4gb shared",
"Beyond 2cpu, 4gb",
),
(
"Dedicated Machines",
False,
# False,
True,
),
(
"Custom Domains",
"0",
# "5",
"Unlimited",
),
(
"App Metrics",
True,
# True,
True,
),
(
"Log Retention",
"1 hour",
# "7 day",
"90-Day Log History",
),
(
"Multiple Regions",
False,
# True,
True,
),
(
'"Built with Reflex" Attribution',
True,
# False,
False,
),
(
"One-click rollbacks",
True,
# True,
True,
),
]
Comment on lines 8 to 63
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

Context Used: Rule from dashboard - Remove commented-out code before merging PRs. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/pages/pricing/table.py
Line: 8:63

Comment:
**logic:** Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

**Context Used:** Rule from `dashboard` - Remove commented-out code before merging PRs. ([source](https://app.greptile.com/review/custom-context?memory=d49e2a0e-27a4-4cd6-b764-58c8a6fc4032))

How can I resolve this? If you propose a fix, please make it concise.


SECURITY_FEATURES = [
("SSO/SAML", False, True, True),
("Role-based access control", False, False, True),
("On Premise Deployments", False, False, True),
("Audit Logs", False, False, True),
("HTTP/SSL", True, True, True),
("Web App Firewall", True, True, True),
("SOC 2 compliance", False, False, "On prem, custom"),
("HIPAA BAA", False, False, "On prem, custom"),
(
"SSO/SAML",
False,
# True,
True,
),
(
"Role-based access control",
False,
# False,
True,
),
(
"On Premise Deployments",
False,
# False,
True,
),
(
"Audit Logs",
False,
# False,
True,
),
(
"HTTP/SSL",
True,
# True,
True,
),
(
"Web App Firewall",
True,
# True,
True,
),
(
"SOC 2 compliance",
False,
# False,
"On prem, custom",
),
(
"HIPAA BAA",
False,
# False,
"On prem, custom",
),
]
Comment on lines 65 to 114
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

Context Used: Rule from dashboard - Remove commented-out code before merging PRs. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/pages/pricing/table.py
Line: 65:114

Comment:
**logic:** Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

**Context Used:** Rule from `dashboard` - Remove commented-out code before merging PRs. ([source](https://app.greptile.com/review/custom-context?memory=d49e2a0e-27a4-4cd6-b764-58c8a6fc4032))

How can I resolve this? If you propose a fix, please make it concise.


SUPPORT_FEATURES = [
(
"Customer Success",
"Discord/Github Community",
"Discord/Github Community",
# "Discord/Github Community",
"Dedicated Support Channel",
),
(
"Onboarding",
"Documentation",
"Documentation",
# "Documentation",
"Get a forward deployed engineer to help you get started",
),
]
Comment on lines 116 to 129
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

Context Used: Rule from dashboard - Remove commented-out code before merging PRs. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/pages/pricing/table.py
Line: 116:129

Comment:
**logic:** Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

**Context Used:** Rule from `dashboard` - Remove commented-out code before merging PRs. ([source](https://app.greptile.com/review/custom-context?memory=d49e2a0e-27a4-4cd6-b764-58c8a6fc4032))

How can I resolve this? If you propose a fix, please make it concise.

Expand All @@ -47,46 +132,81 @@
(
"Credits",
"50 daily credits (up to 150/month)",
"1000 monthly credits",
# "1000 monthly credits",
"Custom",
),
("Agent (10 Credits per msg)", True, True, True),
("Chat (1 Credit)", True, True, True),
(
"Agent (10 Credits per msg)",
True,
# True,
True,
),
(
"Chat (1 Credit)",
True,
# True,
True,
),
]

REFLEX_BUILD_FUNCTIONALITY = [
(
"Privacy",
"Public Projects",
"Private Projects",
# "Private Projects",
"Private Projects /Group based controls",
),
(
"Design",
"Custom Designs/Theming",
# "Custom Designs/Theming",
"Custom Designs/Theming",
"Custom Designs/Theming",
),
("Data", False, False, "Opt out of data training"),
("Collaborators", "Single", "Single", "Multiple Collaborators/Editors"),
("Integration", "Basic 5", "Pro 100+", "Enterprise Integrations"),
("Download App Code", False, True, True),
(
"Data",
False,
# False,
"Opt out of data training",
),
(
"Collaborators",
"Single",
# "Single",
"Multiple Collaborators/Editors",
),
(
"Integration",
"Basic 5",
# "Pro 100+",
"Enterprise Integrations",
),
(
"Download App Code",
False,
# True,
True,
),
]
Comment on lines 152 to 189
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

Context Used: Rule from dashboard - Remove commented-out code before merging PRs. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/pages/pricing/table.py
Line: 152:189

Comment:
**logic:** Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

**Context Used:** Rule from `dashboard` - Remove commented-out code before merging PRs. ([source](https://app.greptile.com/review/custom-context?memory=d49e2a0e-27a4-4cd6-b764-58c8a6fc4032))

How can I resolve this? If you propose a fix, please make it concise.


REFLEX_BUILD_DEPLOYMENT = [
(
"Github",
"Public Repo Sync",
"Private Repo Sync",
# "Private Repo Sync",
"Enterprise Repo Sync Github, Gitlab, and Bitbucket.",
),
(
"One Click Deploy",
"Reflex Cloud",
"Reflex Cloud",
# "Reflex Cloud",
"Databricks, AWS, Azure, GCP, Other",
),
("SSH access", False, True, True),
(
"SSH access",
False,
# True,
True,
),
]
Comment on lines 191 to 210
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

Context Used: Rule from dashboard - Remove commented-out code before merging PRs. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/pages/pricing/table.py
Line: 191:210

Comment:
**logic:** Remove commented-out middle column values (Pro tier) from feature tuples

The tuples should only contain 2 values (Hobby and Enterprise), not 3 with the middle one commented out

**Context Used:** Rule from `dashboard` - Remove commented-out code before merging PRs. ([source](https://app.greptile.com/review/custom-context?memory=d49e2a0e-27a4-4cd6-b764-58c8a6fc4032))

How can I resolve this? If you propose a fix, please make it concise.



Expand Down Expand Up @@ -215,18 +335,18 @@ def header_item(text: str, button: rx.Component) -> rx.Component:
),
),
# Pro column with button
header_item(
"Pro",
ui.link(
render_=ui.button(
"Upgrade now",
variant="secondary",
class_name="font-semibold w-full",
),
to=f"{REFLEX_CLOUD_URL.rstrip('/')}/?redirect_url={REFLEX_CLOUD_URL.rstrip('/')}/billing/",
target="_blank",
),
),
# header_item(
# "Pro",
# ui.link(
# render_=ui.button(
# "Upgrade now",
# variant="secondary",
# class_name="font-semibold w-full",
# ),
# to=f"{REFLEX_CLOUD_URL.rstrip('/')}/?redirect_url={REFLEX_CLOUD_URL.rstrip('/')}/billing/",
# target="_blank",
# ),
# ),
Comment on lines +338 to +349
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Remove commented-out Pro tier header

Suggested change
# header_item(
# "Pro",
# ui.link(
# render_=ui.button(
# "Upgrade now",
# variant="secondary",
# class_name="font-semibold w-full",
# ),
# to=f"{REFLEX_CLOUD_URL.rstrip('/')}/?redirect_url={REFLEX_CLOUD_URL.rstrip('/')}/billing/",
# target="_blank",
# ),
# ),

Context Used: Rule from dashboard - Remove commented-out code before merging PRs. (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/pages/pricing/table.py
Line: 338:349

Comment:
**logic:** Remove commented-out Pro tier header

```suggestion
```

**Context Used:** Rule from `dashboard` - Remove commented-out code before merging PRs. ([source](https://app.greptile.com/review/custom-context?memory=d49e2a0e-27a4-4cd6-b764-58c8a6fc4032))

How can I resolve this? If you propose a fix, please make it concise.

# Enterprise column with button
header_item(
"Enterprise",
Expand All @@ -238,7 +358,7 @@ def header_item(text: str, button: rx.Component) -> rx.Component:
)
),
),
class_name="grid grid-cols-4 gap-6 p-4",
class_name="grid grid-cols-3 gap-6 p-4",
),
class_name=(
"sticky z-10 bg-slate-1 border-x border-slate-4 border-y",
Expand Down