From 64ad37a09b0cd1e63b1afb5d7f7595ca8bfa2143 Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Wed, 26 Feb 2025 15:03:16 +0100 Subject: [PATCH] docs contributing layout (#33833) * contributing layout * contributing layout mobile * gap * Update apps/docs/app/contributing/ContributingToC.tsx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/app/contributing/ContributingToC.tsx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * add missing menu entry * remove feedback anchor from toc * cleanup * sheet height * sheet height * breadcrumb --------- Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> --- .../docs/app/contributing/ContributingToC.tsx | 82 ++++++++++++++----- apps/docs/app/contributing/page.tsx | 24 ++++-- .../NavigationMenu.constants.ts | 7 ++ .../NavigationMenu/NavigationMenu.tsx | 5 ++ .../NavigationMenu/NavigationMenu.utils.ts | 2 + apps/docs/layouts/MainSkeleton.tsx | 6 ++ 6 files changed, 97 insertions(+), 29 deletions(-) diff --git a/apps/docs/app/contributing/ContributingToC.tsx b/apps/docs/app/contributing/ContributingToC.tsx index e1d8423f89a..ea2a953f15f 100644 --- a/apps/docs/app/contributing/ContributingToC.tsx +++ b/apps/docs/app/contributing/ContributingToC.tsx @@ -5,7 +5,8 @@ import type { HTMLAttributes } from 'react' import { useEffect, useState } from 'react' import { useBreakpoint } from 'common' -import { cn, Popover_Shadcn_, PopoverContent_Shadcn_, PopoverTrigger_Shadcn_ } from 'ui' +import { cn, Separator, Sheet, SheetContent, SheetHeader, SheetTrigger } from 'ui' +import { Feedback } from '~/components/Feedback' interface TocItem extends HTMLAttributes { label: string @@ -18,7 +19,7 @@ export function ContributingToc({ className }: { className?: string }) { useEffect(() => { const headings = [ - ...document.querySelectorAll('article.prose > h2,h3'), + ...document.querySelectorAll('article.prose > h2,h3:not(#feedback-title)'), ] as Array const tocItems = headings .filter((heading) => !!heading.id) @@ -30,20 +31,16 @@ export function ContributingToc({ className }: { className?: string }) { }, []) return mobileToc ? ( - + ) : (