arcgis-maps-sdk-swift-toolkit
arcgis-maps-sdk-swift-toolkit copied to clipboard
`FeatureFormView` - Use `List`
trafficstars
Builds on @zkline101's work in #1034 to enhance FeatureFormView by converting the internal VStack to a List.
Since #1034, FeatureFormView has grown in complexity to support UtilityAssociationsFormElements. As part of that work, FeatureFormGroupedContentView was needed to mimic the appearance of a section in a list. FeatureFormView was also refactored to wrap a new internal EmbeddedFeatureFormView with a NavigationStack. With more form elements in the pipeline, now is a good time to revisit adopting platform provided types like List to streamline future enhancement work.
Issues
- A
GroupFormElementwill revert to its initial expanded/collapsed state when it's scrolled out-of and back into view. - UI tests require manual scrolling to targeted form elements due to the lazy nature of a list.
- This scrolling is unstable on Mac Catalyst (FB19836397)
- Potential resolutions:
- Provide a launch argument in each test case to filter which elements are needed and therefore visible in the list to minimize scrolling. Preview changes
- Section headers are cut off by the navigation bar when form elements are focused & scrolled-to. (FB19740517)
- This is reportedly fixed in iOS 26.1 (Build: 23B85)
Considerations
- We lose the ability to remove the border around read-only elements. We have to indicate read-only via another manner.
- Semantically,
Formmakes more sense thanList, however I've found no practical visual difference between the two.Listalso has a convenientinit(_:id:editActions:rowContent:)that lets us avoid an innerForEach.Formdoes not provide the same.