Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make wavebar data responsive (#279)
### 🎯 Goal The wavebar container for voice recording had a fixed width of `120px` but it's very easy to create a layout (using our CSS variables) where it caused an overflow. This PR sets a responsive width for the wavebar. ### 🛠 Implementation details - The wavebar container doesn't have a fix size anymore - The wavebars still have a fixed width - The React SDK uses a fixed a sample size (40) so it will always create a wavebar that's 120px wide (no UI change there) - The Angular SDK uses the `--str-chat__voice-recording-amplitude-bar-width` and `--str-chat__voice-recording-amplitude-bar-gap-width` variables to compute the sample size that fits the wavebar container My first implementation was to set `width: auto` to the individual wavebars and then there is no need to compute anything in the SDK, but the problem is that this can lead to non-integer pixel values, which can look wonky when rendered (some bars looked thinner than the others even though they had the same width) ### 🎨 UI Changes Before: ![Screenshot 2024-03-21 at 14 25 52](https://github.com/GetStream/stream-chat-css/assets/6690098/50fea38e-508b-4ca2-873c-e80d7a54c355) After: ![Screenshot 2024-03-21 at 14 26 32](https://github.com/GetStream/stream-chat-css/assets/6690098/7de90062-57b8-4756-be2c-8cc42835887e)
- Loading branch information