Skip to content

Commit 0ef950b

Browse files
authored
Merge branch 'main' into ahmad/use-case-landing
2 parents 567bc2d + 240b66c commit 0ef950b

File tree

7 files changed

+313
-305
lines changed

7 files changed

+313
-305
lines changed

docs/events/decentralized_event_handlers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ class MyState(rx.State):
2424
count: int = 0
2525

2626
@rx.event
27-
def increment(state: MyState, amount: int = 1):
27+
def increment(state: MyState, amount: int):
2828
state.count += amount
2929

3030
def decentralized_event_example():
3131
return rx.vstack(
3232
rx.heading(f"Count: {MyState.count}"),
3333
rx.hstack(
34-
rx.button("Increment by 1", on_click=increment()),
34+
rx.button("Increment by 1", on_click=increment(1)),
3535
rx.button("Increment by 5", on_click=increment(5)),
3636
rx.button("Increment by 10", on_click=increment(10)),
3737
),

pcweb/components/docpage/sidebar/sidebar.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
import reflex as rx
66

77
from pcweb.components.docpage.navbar.state import NavbarState
8+
from pcweb.constants import ENTERPRISE_DOCS_URL
89
from pcweb.styles.colors import c_color
10+
911
from .sidebar_items.ai import ai_builder_overview_items
10-
from .sidebar_items.component_lib import (
11-
component_lib,
12-
graphing_libs,
13-
)
14-
from .sidebar_items.learn import learn, frontend, backend, hosting, cli_ref
12+
from .sidebar_items.component_lib import component_lib, graphing_libs
13+
from .sidebar_items.learn import backend, cli_ref, frontend, hosting, learn
1514
from .sidebar_items.recipes import recipes
1615
from .sidebar_items.reference import api_reference
17-
from .state import SidebarState, SideBarItem, SideBarBase
18-
from pcweb.constants import ENTERPRISE_DOCS_URL
16+
from .state import SideBarBase, SideBarItem, SidebarState
17+
1918

2019
def sidebar_link(*children, **props):
2120
"""Create a sidebar link that closes the sidebar when clicked."""
@@ -60,6 +59,7 @@ def sidebar_leaf(
6059
value=item_index,
6160
border="none",
6261
width="100%",
62+
class_name="!overflow-visible",
6363
)
6464
if item.outer
6565
else rx.accordion.item(
@@ -93,6 +93,7 @@ def sidebar_leaf(
9393
border="none",
9494
value=item_index,
9595
width="100%",
96+
class_name="!overflow-visible",
9697
)
9798
)
9899

@@ -149,8 +150,8 @@ def sidebar_item_comp(
149150
class_name="font-small",
150151
),
151152
rx.box(class_name="flex-grow"),
152-
rx.accordion.icon(class_name="size-4"),
153-
class_name="flex items-center !bg-transparent !hover:bg-transparent !py-2 !pr-0 w-full text-slate-9 aria-expanded:text-slate-11 hover:text-slate-11 transition-color",
153+
rx.accordion.icon(class_name="size-4 !text-slate-9 group-hover:!text-violet-9"),
154+
class_name="!px-0 flex items-center !bg-transparent !hover:bg-transparent !py-2 !pr-0 w-full !text-slate-9 aria-expanded:text-slate-11 hover:!text-slate-11 transition-color group",
154155
),
155156
),
156157
rx.accordion.content(
@@ -167,12 +168,12 @@ def sidebar_item_comp(
167168
type="multiple",
168169
collapsible=True,
169170
default_value=index[:1].foreach(lambda x: "index" + x.to_string()),
170-
class_name="!my-2 flex flex-col items-start gap-4 !ml-[10px] list-none [box-shadow:inset_1.25px_0_0_0_var(--c-slate-4)]",
171+
class_name="!my-2 flex flex-col items-start gap-4 !ml-[10px] list-none [box-shadow:inset_1.25px_0_0_0_var(--c-slate-4)_!important] !bg-transparent",
171172
),
172-
class_name="!p-0 w-full",
173+
class_name="!p-0 w-full !bg-transparent before:!h-0 after:!h-0",
173174
),
174175
value=item_index,
175-
class_name="border-none w-full",
176+
class_name="border-none w-full !bg-transparent",
176177
)
177178
)
178179

