Fix recording toast spacing above fixed-style composer#6482
Conversation
The recording hint and permission rationale snackbars lost their gap above the composer in fixed style: the toast anchors to the record button, whose 16dp inset consumed the snackbar's own bottom padding, collapsing the gap to ~0px. Add matching bottom padding in fixed style so both keep a 16dp gap, as they already do in floating style and as the design specifies. AND-1210
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
WalkthroughThis PR modifies two audio recording snackbar components in the message composer to conditionally adjust their bottom padding based on whether the composer uses floating-style layout. When enabled, snackbars use zero padding; otherwise, they use standard medium spacing. ChangesConditional Snackbar Bottom Padding in Composer
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
…acing-above-the-composer
SDK Size Comparison 📏
|
|



Goal
The voice-message recording hint toast ("Hold to record. Release to save/send") should sit 16px above the composer top edge, per design. It does in the floating composer style, but in the default fixed style the gap collapses to ~0px. The same gap is missing on the mic-permission rationale snackbar, which shares the component.
Resolves AND-1210 (Notion #12).
Implementation
The toast is a popup anchored to the record button, which sits 16dp inside the fixed-style composer (the composer's conditional
top = spacingMdinset). That offset exactly consumesStreamSnackbar's built-in 16dp bottom padding, so the visible gap drops to 0 in fixed style. Floating style has no top inset, so its gap is already correct.Added a conditional bottom padding —
spacingMdin fixed style,0in floating — toMessageComposerAudioRecordingHintandMessageComposerAudioRecordingPermissionRationaleinChatComponentFactory, mirroring the composer's own conditional top inset. This restores the 16dp gap in fixed style and leaves floating style unchanged.🎨 UI Changes
Recording hint / permission-rationale toast in fixed composer style now keeps a 16px gap above the composer (was flush against it). Floating style is visually unchanged.
Testing
Fixed composer style (default):
Floating composer style (
ComposerConfig(floatingStyleEnabled = true)):4. Repeat the steps above → spacing is unchanged (still 16px), confirming no regression.
Summary by CodeRabbit