Component Lists (Dart) # Description This is a first pass at the Dart implementation of Component Lists (dynamically generated lists). In this iteration, the Component List items can be built up using ViewModel list items together with Artboards. https://github.com/user-attachments/assets/3df40415-d1a5-43ef-a3e7-caf93516b064 # Details ArtboardComponentList is a new type of Drawable that builds up and renders MountedArtboards in a similar way to how NestedArtboards work. To use it with DataBinding, perform the following steps: 1. Create a ViewModel to contain your list 2. Create another ViewModel representing your List item. You can also add properties to this viewmodel that are bound to properties in an artboard to be used as a list item. 3. In the ViewModel created in step 1, add a List property from the popout 4. Select the List property and in the inspector, add List items. These items should be tied to instances of the ViewModel created in step 2 and the Artboard to be used as your list items. 5. Bind the ViewModel from step 1 to the Artboard where you are adding the Component List (ie Main Artboard) 6. On the main artboard, select either the Artboard itself or create a layout and select the layout. In the inspector, click **Add Artboard List**. The Component List will be added as a child of the selected Artboard/Layout. 7. Select the Component List, then bind the ViewModel's list property to the Source field (either via pickwhip or right click) 8. Play the state machine Notes: - (UPDATE: workarounds have been removed and it now works with design mode DB)There are a couple of workarounds to get this to work because the ViewModels don't get "applied" until the State machine starts playback (this will change soon with Design time DataBinding). Those are pointed out in the comments. - (UPDATE: crash has been resolved)There is also a temp workaround for a crash I was seeing. Need to investigate further. - Editor UX still needs work - CPP implementation to follow in a seperate PR Diffs= 55918df404 Component Lists (Dart) (#9278) Co-authored-by: Luigi Rosso <luigi.rosso@gmail.com> Co-authored-by: Philip Chung <philterdesign@gmail.com>
diff --git a/.rive_head b/.rive_head index c30a774..5739bfc 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -762485768ad11846fec2347a7ffc24fc071e9f03 +55918df4047d08c6a6adcdd18f49a010b8e05724
diff --git a/src/data_bind/data_bind.cpp b/src/data_bind/data_bind.cpp index 390829a..0aeeaf6 100644 --- a/src/data_bind/data_bind.cpp +++ b/src/data_bind/data_bind.cpp
@@ -186,7 +186,6 @@ } if (m_Source != nullptr && m_ContextValue != nullptr) { - // Use the ComponentDirt::Components flag to indicate the viewmodel has // added or removed an element to a list. if ((value & ComponentDirt::Components) == ComponentDirt::Components)