From a9be40073dea056cc986c24ca8e58b1e77ba10a9 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:35:03 +0000 Subject: [PATCH 1/2] Remove LinkedIn Profile URL and Phone number fields from demo form - Remove linkedin_url and phone_number fields from DemoEvent dataclass - Remove LinkedIn Profile URL and Phone number input fields from form UI - Update form data mapping to exclude removed fields - Remove LinkedIn URL from notes content for enterprise follow-up - Remove linkedinUrl and phoneNumber from Slack payload - Update Cal.com URL for small companies to use reflex-intro-call - Add demo form test page at /demo-form route for testing The demo form now collects only essential information without optional LinkedIn and phone fields, streamlining the user experience while maintaining all core functionality for lead generation and routing. Co-Authored-By: Alek --- demo/demo/demo.py | 13 +++++++++++++ reflex_ui/blocks/demo_form.py | 23 +---------------------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/demo/demo/demo.py b/demo/demo/demo.py index d884642..6965fc6 100644 --- a/demo/demo/demo.py +++ b/demo/demo/demo.py @@ -3,6 +3,7 @@ import reflex as rx import reflex_ui as ui +from reflex_ui.blocks.demo_form import demo_form class State(rx.State): @@ -65,6 +66,17 @@ def index() -> rx.Component: ) +def demo_form_page() -> rx.Component: + return rx.el.div( + rx.el.h1("Demo Form", class_name="text-2xl font-bold mb-6"), + demo_form(class_name="max-w-md mx-auto"), + ui.theme_switcher(class_name="absolute top-4 right-4"), + class_name=ui.cn( + "flex flex-col items-center justify-center min-h-screen p-6", "bg-secondary-1" + ), + ) + + app = rx.App( stylesheets=["css/globals.css"], head_components=[ @@ -88,3 +100,4 @@ def index() -> rx.Component: ], ) app.add_page(index) +app.add_page(demo_form_page, route="/demo-form") diff --git a/reflex_ui/blocks/demo_form.py b/reflex_ui/blocks/demo_form.py index 0046659..71f1dbe 100644 --- a/reflex_ui/blocks/demo_form.py +++ b/reflex_ui/blocks/demo_form.py @@ -26,7 +26,7 @@ COMMONROOM_DESTINATION_ID = os.getenv("COMMONROOM_DESTINATION_ID", "") COMMONROOM_API_TOKEN = os.getenv("COMMONROOM_API_TOKEN", "") CAL_REQUEST_DEMO_URL = os.getenv( - "CAL_REQUEST_DEMO_URL", "https://cal.com/team/reflex/reflex-intro" + "CAL_REQUEST_DEMO_URL", "https://cal.com/team/reflex/reflex-intro-call" ) CAL_ENTERPRISE_FOLLOW_UP_URL = os.getenv( "CAL_ENTERPRISE_FOLLOW_UP_URL", @@ -58,13 +58,11 @@ class DemoEvent(PosthogEvent): first_name: str last_name: str company_email: str - linkedin_url: str job_title: str company_name: str num_employees: str internal_tools: str referral_source: str - phone_number: str = "" def input_field( @@ -281,7 +279,6 @@ async def on_submit(self, form_data: dict[str, Any]): notes_content = f""" Name: {form_data.get("first_name", "")} {form_data.get("last_name", "")} Business Email: {form_data.get("email", "")} -LinkedIn URL: {form_data.get("linkedin_profile_url", "")} Job Title: {form_data.get("job_title", "")} Company Name: {form_data.get("company_name", "")} Number of Employees: {form_data.get("number_of_employees", "")} @@ -316,13 +313,11 @@ async def send_demo_event(self, form_data: dict[str, Any]): first_name=first_name, last_name=last_name, company_email=form_data.get("email", ""), - linkedin_url=form_data.get("linkedin_profile_url", ""), job_title=form_data.get("job_title", ""), company_name=form_data.get("company_name", ""), num_employees=form_data.get("number_of_employees", ""), internal_tools=form_data.get("internal_tools", ""), referral_source=form_data.get("how_did_you_hear_about_us", ""), - phone_number=form_data.get("phone_number", ""), ) # Send data to PostHog, Common Room, and Slack @@ -400,13 +395,11 @@ async def send_data_to_slack(self, event_instance: DemoEvent): "lookingToBuild": event_instance.internal_tools, "businessEmail": event_instance.company_email, "howDidYouHear": event_instance.referral_source, - "linkedinUrl": event_instance.linkedin_url, "jobTitle": event_instance.job_title, "numEmployees": event_instance.num_employees, "companyName": event_instance.company_name, "firstName": event_instance.first_name, "lastName": event_instance.last_name, - "phoneNumber": event_instance.phone_number, } try: async with httpx.AsyncClient() as client: @@ -447,20 +440,6 @@ def get_component(cls, **props): ), class_name="grid grid-cols-2 gap-4", ), - input_field( - "Linkedin Profile URL", - "https://linkedin.com/in/your-profile", - "linkedin_profile_url", - "text", - False, - ), - input_field( - "Phone number", - "+1 (555) 123-4567", - "phone_number", - "tel", - False, - ), text_area_field( "What are you looking to build? *", "Please list any apps, requirements, or data sources you plan on using", From b65bd8b242a4f840080850a43788be1941e65061 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 19:13:50 +0000 Subject: [PATCH 2/2] Remove test demo form page - was only needed for verification The /demo-form route and demo_form_page function were added temporarily to test the form changes but are not part of the core requirements. Keeping the PR focused on just removing LinkedIn and phone fields. Co-Authored-By: Alek --- demo/demo/demo.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/demo/demo/demo.py b/demo/demo/demo.py index 6965fc6..d884642 100644 --- a/demo/demo/demo.py +++ b/demo/demo/demo.py @@ -3,7 +3,6 @@ import reflex as rx import reflex_ui as ui -from reflex_ui.blocks.demo_form import demo_form class State(rx.State): @@ -66,17 +65,6 @@ def index() -> rx.Component: ) -def demo_form_page() -> rx.Component: - return rx.el.div( - rx.el.h1("Demo Form", class_name="text-2xl font-bold mb-6"), - demo_form(class_name="max-w-md mx-auto"), - ui.theme_switcher(class_name="absolute top-4 right-4"), - class_name=ui.cn( - "flex flex-col items-center justify-center min-h-screen p-6", "bg-secondary-1" - ), - ) - - app = rx.App( stylesheets=["css/globals.css"], head_components=[ @@ -100,4 +88,3 @@ def demo_form_page() -> rx.Component: ], ) app.add_page(index) -app.add_page(demo_form_page, route="/demo-form")