Skip to content

Commit ad49bb7

Browse files
Add MCP as top-level section in AI Builder navigation
- Add MCP sidebar category alongside Learn in AI Builder - Update sidebar content handling to support multiple sections - Use 'plug' icon for MCP section - Addresses GitHub comment from @adhami3310 on PR #1549 The MCP section now appears at the same hierarchical level as Learn in the AI Builder navigation, making it easily discoverable. Co-Authored-By: [email protected] <[email protected]>
1 parent 19362bc commit ad49bb7

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

pcweb/components/docpage/sidebar/sidebar.py

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,12 @@ def sidebar_comp(
420420
"bot",
421421
0,
422422
),
423+
sidebar_category(
424+
"MCP",
425+
"/docs/ai-builder/integrations/mcp",
426+
"plug",
427+
1,
428+
),
423429
class_name="flex flex-col items-start gap-1 w-full list-none",
424430
),
425431
# If the path doesn't start with /docs/cloud, check for general docs
@@ -489,15 +495,34 @@ def sidebar_comp(
489495
),
490496
rx.cond( # pyright: ignore [reportCallIssue]
491497
rx.State.router.page.path.startswith("/docs/ai-builder/"),
492-
rx.el.ul(
493-
create_sidebar_section(
494-
"Overview",
495-
ai_builder_pages.overview.what_is_reflex_build.path,
496-
ai_builder_overview_items,
497-
ai_builder_overview_index,
498-
url,
498+
rx.match( # pyright: ignore [reportCallIssue]
499+
SidebarState.sidebar_index,
500+
(
501+
0,
502+
rx.el.ul(
503+
create_sidebar_section(
504+
"Overview",
505+
ai_builder_pages.overview.what_is_reflex_build.path,
506+
ai_builder_overview_items,
507+
ai_builder_overview_index,
508+
url,
509+
),
510+
class_name="flex flex-col items-start gap-6 p-[0px_1rem_0px_0.5rem] w-full list-none list-style-none",
511+
),
512+
),
513+
(
514+
1,
515+
rx.el.ul(
516+
create_sidebar_section(
517+
"MCP Integration",
518+
ai_builder_pages.integrations.mcp.path,
519+
[ai_builder_overview_items[3]],
520+
ai_builder_overview_index,
521+
url,
522+
),
523+
class_name="flex flex-col items-start gap-6 p-[0px_1rem_0px_0.5rem] w-full list-none list-style-none",
524+
),
499525
),
500-
class_name="flex flex-col items-start gap-6 p-[0px_1rem_0px_0.5rem] w-full list-none list-style-none",
501526
),
502527
rx.cond( # pyright: ignore [reportCallIssue]
503528
rx.State.router.page.path.startswith("/docs/"),

0 commit comments

Comments
 (0)