mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 02:00:49 +08:00
fix: audio waveform clipping in horizontal card view (#14789)
Fixes #13399 ### Issue When viewing an audio attachment card in horizontal view, the waveform was being clipped and not fully visible. In vertical view it displayed correctly. ### Fix - `audio-waveform` and `progressContainer` flex children were missing `minWidth: 0` and `flex: 1`, causing container overflow - `.affine-attachment-container` had a fixed height with `overflow: hidden` that cut off the waveform row ### Screenshot Verification **Before** <img width="1661" height="935" alt="image" src="https://github.com/user-attachments/assets/b2f0908b-94fe-4869-bdfb-cc6a757e703d" /> **After** <img width="750" height="182" alt="image" src="https://github.com/user-attachments/assets/63caac69-f37b-4894-80de-806b691581c8" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit **New Features** - Introduced audio embed card functionality allowing users to embed and display audio content directly in documents with standardized dimensions and improved responsive layout styling for better visual presentation and integration. **Improvements** - Enhanced styling and layout handling for audio player components to ensure proper display and optimal rendering in various container sizes and space constraints. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -123,6 +123,7 @@ export const progressContainer = style({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 8,
|
||||
minWidth: 0,
|
||||
});
|
||||
|
||||
export const progressBar = style({
|
||||
|
||||
@@ -9,4 +9,6 @@ export const root = style({
|
||||
position: 'relative',
|
||||
overflow: 'hidden',
|
||||
maxWidth: 2000, // since we have at least 1000 samples, the max width is 2000
|
||||
minWidth: 0,
|
||||
flex: 1,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user