Skip to content

Conversation

@mikhailChelbaev
Copy link
Collaborator

This PR resolves an issue where the layout of the Countdown component could break under certain conditions.

The issue occurred when the unit text was shorter than the time value. The bug appeared because the cell width was calculated only once on appear and when model changes. However, the width of digits can vary, and as the value changes every second, it could exceed the initially calculated width.

Ideal Solution

The optimal solution would be to recalculate the width dynamically every time the value changes. However, this approach would significantly increase resource usage, which may not be ideal for all devices.

Fix Implemented

To address this, a small value to the initially calculated width is added. While this is not a perfect solution, it should work in most cases. We will monitor this fix, and if the issue appear in the future, we will explore alternative approaches.

@mikhailChelbaev mikhailChelbaev self-assigned this Jan 10, 2025
@mikhailChelbaev mikhailChelbaev changed the base branch from main to v1.3.2 January 10, 2025 15:24
@mikhailChelbaev mikhailChelbaev merged commit 6a81009 into v1.3.2 Jan 13, 2025
1 check passed
@mikhailChelbaev mikhailChelbaev deleted the fix/countdown-layout branch January 13, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants