cushy/guide
Jonathan Johnson 4bc3f5a884
Refactored VirtualList
These set of changes attempt to resolve a few complexities from the
original implementation: sizing and how to dynamically update the
content in the list.

On the sizing front, manually specifying the width and height of the
rows felt like it was more complex than measuring the first widget and
using that for all other widgets. This allows a user who wants to force
an explicit size to use the Resize widget, while also supporting
SizeToFit flows. Additionally, this paves the way for us to add
horizontal scrolling to this list, but this commit was already complex
enough I held off on that change for now.

One workflow I wanted to see supported was going from 0 rows to 50 rows.
When the item count comes from a trait, it was pretty complicated to
determine how to tell the list to ask for a new row count. By having the
user provide a Value<usize>, they can provide a `Dynamic<usize>` that
can be updated with a new row count whenever the application determines
there is new data. We still need to figure out a way to force a refresh
of the data even if the row count doesn't change.

Ultimately changing this allowed removing the trait and seemingly
simplified the basic usage in addition to adding more flexibility.
2024-11-07 14:27:08 -08:00
..
guide-examples Refactored VirtualList 2024-11-07 14:27:08 -08:00
src add simple virtual list widget 2024-10-25 22:22:15 +02:00
theme Moved guide "warning" to all pages 2024-01-09 06:53:18 -08:00
.gitignore Guide readme + cleaning repo 2024-05-12 07:20:52 -07:00
book.toml Children renamed to WidgetList 2024-01-09 13:26:14 -08:00
README.md Guide readme + cleaning repo 2024-05-12 07:20:52 -07:00

Cushy User Guide

The Cushy user guide contains examples that are generated using Cushy's virtual recorder functionality. To build this guide:

  1. Install mdbook and mdbook-variables

  2. Capture examples:

    CAPTURE=1 cargo test -p guide-examples --examples
    
  3. Build the guide:

    mdbook build guide