From e93e924ea04f4c72277a3c2dc0d7c4f04b8b765a Mon Sep 17 00:00:00 2001 From: Anuj Agarwal Date: Sun, 22 Feb 2026 14:48:27 +0530 Subject: [PATCH 1/5] feat: implement native jump-to-section dropdown for tooling --- pages/tools/components/GroupByMenu.tsx | 67 ++++++++++++++++++++------ pages/tools/index.page.tsx | 8 ++- 2 files changed, 59 insertions(+), 16 deletions(-) diff --git a/pages/tools/components/GroupByMenu.tsx b/pages/tools/components/GroupByMenu.tsx index 3af4fe0f0..c45b2e6c5 100644 --- a/pages/tools/components/GroupByMenu.tsx +++ b/pages/tools/components/GroupByMenu.tsx @@ -5,11 +5,25 @@ import { Transform } from '../hooks/useToolsTransform'; interface GroupByMenuProps { transform: Transform; setTransform: Dispatch>; + activeSections?: string[]; } -const GroupByMenu = ({ transform, setTransform }: GroupByMenuProps) => { +const GroupByMenu = ({ + transform, + setTransform, + activeSections = [], +}: GroupByMenuProps) => { const groupedBy = transform.groupBy; + const scrollToSection = (section: string) => { + const id = `group-${section}`; + const element = document.getElementById(id); + if (element) { + const y = element.getBoundingClientRect().top + window.scrollY - 100; + window.scrollTo({ top: y, behavior: 'smooth' }); + } + }; + const groupBy = [ { label: 'None', @@ -36,21 +50,44 @@ const GroupByMenu = ({ transform, setTransform }: GroupByMenuProps) => { }; return ( -
- GROUP BY: - {groupBy.map((group) => { - return ( - + ); + })} +
+ {activeSections.length > 0 && groupedBy !== 'none' && ( +
+ +
+ ▼ +
+
+ )} ); }; diff --git a/pages/tools/index.page.tsx b/pages/tools/index.page.tsx index 1f49f73a6..f940794a4 100644 --- a/pages/tools/index.page.tsx +++ b/pages/tools/index.page.tsx @@ -217,7 +217,13 @@ export default function ToolingPage({
- + g !== 'none' && toolsByGroup[g].length > 0, + )} + />
From 1f561aac3320655fa647c102650199bfe24a0a0c Mon Sep 17 00:00:00 2001 From: Anuj Agarwal Date: Sun, 22 Feb 2026 19:50:50 +0530 Subject: [PATCH 2/5] Updated button position for bigger screens and arrow down image --- pages/tools/components/GroupByMenu.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/tools/components/GroupByMenu.tsx b/pages/tools/components/GroupByMenu.tsx index c45b2e6c5..26dba4ebb 100644 --- a/pages/tools/components/GroupByMenu.tsx +++ b/pages/tools/components/GroupByMenu.tsx @@ -50,7 +50,7 @@ const GroupByMenu = ({ }; return ( -
+
GROUP BY: {groupBy.map((group) => { @@ -68,7 +68,7 @@ const GroupByMenu = ({ })}
{activeSections.length > 0 && groupedBy !== 'none' && ( -
+
-
- ▼ +
+ + +
)} From 5c9c1ba91cc384236bb582f1162550192a867133 Mon Sep 17 00:00:00 2001 From: Anuj Agarwal Date: Tue, 24 Feb 2026 18:52:10 +0530 Subject: [PATCH 3/5] changed lg class to md for improving layout --- pages/tools/components/GroupByMenu.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/tools/components/GroupByMenu.tsx b/pages/tools/components/GroupByMenu.tsx index 26dba4ebb..e6a6ac46d 100644 --- a/pages/tools/components/GroupByMenu.tsx +++ b/pages/tools/components/GroupByMenu.tsx @@ -50,7 +50,7 @@ const GroupByMenu = ({ }; return ( -
+
GROUP BY: {groupBy.map((group) => { @@ -68,7 +68,7 @@ const GroupByMenu = ({ })}
{activeSections.length > 0 && groupedBy !== 'none' && ( -
+
)} + > + {children} + + +
+ + + +
+
+ ); + } + const Comp = asChild ? Slot : 'button'; return ( @@ -54,7 +84,9 @@ function Button({ data-slot='button' className={cn(buttonVariants({ variant, size, className }))} {...props} - /> + > + {children} + ); } diff --git a/pages/tools/components/GroupByMenu.tsx b/pages/tools/components/GroupByMenu.tsx index e6a6ac46d..c6cb99067 100644 --- a/pages/tools/components/GroupByMenu.tsx +++ b/pages/tools/components/GroupByMenu.tsx @@ -68,27 +68,24 @@ const GroupByMenu = ({ })}
{activeSections.length > 0 && groupedBy !== 'none' && ( -
- -
- - - -
-
+ ))} + )}
); From be897f3d969ae6ba6505f3cc88b9dc950a92bfe7 Mon Sep 17 00:00:00 2001 From: Anuj Agarwal Date: Sun, 1 Mar 2026 19:09:32 +0530 Subject: [PATCH 5/5] Fixed TypeScript type error for button size --- components/ui/button.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ui/button.tsx b/components/ui/button.tsx index 2b6066e33..f51f0c0ce 100644 --- a/components/ui/button.tsx +++ b/components/ui/button.tsx @@ -37,8 +37,8 @@ const buttonVariants = cva( }, ); -type ButtonProps = React.ComponentProps<'button'> & - React.ComponentProps<'select'> & +type ButtonProps = Omit, 'size'> & + Omit, 'size'> & VariantProps & { asChild?: boolean; selectButton?: boolean;