frus 0.2.0
The second tagged release, 286 milestones after the first. It is still not an API commitment, but frus moves a long way from where 0.1.0 left it: applications are made of components now, with a router whose location is the browser's address.
Applications are made of components
StatelessWidget; StatefulWidget with a State; hooks (use_state, use_effect,
use_interval, use_text_controller…); TextEditingController, ChangeNotifier and
ValueNotifier. Then there is FrusApp, an application that is a root widget and whatever it
builds: no message type, no update, no view. The message-based Application is still
there, and FrusApp is one. A host module lets a component change what is not a widget: the
theme, the language, the zoom, a focus, a scroll, work for another thread.
A router, and addresses
GoRouter holds routes named by a pattern of path. It has go, push, replace and pop,
path parameters and queries, redirects, page transitions and the back gesture. On the web, its
location is the address bar: a page opens at #/users/42, the browser's back and forward
buttons move the application, and a reload comes back to the same page. Android reads its
launch link, and a desktop reads its argument.
Widgets and motion
A restyle of the core widgets: buttons, chips, cards, dividers, the app bar, tabs, navigation.
New widgets: DataTable::lazy, DropdownMenu, SearchAnchor, ToggleButtons,
ExpansionPanelList, ReorderableList, a picker wheel, DraggableScrollableSheet and the whole
Material icon set. New motion: implicit animations, explicit transitions, AnimatedSwitcher,
sheets that follow the finger, and drag to reorder that scrolls the list under it.
Text and input on a phone
Selection handles, autofill hints, the clipboard on Android and in the browser, emoji, and the focused field brought back above the soft keyboard. The device's language, and on Android the reader's font size, night mode and reduced motion, reach the application.
Quality
All fifteen crates refuse a missing doc comment. Every crate's README example is compiled as a
doctest, the minimum supported Rust version is pinned, and the smallest application has a size
budget in CI. cargo test --workspace runs 2,550 tests, up from 717 at 0.1.0.
What breaks
A good deal, as the release moves the API. Variant::Primary and Variant::Secondary became
Variant::Filled and Variant::Outlined. Scaffold no longer scrolls its body, AppBar::new()
takes no title, and every Navigator page has a key.
The changelog says what to change
for each one.
