Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

Conversation

jeremy-babylonlabs
Copy link
Contributor

@jeremy-babylonlabs jeremy-babylonlabs commented Jul 18, 2025

Desktop and mobile view in different color theme

Screenshot 2025-07-19 at 5 15 11 AM Screenshot 2025-07-19 at 5 16 26 AM

Copilot

This comment was marked as outdated.

@jeremy-babylonlabs jeremy-babylonlabs force-pushed the feat/setting-menu branch 2 times, most recently from a44e7ec to 74163fd Compare July 18, 2025 21:22
@jeremy-babylonlabs jeremy-babylonlabs changed the title feat: add setting menu feat: add setting menu widget Jul 18, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive SettingMenu widget with dark/light theme support and responsive design. The implementation follows a compound component pattern, allowing flexible composition of menu items, groups, and submenus. It supports both desktop and mobile views with appropriate styling adaptations.

  • Adds a new SettingMenu widget with TypeScript type definitions and comprehensive component API
  • Implements responsive design with different layouts for desktop and mobile viewports
  • Refactors MenuDrawer component to use Portal for better theme synchronization on mobile

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/widgets/new-design/SettingMenu/types.ts TypeScript interfaces for all SettingMenu component props
src/widgets/new-design/SettingMenu/index.ts Main export file for the SettingMenu widget
src/widgets/new-design/SettingMenu/SettingMenu.tsx Core implementation with compound components and embedded SVG icons
src/widgets/new-design/SettingMenu/SettingMenu.stories.tsx Storybook stories demonstrating theme selection and menu functionality
src/index.tsx Adds SettingMenu to main library exports
src/components/Menu/MenuDrawer.tsx Refactors to use Portal for mobile rendering and improves backdrop handling
src/components/Menu/MenuContext.tsx Changes warning to error for better development experience

}
};

return <div className={`${getBackgroundClass()} ${className}`.trim()}>{children}</div>;
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a utility like twJoin or clsx instead of manual string concatenation and trim() for better className handling and consistency with the rest of the codebase.

Copilot uses AI. Check for mistakes.

@jrwbabylonlab jrwbabylonlab requested a review from gbarkhatov July 19, 2025 02:14
Copy link
Collaborator

@jrwbabylonlab jrwbabylonlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please get approval from @gbarkhatov or @jonybur on this

@jrwbabylonlab
Copy link
Collaborator

Please wait till this PR is merged in the mono repo and create a new PR against mono repo instead https://github.com/babylonlabs-io/babylon-toolkit/pull/31/files

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants