-
Notifications
You must be signed in to change notification settings - Fork 71
feat(chat): update layout to use flexible height containers #3212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(chat): update layout to use flexible height containers #3212
Conversation
🦋 Changeset detectedLatest commit: 55f3bd4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 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 |
Size Change: +51 B (0%) Total Size: 1.59 MB
ℹ️ View Unchanged
|
Note: this should be upgraded with the following packages to avoid UI regressions: | ||
- `@lg-chat/[email protected]` | ||
- `@lg-chat/[email protected]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make these peer-dependencies of eachother?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry about making these peer deps because it may lead to further coupling which I'm looking to avoid. I'm thinking about bundling these together as compound components since that's actually how they are used in practice, and I don't think there's a good reason that a consumer would need to import multiple chat packages to build out the same UI
… remove redundant container element
f733bba
to
ca6bc0d
Compare
This was due to a flake in a |
✍️ Proposed changes
This PR introduces breaking changes to the chat component layout system to improve flexibility and composability. The main changes include:
Breaking Changes:
@lg-chat/message-feed
: Removed the fixed default height of 500px. The component now grows to fill its parent container.@lg-chat/chat-window
: Updated the container to take up 100% of the parent's vertical space and added a hidden spacer element to ensure messages flow from the bottom when content is shorter than the container.Supporting Changes:
@lg-chat/fixed-chat-window
: Added a fixed 640px height to maintain proper popover sizing (this package will be deprecated soon).@lg-chat/leafygreen-chat-provider
: Addedheight: 100%
to the wrapper div for proper height propagation.These changes enable better integration with container components like Drawer and provide more flexible layout options. A new
InDrawerLayout
story demonstrates the improved integration with the Drawer component.@lg-chat/[email protected]
@lg-chat/[email protected]
@lg-chat/[email protected]
🎟️ Jira ticket: No associated ticket
✅ Checklist
pnpm changeset
and documented my changes🧪 How to test changes
InDrawerLayout
story to verify the chat interface properly fills the drawer panelFixedChatWindow
maintains similar height in the popover