Skip to content

Commit d9a8379

Browse files
authored
ENG-7375: AI builder nav item + bump (#1589)
* ENG-7375: AI builder nav item + bump * update
1 parent 84bd61e commit d9a8379

File tree

4 files changed

+593
-520
lines changed

4 files changed

+593
-520
lines changed

pcweb/components/docpage/navbar/navbar.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
from pcweb.pages.blog.paths import blog_data
1111
from pcweb.pages.docs import ai_builder, getting_started
1212
from pcweb.pages.faq import faq
13-
from pcweb.pages.use_cases.use_cases import use_cases_page
1413
from pcweb.pages.framework.framework import framework
1514
from pcweb.pages.hosting.hosting import hosting_landing
15+
from pcweb.pages.use_cases.use_cases import use_cases_page
1616

1717
from ...link_button import resources_button
1818
from ..sidebar import SidebarState
@@ -400,7 +400,6 @@ def logo() -> rx.Component:
400400

401401

402402
def doc_section():
403-
from pcweb.pages.docs import ai_builder as ai_builder_pages
404403
from pcweb.pages.docs import hosting as hosting_page
405404

406405
return nav_menu.content(
@@ -471,20 +470,24 @@ def new_component_section() -> rx.Component:
471470
"Cloud", hosting_page.deploy_quick_start.path, "hosting"
472471
),
473472
),
474-
class_name="xl:flex hidden flex-row items-center gap-0 xl:gap-7 m-0 h-full list-none",
473+
class_name="xl:flex hidden flex-row items-center gap-0 lg:gap-5 2xl:gap-7 m-0 h-full list-none",
475474
),
476475
rx.el.div(
477-
# nav_menu.item(
478-
# link_item("AI Builder", REFLEX_AI_BUILDER, "builder"),
479-
# ),
476+
nav_menu.item(
477+
link_item(
478+
"AI Builder",
479+
REFLEX_BUILD_URL,
480+
"builder",
481+
),
482+
),
480483
nav_menu.item(
481484
link_item("Open Source", framework.path, "framework"),
482485
class_name="whitespace-nowrap",
483486
),
484487
nav_menu.item(
485488
link_item("Cloud", hosting_landing.path, "hosting"),
486489
),
487-
class_name="xl:flex hidden flex-row items-center gap-0 xl:gap-7 m-0 h-full list-none",
490+
class_name="xl:flex hidden flex-row items-center gap-0 lg:gap-5 2xl:gap-7 m-0 h-full list-none",
488491
),
489492
),
490493
nav_menu.item(
@@ -508,7 +511,7 @@ def new_component_section() -> rx.Component:
508511
new_menu_trigger("Pricing", "/pricing", "pricing"),
509512
class_name="xl:flex hidden",
510513
),
511-
class_name="flex flex-row items-center gap-0 xl:gap-7 m-0 h-full list-none",
514+
class_name="flex flex-row items-center gap-0 lg:gap-5 2xl:gap-7 m-0 h-full list-none",
512515
),
513516
nav_menu.list(
514517
nav_menu.item(search_bar()),

pcweb/components/docpage/navbar/typesense.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
"""Improved Typesense search component with better component search handling."""
22

3-
import reflex as rx
4-
import typesense
53
import os
64
import re
75

6+
import reflex as rx
7+
import typesense
8+
89
# Constants
910
TYPESENSE_CONFIG = {
1011
"nodes": [
@@ -145,7 +146,6 @@ async def search_docs(self, query: str):
145146

146147
async def _perform_unified_search(self, query: str) -> dict:
147148
"""Perform a single search using is_component metadata for boosting/filtering."""
148-
149149
client = typesense.Client(TYPESENSE_CONFIG)
150150

151151
expanded_query = self._expand_query_variants(query)
@@ -433,20 +433,18 @@ def search_trigger() -> rx.Component:
433433
),
434434
rx.text(
435435
"⌘K",
436-
class_name="absolute right-2 top-1/2 transform -translate-y-1/2 text-sm bg-slate-3 rounded-md text-sm !text-slate-9 px-[5px] py-[2px] hidden md:inline",
436+
class_name="absolute right-2 top-1/2 transform -translate-y-1/2 bg-slate-3 rounded-md text-sm !text-slate-9 px-[5px] py-[2px] hidden md:inline",
437437
),
438438
rx.el.input(
439439
placeholder="Search",
440440
read_only=True,
441-
class_name="bg-transparent border-none outline-none focus:outline-none pl-4 cursor-pointer hidden md:block",
441+
class_name="bg-transparent border-none outline-none focus:outline-none pl-4 cursor-pointer hidden md:block font-medium",
442442
),
443443
style={
444444
"padding": "6px 12px",
445-
"min_width": ["32px", "32px", "256px"],
446-
"max_width": ["6em", "6em", "none"],
447445
"box_shadow": "0px 24px 12px 0px rgba(28, 32, 36, 0.02), 0px 8px 8px 0px rgba(28, 32, 36, 0.02), 0px 2px 6px 0px rgba(28, 32, 36, 0.02)",
448446
},
449-
class_name="w-full hover:bg-slate-3 cursor-pointer flex max-h-[32px] min-h-[32px] border border-slate-5 rounded-[3px] !rounded-[10px] bg-slate-1 transition-bg relative",
447+
class_name="min-w-[32px] w-full max-w-[32px] md:max-w-[220px] lg:max-w-[240px] hover:bg-slate-3 cursor-pointer flex max-h-[32px] min-h-[32px] border border-slate-5 !rounded-[10px] bg-slate-1 transition-bg relative",
450448
)
451449

452450

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies = [
2222
"reflex-image-zoom>=0.0.2",
2323
"replicate==1.0.7",
2424
"reflex-pyplot==0.2.1",
25-
"reflex-enterprise>=0.3.1",
25+
"reflex-enterprise>=0.3.2",
2626
"requests>=2.32.3",
2727
"posthog==6.1.1",
2828
"typesense>=1.1.1",

0 commit comments

Comments
 (0)