diff --git a/services/web/frontend/js/features/ide-redesign/components/toolbar/command-dropdown.tsx b/services/web/frontend/js/features/ide-redesign/components/toolbar/command-dropdown.tsx index cdffe8f655..853da421d2 100644 --- a/services/web/frontend/js/features/ide-redesign/components/toolbar/command-dropdown.tsx +++ b/services/web/frontend/js/features/ide-redesign/components/toolbar/command-dropdown.tsx @@ -64,11 +64,10 @@ const CommandDropdown = ({ {populatedSections.map((section, index) => { return ( - {index > 0 && } - {section.title && {section.title}} - {section.children.map(child => ( - - ))} + 0} + /> ) })} @@ -78,16 +77,31 @@ const CommandDropdown = ({ export const CommandSection = ({ section: sectionStructure, + includeDivider = true, }: { section: MenuSectionStructure + includeDivider?: boolean }) => { const { registry, shortcuts } = useCommandRegistry() const section = populateSectionOrGroup(sectionStructure, registry, shortcuts) + return ( + + ) +} + +function CommandSectionContent({ + section, + includeDivider = true, +}: { + section: MenuSectionStructure + includeDivider?: boolean +}) { if (section.children.length === 0) { return null } return ( <> + {includeDivider && } {section.title && {section.title}} {section.children.map(child => ( diff --git a/services/web/frontend/js/features/ide-redesign/components/toolbar/menu-bar.tsx b/services/web/frontend/js/features/ide-redesign/components/toolbar/menu-bar.tsx index dcfca9b435..67279da060 100644 --- a/services/web/frontend/js/features/ide-redesign/components/toolbar/menu-bar.tsx +++ b/services/web/frontend/js/features/ide-redesign/components/toolbar/menu-bar.tsx @@ -233,8 +233,10 @@ export const ToolbarMenuBar = () => { } onClick={toggleMathPreview} /> - - +