@@ -327,7 +328,7 @@ def create_sidebar_section(
327328
type="multiple",
328329
collapsible=True,
329330
default_value=index[:1].foreach(lambda x: "index" + x.to_string()),
330-
class_name="ml-0 pl-0 w-full",
331+
class_name="ml-0 pl-0 w-full !bg-transparent !shadow-none rounded-[0px]",
331332
),
332333
class_name="flex flex-col items-start ml-0 w-full",
333334
)
@@ -350,13 +351,14 @@ def sidebar_comp(
350351
tutorials_index: list[int],
351352
width: str = "100%",
352353
):
353-
from pcweb.pages.docs import enterprise, getting_started, state, ui
354+
from pcweb.pages.docs import ai_builder as ai_builder_pages
355+
from pcweb.pages.docs import enterprise, getting_started
354356
from pcweb.pages.docs import hosting as hosting_page
357+
from pcweb.pages.docs import state, ui
355358
from pcweb.pages.docs.apiref import pages
356359
from pcweb.pages.docs.custom_components import custom_components
357360
from pcweb.pages.docs.library import library
358361
from pcweb.pages.docs.recipes_overview import overview
359-
from pcweb.pages.docs import ai_builder as ai_builder_pages
360362

361363
return rx.box( # pyright: ignore [reportCallIssue]
362364
# Handle sidebar categories for docs/cloud first

pcweb/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
GALLERY_FORM_URL = "https://docs.google.com/forms/d/e/1FAIpQLSfB30hXB09CZ_H0Zi684w1y1zQSScyT3Qhd1mOUrAAIq9dj3Q/viewform?usp=sf_link"
4141
NPMJS_URL = "https://www.npmjs.com/"
4242
SPLINE_URL = "https://github.com/splinetool/react-spline"
43-
REFLEX_CLOUD_URL = "https://cloud.reflex.dev"
4443
ENTERPRISE_DOCS_URL = "https://enterprise.reflex.dev"
44+
DATABRICKS_NOTION_URL = "https://reflex-dev.notion.site/reflex-x-databricks"
4545

4646
# Install urls.
4747
BUN_URL = "https://bun.sh"

pcweb/pages/faq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,16 @@ def faq_item(question: str, answer: str, index: int):
132132
rx.accordion.header(
133133
rx.accordion.trigger(
134134
rx.el.h3(
135-
question, class_name="font-smbold text-slate-12 text-start"
135+
question, class_name="font-smbold !text-slate-12 text-start"
136136
),
137137
rx.spacer(),
138-
rx.accordion.icon(color="var(--c-slate-9)"),
138+
rx.accordion.icon(class_name="!text-slate-12"),
139139
class_name="!bg-transparent hover:!bg-transparent !p-4 lg:!p-6",
140140
),
141141
),
142142
rx.accordion.content(
143143
answer,
144-
class_name="!p-[0rem_1rem_1rem_1rem] lg:!p-[0rem_1.5rem_1.5rem_1.5rem] font-small text-slate-11 text-start [&>code]:!font-code",
144+
class_name="!p-[0rem_1rem_1rem_1rem] lg:!p-[0rem_1.5rem_1.5rem_1.5rem] !font-small !text-slate-11 text-start [&>code]:!font-code before:!h-0 after:!h-0",
145145
),
146146
class_name="border-none",
147147
),

pcweb/pcweb.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pcweb.telemetry import get_pixel_website_trackers
1212
from pcweb.meta.meta import favicons_links
1313
from pcweb.pages.landing.views.ai_section import retreive_templates
14-
14+
from pcweb.constants import DATABRICKS_NOTION_URL
1515
# This number discovered by trial and error on Windows 11 w/ Node 18, any
1616
# higher and the prod build fails with EMFILE error.
1717
WINDOWS_MAX_ROUTES = int(os.environ.get("REFLEX_WEB_WINDOWS_MAX_ROUTES", "100"))
@@ -138,7 +138,9 @@
138138
("/docs/pages/routes", "/docs/pages/overview"),
139139
("/docs/assets/referencing_assets", "/docs/assets/overview"),
140140
("/changelog", "https://github.com/reflex-dev/reflex/releases"),
141-
("/blog/2025-10-27-top-10-data-visualization-libraries", "/blog/2025-01-27-top-10-data-visualization-libraries")
141+
("/blog/2025-10-27-top-10-data-visualization-libraries", "/blog/2025-01-27-top-10-data-visualization-libraries"),
142+
# Databricks notion page redirect
143+
("/databricks", DATABRICKS_NOTION_URL)
142144
]
143145

144146
for source, target in redirects:

rxconfig.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
show_build_with_reflex=False,
1313
telemetry_enabled=False,
1414
tailwind=tw_config,
15+
plugins=[rx.plugins.TailwindV3Plugin()],
1516
)

0 commit comments

Comments
 (0)