mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
- Replaced `Flipper.Spring` with `Flipper.Instant` for setting animation goals across multiple components, including `Page`, `Checkbox`, `Dropdown`, `IconButton`, `TextButton`, `TextInput`, `TouchRipple`, and `Notification`. - This change simplifies the animation logic, providing immediate transitions without spring dynamics, enhancing performance and responsiveness. These updates improve the user experience by ensuring quicker visual feedback during state changes.
4.9 KiB
4.9 KiB
| name | overview | todos | isProject | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Remove Plugin Animations | Replace every `Flipper.Spring.new(...)` with `Flipper.Instant.new(...)` across all plugin components to make all UI transitions instant, and remove the 0.3s double-click delay in DomLabel expand/collapse. |
|
false |
Remove All Animations From Plugin
Strategy
Every animation in the plugin uses Flipper motors with Flipper.Spring.new(value, { frequency, dampingRatio }) goals. The Flipper library already has Flipper.Instant.new(value) which sets the motor value immediately with no interpolation. The fix is a mechanical replacement of every Flipper.Spring.new(...) with Flipper.Instant.new(...).
This preserves the binding/motor infrastructure (no structural refactoring needed) while making every transition instant.
Additionally, the DomLabel expand/collapse has a task.delay(0.3) that waits to distinguish single-click from double-click before expanding. This delay should be removed so expansion is immediate on click.
Files to Change (10 files, ~20 replacements)
1. DomLabel.lua -- Expand/collapse
- Line 436:
Flipper.Spring.new(24, {...})->Flipper.Instant.new(24) - Line 602:
Flipper.Spring.new(goalHeight, {...})->Flipper.Instant.new(goalHeight) - Lines 545-608: Remove the
task.delay(0.3)wrapper so expansion logic runs immediately on single click (keep double-click detection, just don't delay the expand)
2. Page.lua -- Page transitions
- Line 65:
Flipper.Spring.new(...)->Flipper.Instant.new(...)
3. TouchRipple.lua -- Click ripple effect
- Line 84:
Flipper.Spring.new(1, EXPAND_SPRING)->Flipper.Instant.new(1) - Line 85:
Flipper.Spring.new(1, EXPAND_SPRING)->Flipper.Instant.new(1) - Line 93:
Flipper.Spring.new(0, {...})->Flipper.Instant.new(0) - Remove unused
EXPAND_SPRINGconstant
4. TextButton.lua -- Hover/enabled
- Line 36:
Flipper.Spring.new(...)->Flipper.Instant.new(...) - Line 64:
Flipper.Spring.new(1, SPRING_PROPS)->Flipper.Instant.new(1) - Line 70:
Flipper.Spring.new(0, SPRING_PROPS)->Flipper.Instant.new(0) - Remove unused
SPRING_PROPSconstant
5. TextInput.lua -- Hover/enabled
- Line 34:
Flipper.Spring.new(...)->Flipper.Instant.new(...) - Line 101:
Flipper.Spring.new(1, SPRING_PROPS)->Flipper.Instant.new(1) - Line 107:
Flipper.Spring.new(0, SPRING_PROPS)->Flipper.Instant.new(0) - Remove unused
SPRING_PROPSconstant
6. Notification.lua -- Appear/dismiss
- Line 43:
Flipper.Spring.new(0, {...})->Flipper.Instant.new(0) - Line 50:
Flipper.Spring.new(1, {...})->Flipper.Instant.new(1)
7. Dropdown.lua -- Open/close
- Line 39:
Flipper.Spring.new(...)->Flipper.Instant.new(...)
8. IconButton.lua -- Hover circle
- Line 41:
Flipper.Spring.new(1, HOVER_SPRING_PROPS)->Flipper.Instant.new(1) - Line 45:
Flipper.Spring.new(0, HOVER_SPRING_PROPS)->Flipper.Instant.new(0) - Remove unused
HOVER_SPRING_PROPSconstant
9. Checkbox.lua -- Active state
- Line 26:
Flipper.Spring.new(...)->Flipper.Instant.new(...)
Not Touched
- Spinner.lua -- Uses
RenderSteppedrotation, not Flipper springs. This is a loading indicator, not a decorative animation. Keeping it. - bindingUtil.lua --
mapLerp,blendAlpha,fromMotorare utility functions still needed by the instant-value bindings. No changes needed. - Flipper package -- Vendored, not modified.