Skip to content

Commit 07db64a

Browse files
Fix navbar responsive breakpoint issue (#1533)
- Update all navbar responsive breakpoints from lg: (1024px) to xl: (1280px) - Add whitespace-nowrap to 'Open Source' links to prevent line breaks - Update mobile sidebar button breakpoint to xl:hidden flex - Prevents 'Open Source' link from overflowing into REFLEX logo at intermediate screen sizes Fixes Linear issue ENG-6807 Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
1 parent 238d21b commit 07db64a

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

pcweb/components/docpage/navbar/navbar.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def link_item(name: str, url: str, active_str: str = ""):
9191
else:
9292
active = False
9393

94-
common_cn = "transition-color p-[1.406rem_0px] font-small lg:flex hidden items-center justify-center "
94+
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center "
9595
active_cn = "shadow-[inset_0_-1px_0_0_var(--c-violet-9)] text-violet-9"
9696
unactive_cn = "shadow-none text-slate-9"
9797

@@ -369,7 +369,7 @@ def new_menu_trigger(title: str, url: str = None, active_str: str = "") -> rx.Co
369369
"chevron-down",
370370
class_name="chevron size-5 !text-slate-9 group-hover:!text-slate-11 py-1 mr-0 transition-all ease-out",
371371
),
372-
class_name="flex-row items-center gap-x-1 group user-select-none cursor-pointer lg:flex hidden",
372+
class_name="flex-row items-center gap-x-1 group user-select-none cursor-pointer xl:flex hidden",
373373
on_click=rx.stop_propagation,
374374
),
375375
style={
@@ -434,7 +434,7 @@ def new_component_section() -> rx.Component:
434434
rx.badge(
435435
"Docs",
436436
variant="surface",
437-
class_name="text-violet-9 lg:flex hidden text-sm",
437+
class_name="text-violet-9 xl:flex hidden text-sm",
438438
display=rx.cond(
439439
rx.State.router.page.path.contains("docs")
440440
| rx.State.router.page.path.contains("ai-builder")
@@ -464,25 +464,27 @@ def new_component_section() -> rx.Component:
464464
getting_started.introduction.path,
465465
"framework",
466466
),
467+
class_name="whitespace-nowrap",
467468
),
468469
nav_menu.item(
469470
link_item(
470471
"Cloud", hosting_page.deploy_quick_start.path, "hosting"
471472
),
472473
),
473-
class_name="lg:flex hidden flex-row items-center gap-0 lg:gap-7 m-0 h-full list-none",
474+
class_name="xl:flex hidden flex-row items-center gap-0 xl:gap-7 m-0 h-full list-none",
474475
),
475476
rx.el.div(
476477
# nav_menu.item(
477478
# link_item("AI Builder", REFLEX_AI_BUILDER, "builder"),
478479
# ),
479480
nav_menu.item(
480481
link_item("Open Source", framework.path, "framework"),
482+
class_name="whitespace-nowrap",
481483
),
482484
nav_menu.item(
483485
link_item("Cloud", hosting_landing.path, "hosting"),
484486
),
485-
class_name="lg:flex hidden flex-row items-center gap-0 lg:gap-7 m-0 h-full list-none",
487+
class_name="xl:flex hidden flex-row items-center gap-0 xl:gap-7 m-0 h-full list-none",
486488
),
487489
),
488490
nav_menu.item(
@@ -504,14 +506,14 @@ def new_component_section() -> rx.Component:
504506
),
505507
nav_menu.item(
506508
new_menu_trigger("Pricing", "/pricing", "pricing"),
507-
class_name="lg:flex hidden",
509+
class_name="xl:flex hidden",
508510
),
509-
class_name="flex flex-row items-center gap-0 lg:gap-7 m-0 h-full list-none",
511+
class_name="flex flex-row items-center gap-0 xl:gap-7 m-0 h-full list-none",
510512
),
511513
nav_menu.list(
512514
nav_menu.item(search_bar()),
513515
nav_menu.item(github()),
514-
nav_menu.item(discord(), class_name="lg:flex hidden"),
516+
nav_menu.item(discord(), class_name="xl:flex hidden"),
515517
nav_menu.item(
516518
rx.link(
517519
button(
@@ -535,9 +537,9 @@ def new_component_section() -> rx.Component:
535537
is_external=True,
536538
href="/pricing",
537539
),
538-
class_name="lg:flex hidden",
540+
class_name="xl:flex hidden",
539541
),
540-
nav_menu.item(navbar_sidebar_button(), class_name="lg:hidden flex"),
542+
nav_menu.item(navbar_sidebar_button(), class_name="xl:hidden flex"),
541543
class_name="flex flex-row gap-2 m-0 h-full list-none items-center",
542544
),
543545
rx.box(

0 commit comments

Comments
 (0)