Repository navigation
Project direction and roadmap #10
saseungmin
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Text Motion is built around reusable text animation recipes for React Native: choose how text is split, how it is rendered, when each unit starts, and how it moves.
This thread collects the direction for the library and the questions we need to answer before expanding it. The immediate focus is making the existing renderers dependable across real app workloads. The ideas below are open for discussion; their order should follow concrete use cases and the results of that work.
Where the library stands
The current API covers presets, custom recipes, word and grapheme animation, rendered-line reveals, Typewriter, accessibility policies, and explicit playback inputs.
The two renderers make different trade-offs.
nativeText()animates source tokens and is useful for word or character motion. Those tokens have their own animated containers, so it does not reproduce every shaping and layout behavior of a single nativeText.overlayText()measures a native paragraph and animates its actual rendered lines. It preserves native wrapping, but measurement and the paragraph copies used for each line have their own costs.Playback ownership is also explicit. Use
controlsfor commands such as replay or reset, andprogresswhen the app owns a continuous shared value. Keeping that ownership visible is part of the API direction. Provider-based playback wiring and public playback refs are deliberately outside the current design.Immediate priority: renderer reliability and performance
Before adding more effects or playback APIs, we need a useful picture of how the existing renderers behave on iOS and Android.
The main workloads are short titles, labels, onboarding copy, and product descriptions. These should be the baseline for decisions. Longer paragraphs, large grapheme counts, and many simultaneous rows are useful stress cases, but they should not be treated as equivalent to a typical heading.
The example app has a
Playback → Renderer Performanceprobe. The checkpoint should cover:Measurements should include the device, OS, React Native and animation-library versions, build mode, text, effects, component count, and profiling tool. Simulator and development-build results are useful for investigation, but they need to be identified clearly when comparing them with production builds on physical devices.
Frame rate is only part of the result. We also need to check wrapping, glyph clipping, text updates, replay behavior, accessible reading order, and reduced motion. A smooth animation can still have incorrect layout or playback behavior.
If ordinary title and label workloads are reliable, we can keep the default renderer and document the boundary for heavier cases. If those ordinary workloads show problems, renderer costs should be addressed before adding more features. A failing stress case alone is not enough reason to replace the rendering model.
Directions to explore after that checkpoint
Text-change transitions
The current behavior is enter-only: changed text gets its own entrance, without retaining the old text for an exit animation or crossfade.
Transitions would help with changing headlines, status labels, and similar UI. Before adding them, we need to define how old and new text coexist, when old content is released, and what happens when the text changes again before a transition finishes. Commands and external progress also need predictable targets, while screen readers should receive a clear label rather than duplicate decorative text.
More precise playback controls
pause,seek, andreverseare reasonable candidates, but each needs a clear contract. For example, seeking through staggered text raises questions about whether the value represents the whole timeline, individual animation progress, or elapsed time. Reverse playback also needs to define how delayed units and discrete effects such as Typewriter behave.These APIs should fit the existing ownership model. In particular, an instance driven by app-owned
progressshould not acquire a second competing clock. Existingstop()andplay()behavior should not be presented as exact pause/resume semantics.Screen-focus, in-view, scroll, and gesture integrations
These are common ways to drive text motion. The current
controlsandprogressinputs already provide connection points, so useful integration examples are a good starting point.A dedicated helper should earn its place by solving repeated lifecycle or synchronization problems. We should understand mounting, cleanup, replay policy, and reduced-motion behavior before making it part of the public API. Integrations should also avoid making every app depend on a particular navigation or gesture solution.
Word-in-line motion and native line-to-token mapping
Animating words inside the lines produced by native paragraph layout is different from splitting the source string into words. It needs a dependable relationship between source ranges and measured geometry.
That relationship must survive wrapping, font changes, font scaling, alignment, emoji, and different writing systems. Guessing line boundaries in JavaScript would undermine the reason to use native measurement. This direction needs groundwork in layout mapping before it can become a polished effect.
Richer effects and extension APIs
Scramble, wipe, and highlight sweeps are interesting when they solve a text-specific use case. They also involve more than adding another transform: scramble changes visible content, while wipe and highlighting may require masks or geometry.
For each effect, we should define the motion unit, renderer requirements, text-update behavior, accessibility, and reduced-motion result. A public custom-effect or renderer-extension API needs the same clarity. It should expose a stable contract rather than require applications to depend on internal descriptors or implementation details.
Optional Skia rendering
Blur, shaders, glyph distortion, and other renderer-specific effects may justify an optional Skia renderer or package.
That should be evaluated against actual visual requirements and comparable workloads. It should not become a dependency for every app using a simple word reveal, and it should not be assumed to be faster without measurements. The core can describe compatible recipes while each renderer clearly supports or rejects the capabilities it can implement.
Keeping the scope useful
A feature belongs here when it improves text splitting, layout mapping, timing, effects, playback, accessibility, or reusable text-motion recipes without making common usage harder to understand.
Number counters, odometers, currency/percentage/timer animation, generic View animation, and scene animation solve different problems. They may fit other libraries or separate Motion Kit packages, but they should not expand Text Motion into a general animation toolkit.
How priorities will be decided
A proposal is easier to evaluate when it shows a real UI requirement that the current API cannot reasonably express. From there, we need predictable behavior, renderer compatibility, accessibility, tests, examples, documentation, and an understood performance cost.
The candidates above do not have promised release dates. Some may remain examples, some may become optional integrations, and some may need a separate package. The goal is to choose additions that make text motion easier to ship without weakening the existing behavior.
Share your use case
If there is a direction you want to see prioritized, describe what you are building, which platform and text samples matter, and where the current API gets in the way. A small example of the expected behavior is especially helpful.
For performance reports, include a reproduction and the measurement conditions so we can compare the same case rather than rely on a general smooth/slow impression.
Documentation · Renderer guide · Performance guide · Playback guide
All reactions