Artboard List Map Rules are global by ViewModel ID, not scoped per List instance
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 822
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
Description
I have a Rive file with a main artboard containing multiple nested artboards. Each nested artboard has a List component bound to the same ViewModel type ("Slide"), but each List should map to a different component artboard ("Entry" vs "Summary-Entry"). My goal is to have a configurable presentation for the same data structure.
Structure:
- Main artboard: "Recap"
- Nested artboard A with List → should use "Entry" component artboard
- Nested artboard B with List → should use "Summary-Entry" component artboard
- Both Lists are bound to ViewModel type "Slide"
I configured the artboard list mapping in the Rive editor for each List independently. This works correctly in the editor preview - each List renders with its designated component artboard.
However, in the iOS SDK, both Lists render using the same component artboard. It appears the mapping rules are stored globally by ViewModel ID rather than per ArtboardComponentList instance.
Looking at the source code, I believe the issue is in artboard_component_list.cpp:
void ArtboardComponentList::addMapRule(ArtboardListMapRule* rule){ m_artboardMapRules[rule->viewModelId()] = rule->artboardId();}
This creates a one-to-one mapping from ViewModel ID to artboard ID
Expected behavior
Each Artboard instance should maintain its own mapping rules. The mapping configured per-List in the editor should be preserved at runtime, allowing the same ViewModel type to map to different Artboards in different Lists.
Workaround
Adding a "presentation" enum property to the ViewModel and using a state machine to toggle between visual states. This works but adds unnecessary complexity.
Device & Versions
- Device: iOS Simulator
- iOS version 26.2
Source
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in artboard_component_list.cpp at ArtboardComponentList::addMapRule and inspect how map rules are stored and read for each List instance. Use the supplied recap-repro.zip and the nested Lists described in the issue to verify the current iOS SDK behavior. Done means each List preserves its configured mapping when both use the same ViewModel type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ios, swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100