fix(ChannelList): make channel list and thread list width app-driven#3235
Conversation
Change the default --str-chat__channel-list-width from 30% to 100% so the SDK no longer imposes a desktop sidebar width; the parent app drives it via the CSS variable. Decouple --str-chat__thread-list-width and --str-chat__thread-list-mobile-width from the channel list tokens, giving the thread list its own independent 100% defaults so sizing one sidebar no longer resizes the other.
π WalkthroughWalkthroughThis change updates default CSS custom property values for width sizing. The channel list's default desktop width changes from 30% to 100%. The thread list decouples from channel list width variables, setting its own independent desktop and mobile width defaults to 100% with documentation comments for overriding. ChangesDefault Width CSS Variable Updates
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers
π₯ Pre-merge checks | β 5β Passed checks (5 passed)
β¨ Finishing Touchesπ Generate docstrings
π§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: +51 B (+0.01%) Total Size: 880 kB π¦ View Changed
βΉοΈ View Unchanged
|
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3235 +/- ##
==========================================
+ Coverage 84.20% 85.18% +0.98%
==========================================
Files 485 505 +20
Lines 14874 15784 +910
Branches 4710 5010 +300
==========================================
+ Hits 12524 13445 +921
+ Misses 2350 2339 -11 β View full report in Codecov by Harness. π New features to boost your workflow:
|
## [14.8.0](v14.7.0...v14.8.0) (2026-07-09) ### Bug Fixes * **ChannelList:** make channel list and thread list width app-driven ([#3235](#3235)) ([c89366b](c89366b)) ### Features * **a11y:** improve keyboard and screen-reader support across composer, lists, search, and dialogs ([#3230](#3230)) ([2c08f53](2c08f53))
|
π This PR is included in version 14.8.0 π The release is available on: Your semantic-release bot π¦π |
π― Goal
The SDK shouldn't hold strict opinions about how wide the channel list (and thread list) sidebars are β that's a layout decision the parent app owns. Previously
--str-chat__channel-list-widthdefaulted to30%, effectively dictating a desktop two-pane ratio out of the box. This makes the sidebar width app-driven: the SDK defaults to filling available space, and the app constrains it via the CSS variable (as the vite example already does with its own layout token).π Implementation details
ChannelList.scssβ change the default--str-chat__channel-list-widthfrom30%β100%. The channel list isflex: 0 0 var(--str-chat__channel-list-width), so apps drive the width by overriding the variable (not thewidthproperty, since a non-autoflex-basiswins in a flex row).ThreadList.scssβ decouple--str-chat__thread-list-widthand--str-chat__thread-list-mobile-widthfrom the channel-list tokens. They previously resolved tovar(--str-chat__channel-list-width)/var(--str-chat__channel-list-mobile-width), which meant sizing the channel list silently resized the thread list too. They now have their own independent100%defaults, so each sidebar is sized independently.duration/easing/offset) remain shared β those are animation consistency, not width, and are unchanged.Notes / compatibility
30%desktop sidebar will now see a full-width channel list until it sets--str-chat__channel-list-widthitself.100%absolutely-positioned overlay withmin-width: 0.examples/vite, tutorial shell) are unaffected.yarn build-stylingcompiles cleanly.π¨ UI Changes
No screenshots attached β this is a CSS custom-property default change with no markup changes. Visible effect: without an app-provided width override, the desktop channel list renders full-width (fills its flex container) instead of the previous
30%sidebar. Apps set--str-chat__channel-list-width(and now optionally--str-chat__thread-list-widthindependently) to restore a fixed/percentage sidebar.Summary by CodeRabbit