Commit graph

12 commits

Author SHA1 Message Date
Jonathan Johnson
1bb5495f53
Added content refresh for virtual list
Also expanded interactive example to have a slider for item count and a
refresh button.
2024-11-08 09:01:59 -08:00
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
Daniel Bulant
4f742cd18b
add simple virtual list widget 2024-10-25 22:22:15 +02:00
Jonathan Johnson
df748a991d
Extracting easing functions + Clippy 2024-08-17 17:44:12 -07:00
Jonathan Johnson
15b8b3e452
Moved example generation into cushy
Undocumented and unsupported, but this allows generating example images.

This push is testing that the image makes it through CI.

Refs #125
2024-05-12 07:58:09 -07:00
Jonathan Johnson
76a42e2788
Updated to wgpu 0.19.0
Most of the changes were figures-related. Go figure.
2024-01-18 06:37:29 -08:00
Jonathan Johnson
6ad6cca32d
Children renamed to WidgetList
Plus more work on the user's guide, which inspired the rename.
2024-01-09 13:26:14 -08:00
Jonathan Johnson
adb51dba7e
More user guide work 2024-01-07 15:57:23 -08:00
Jonathan Johnson
b82208887d
Standardizing durations
I didn't notice I had settled on 1 second for all three stages in
the end lol.
2024-01-06 15:05:11 -08:00
Jonathan Johnson
cda13c42a2
Guide intro + KeyEvent
Also fixed virtual window's refresh handling.
2024-01-06 14:46:48 -08:00
Jonathan Johnson
8fb372e743
Work on guide 2024-01-06 10:26:23 -08:00
Jonathan Johnson
a197bb5e81
Unit-tested, auto-generated screenshots
This commit adds my first take at creating a harness for a user's guide
using the new capture functionality. The example has tests that ensure
the align widget creates the expected results.
2024-01-04 13:56:45 -08:00