[LG-5439] feat: ChatLayout integration branch#3289
Conversation
🦋 Changeset detectedLatest commit: b30aa68 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new @lg-chat/chat-layout component package that provides a CSS Grid-based layout system for building full-screen chat interfaces with a collapsible/pinnable side navigation. The PR consolidates and integrates changes from five separate pull requests.
Key changes include:
- New ChatLayout component with context provider for managing sidebar state
- ChatSideNav compound component with Header, Content, Footer, and SideNavItem subcomponents
- ChatMain component for the primary content area
- Support for pinned/unpinned sidebar states with hover interactions
- Removal of redundant z-index styling in InputBar component
Reviewed Changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/install/src/ALL_PACKAGES.ts | Adds the new @lg-chat/chat-layout package to the registry |
| chat/input-bar/src/InputBar/InputBar.styles.ts | Removes redundant z-index: 2 styling from content wrapper |
| chat/chat-layout/tsconfig.json | TypeScript configuration for the new package with project references |
| chat/chat-layout/src/index.ts | Main export file exposing ChatLayout, ChatMain, and ChatSideNav components |
| chat/chat-layout/src/constants.ts | Defines layout constants for sidebar widths and transitions |
| chat/chat-layout/src/ChatLayout/* | Core ChatLayout component, context, types, styles, and tests |
| chat/chat-layout/src/ChatMain/* | ChatMain component with wrapper styling for chat windows |
| chat/chat-layout/src/ChatSideNav/* | ChatSideNav compound component with Header, Content, Footer, and Item subcomponents |
| chat/chat-layout/package.json | Package configuration with dependencies and build scripts |
| chat/chat-layout/README.md | Comprehensive documentation with usage examples and API reference |
| chat/chat-layout/src/ChatLayout.stories.tsx | Storybook stories demonstrating various layout states |
| .changeset/*.md | Changeset files documenting the new release and InputBar patch |
| README.md | Updates root README with chat-layout package entry |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| isPinned, | ||
| togglePin, | ||
| isSideNavHovered, | ||
| setIsSideNavHovered, |
There was a problem hiding this comment.
The setIsSideNavHovered function is included in the dependency array but is a state setter from useState, which has a stable identity. Including it unnecessarily causes the memoized value to be recalculated when it doesn't need to be. Remove setIsSideNavHovered from the dependency array.
| setIsSideNavHovered, |
| <ChatSideNav> | ||
| <ChatSideNav.Header onClickNewChat={handleNewChat} /> | ||
| <ChatSideNav.Content> | ||
| {chatItems.map(({ href, id, item, name }) => ( |
There was a problem hiding this comment.
The destructured property item is not used in the map callback and appears to be a typo or leftover from refactoring. It should be removed from the destructuring.
| {chatItems.map(({ href, id, item, name }) => ( | |
| {chatItems.map(({ href, id, name }) => ( |
…nd ChatLayoutContext (#3251)
* feat(chat-layout): implement ChatMain component * refactor(chat-layout): remove PropsWithChildren
…der and Content subcomponents (#3271) * chore(chat-layout): add deps for ChatSideNav * feat(chat-layout): implement ChatSideNav and subcomponents * test(chat-layout): update stories * docs(chat-layout): README * fix(chat-layout): apply focus styles on :focus-visible * refactor(chat-layout): PR feedback * refactor(chat-layout): ChatSideNav only renders header and content
* chore(chat-layout): add LG palette dep * feat(chat-layout): implement ChatSideNavItem subcomponent * test(chat-layout): update stories * docs(chat-layout): README * fix(chat-layout): add missing polymorphic dep * fix(chat-layout): ChatSideNavItem default is div * style(chat-layout): use constant for side nav item height
…ity (#3278) * feat(chat-layout): add header to ChatSideNavContent * fix(input-bar): rm redundant z-index and increase disclaimer text spacing * chore(input-bar): changeset * chore(chat-layout): rm icon-button dependency * feat(chat-layout): enhance ChatLayout with side nav hover state and transition effects * test(chat-layout): update stories * docs(chat-layout): README * refactor(input-bar): revert gap changes * refactor(chat-layout): expose shouldRenderExpanded from context and fix overflow
390c231 to
b30aa68
Compare
|
Size Change: +1.46 kB (+0.08%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
|
Coverage after merging LG-5439/chat-layout into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
commit 5cf8c9b Merge: 75bd398 616cfb0 Author: Adam Thompson <adam.thompson@mongodb.com> Date: Fri Nov 7 15:40:20 2025 -0500 Merge branch 'main' into at/wizard-integration commit 616cfb0 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri Nov 7 18:49:16 2025 +0000 Version Packages (#3288) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> commit dca8419 Author: Nima Taheri <nima.taheri@mongodb.com> Date: Fri Nov 7 09:04:10 2025 -0800 LG-5588 more chart customization points (#3274) * feat: more chart customization points * docs: add changelog * feat: apply review feedbacks * feat: move common x/y axis properties into a separate file * fix: lint errors * fix: correct props dependency * fixup! fix: lint errors * feat: process review feedback * feat: apply Stephen's feedback * types: export bar-hover-behavior type * more PR review feedback * fix export issue commit 8976ab2 Author: Stephen Lee <stephen.lee@mongodb.com> Date: Fri Nov 7 07:39:33 2025 -0800 [LG-5439] feat: ChatLayout integration branch (#3289) * feat(chat-layout): new @lg-chat/chat-layout package with ChatLayout and ChatLayoutContext (#3251) * [LG-5645] feat(chat-layout): implement ChatMain component (#3252) * feat(chat-layout): implement ChatMain component * refactor(chat-layout): remove PropsWithChildren * [LG-5646] feat(chat-layout): implement ChatSideNav component with Header and Content subcomponents (#3271) * chore(chat-layout): add deps for ChatSideNav * feat(chat-layout): implement ChatSideNav and subcomponents * test(chat-layout): update stories * docs(chat-layout): README * fix(chat-layout): apply focus styles on :focus-visible * refactor(chat-layout): PR feedback * refactor(chat-layout): ChatSideNav only renders header and content * [LG-5649] feat(chat-layout): add SideNavItem subcomponent (#3273) * chore(chat-layout): add LG palette dep * feat(chat-layout): implement ChatSideNavItem subcomponent * test(chat-layout): update stories * docs(chat-layout): README * fix(chat-layout): add missing polymorphic dep * fix(chat-layout): ChatSideNavItem default is div * style(chat-layout): use constant for side nav item height * [LG-5650] feat(chat-layout): add hover expand and collapse functionality (#3278) * feat(chat-layout): add header to ChatSideNavContent * fix(input-bar): rm redundant z-index and increase disclaimer text spacing * chore(input-bar): changeset * chore(chat-layout): rm icon-button dependency * feat(chat-layout): enhance ChatLayout with side nav hover state and transition effects * test(chat-layout): update stories * docs(chat-layout): README * refactor(input-bar): revert gap changes * refactor(chat-layout): expose shouldRenderExpanded from context and fix overflow * fix(chat-layout): peer dep and init changeset commit 68b59a0 Author: Stephen Lee <stephen.lee@mongodb.com> Date: Thu Nov 6 20:18:38 2025 -0800 [LG-5687] fix(message-prompts): update border color (#3282) * style(message-prompts): update border-color * test(message-prompts): fix darkmode propagation * chore(message-prompts): changeset commit eb4ff15 Author: Stephen Lee <stephen.lee@mongodb.com> Date: Thu Nov 6 16:29:28 2025 -0800 refactor(feature-walls): darkMode propagation (#3287) * refactor(feature-walls): darkMode propagation * fix(feature-walls): drop unused imports commit 5008087 Author: Stephen Lee <stephen.lee@mongodb.com> Date: Thu Nov 6 15:33:37 2025 -0800 [LG-5684] fix(rich-links): update colors for RichLinkBadge component (#3283) * refactor(rich-links): refactor darkmode propagation and update some colors * test(rich-links): enable darkmode in rich-links stories * chore: changesets commit 1d63f1f Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu Nov 6 19:39:48 2025 +0000 Version Packages (#3276) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> commit 6494d15 Author: Brooke Scarlett Yalof <brooke.yalof@mongodb.com> Date: Thu Nov 6 12:17:17 2025 -0500 LG-5656: Remove support for refEl property (#3270) * remove support for refEl property * Update clean-news-lay.md commit af60a2d Author: Stephen Lee <stephen.lee@mongodb.com> Date: Thu Nov 6 07:58:22 2025 -0800 [LG-5664] feat(title-bar): add compact variant support (#3275) * refactor(title-bar): reorg file structure and export Align * refactor(title-bar): styles and install lg chat provider peer dep * feat(title-bar): compact variant * test(title-bar): update stories * docs(title-bar): readme * chore(title-bar): changeset * chore(title-bar): copilot feedback * feat(chat-window): enable compact TitleBar in ChatWindow * fix: chat builds commit 45fb29a Author: Adam Rasheed <adam.rasheed@mongodb.com> Date: Wed Nov 5 09:33:54 2025 -0800 [LG-5681] chore: Update PeerDependencies (#3279) * [LG-5681] chore: Update PeerDependencies * cleanup
Reviewed/approved changes from the following: