Skip to content

Update pricing form#1720

Merged
tgberkeley merged 20 commits intomainfrom
update-pricing-form
Jan 12, 2026
Merged

Update pricing form#1720
tgberkeley merged 20 commits intomainfrom
update-pricing-form

Conversation

@Alek99
Copy link
Copy Markdown
Member

@Alek99 Alek99 commented Jan 10, 2026

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 10, 2026

Greptile Overview

Greptile Summary

This PR comprehensively replaces the Cal.com integration approach across the entire website, moving from custom Cal.com attributes (get_cal_attrs()) to a unified dialog-based approach (demo_form_dialog) provided by the reflex_ui library. The changes span 18 files including pricing pages, landing pages, navigation components, and blog content.

Key Changes

Form Integration Migration (15 files)

  • Replaced Cal.com direct integration with demo_form_dialog wrapper component across all "Book a Demo", "Contact Sales", and similar CTA buttons
  • Consistent pattern: All buttons now use demo_form_dialog(trigger=ui.button(...)) instead of ui.button(..., custom_attrs=get_cal_attrs())
  • Environment configuration: Added Cal.com redirect URLs in pcweb.py to route all demo forms to /thank-you page after submission

Telemetry Cleanup (3 files)

  • Removed PostHog integration: Deleted pcweb/telemetry/postog_metrics.py (93 lines) including PostHog event tracking and Slack webhook integration
  • Removed tracking pixels: Eliminated Clearbit, Common Room, PostHog, and RB2B trackers from pixels.py
  • Removed constant: Deleted POSTHOG_API_KEY from constants.py
  • Retained: Google Analytics and Unify tracking remain active

Sales Page Refactoring

  • Simplified sales.py: Removed 175 lines of custom form state management, httpx HTTP client logic, and manual form rendering
  • Delegation: Now relies entirely on reflex_ui.blocks.demo_form for form functionality

Benefits

  • Consistency: Single, unified approach for all demo request forms across the site
  • Reduced code duplication: Eliminates custom form state and HTTP client code
  • Centralized configuration: Environment variables control form redirect behavior
  • Simplified maintenance: Form logic now managed in reflex_ui library

Confidence Score: 4/5

  • This PR is safe to merge with minor cleanup recommended for commented code and unused dependencies.
  • The changes are well-executed and consistent across all files. The migration from Cal.com custom attributes to demo_form_dialog is implemented uniformly with no missing imports or broken references. However, two style issues prevent a perfect score: (1) commented-out code in plan_cards.py violates the project's custom rule, and (2) the posthog dependency remains in pyproject.toml despite the code using it being removed. These are non-critical cleanup items that don't affect functionality.
  • pcweb/pages/pricing/plan_cards.py (commented code on line 326) and pyproject.toml (unused posthog dependency)

Important Files Changed

File Analysis

Filename Score Overview
pcweb/pages/pricing/plan_cards.py 4/5 Replaced Cal.com integration with demo_form_dialog. Contains commented-out code on line 326 that should be removed.
pcweb/pages/sales.py 5/5 Significantly simplified by removing custom FormState and httpx logic, now delegates to reflex_ui demo_form. Clean refactoring.
pcweb/telemetry/pixels.py 5/5 Removed multiple tracking integrations (Clearbit, Common Room, PostHog, RB2B), keeping only Google Analytics and Unify.
pcweb/constants.py 3/5 Removed POSTHOG_API_KEY constant. However, posthog dependency still exists in pyproject.toml.
pcweb/pcweb.py 5/5 Added Cal.com environment variables to redirect to /thank-you page. Clean configuration.

Sequence Diagram

sequenceDiagram
    participant User
    participant WebPage
    participant DemoFormDialog
    participant CalComPopup
    participant ThankYouPage
    
    User->>WebPage: Clicks "Book a Demo" button
    WebPage->>DemoFormDialog: Opens dialog (from reflex_ui)
    DemoFormDialog->>CalComPopup: Renders Cal.com embed
    User->>CalComPopup: Fills out demo request form
    CalComPopup->>CalComPopup: Validates form data
    CalComPopup->>ThankYouPage: Redirects to /thank-you (via env vars)
    ThankYouPage->>User: Shows confirmation message
    
    Note over WebPage,DemoFormDialog: Replaced get_cal_attrs() with demo_form_dialog()
    Note over CalComPopup,ThankYouPage: Environment variables configure redirect URLs
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 99 to 102
REFLEX_DOMAIN = "reflex.dev"
TWITTER_CREATOR = "@getreflex"

# Posthog
POSTHOG_API_KEY = os.getenv("POSTHOG_API_KEY")

SLACK_DEMO_WEBHOOK_URL: str = os.environ.get("SLACK_DEMO_WEBHOOK_URL")
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.

The POSTHOG_API_KEY constant has been removed, but the posthog dependency still exists in pyproject.toml (line 19).

If PostHog is no longer being used (as evidenced by the deletion of pcweb/telemetry/postog_metrics.py and removal of PostHog trackers from pixels.py), consider also removing the posthog dependency from pyproject.toml to avoid unnecessary package installation.

This will reduce the dependency footprint and make the project's actual dependencies clearer.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: pcweb/constants.py
Line: 99:102

Comment:
The `POSTHOG_API_KEY` constant has been removed, but the `posthog` dependency still exists in `pyproject.toml` (line 19).

If PostHog is no longer being used (as evidenced by the deletion of `pcweb/telemetry/postog_metrics.py` and removal of PostHog trackers from `pixels.py`), consider also removing the `posthog` dependency from `pyproject.toml` to avoid unnecessary package installation.

This will reduce the dependency footprint and make the project's actual dependencies clearer.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

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

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 10, 2026

Additional Comments (1)

pcweb/pages/pricing/plan_cards.py
This commented-out code should be removed before merging.

Per the project's custom instruction rule: "Remove commented-out code before merging PRs."

If the monthly/yearly toggle functionality is intentionally disabled, consider removing this line entirely rather than leaving it commented out.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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

Comment:
This commented-out code should be removed before merging.

Per the project's custom instruction rule: "Remove commented-out code before merging PRs."

If the monthly/yearly toggle functionality is intentionally disabled, consider removing this line entirely rather than leaving it commented out.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

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

@tgberkeley tgberkeley merged commit fbac94f into main Jan 12, 2026
10 checks passed
@tgberkeley tgberkeley deleted the update-pricing-form branch January 12, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants