`rio.Switcher` transition_time of 0.0 breaks layout
Closed this issue · 1 comments
Sn3llius commented
Describe the bug
When setting the transition_time
of rio.Switcher
to 0.0
, it causes the layout to break. This issue manifests as incorrect positioning or unexpected behavior in the layout of the components managed by rio.Switcher
.
Expected Behavior
Setting the transition_time
to 0.0
should result in an instantaneous switch between components without affecting the layout. The layout should remain consistent and correct, just as it would with a non-zero transition time.
Steps to Reproduce
- Initialize rio.Switcher with a component or None.
- Set the
transition_time=0.0
ofrio.Switcher
. - Trigger a switch between the components.
- Observe the layout behavior and note any issues.
Screenshots/Videos
Rio.-.Switcher.-.Profil.1.Microsoft.Edge.2024-06-07.09-22-36.mp4
Operating System
Windows
What browsers are you seeing the problem on?
Chrome, Safari, Edge
Browser version
No response
What device are you using?
Desktop
Additional context
No response
Sn3llius commented
A quickfix with ~max(transition_time, 0.01)
was added, but it doesn't solve the issue 😄