arcgis-maps-sdk-swift-toolkit icon indicating copy to clipboard operation
arcgis-maps-sdk-swift-toolkit copied to clipboard

`FeatureFormView` - Use `List`

Open dfeinzimer opened this issue 3 months ago • 0 comments
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 GroupFormElement will 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, Form makes more sense than List, however I've found no practical visual difference between the two. List also has a convenient init(_:id:editActions:rowContent:) that lets us avoid an inner ForEach. Form does not provide the same.

dfeinzimer avatar Aug 15 '25 21:08 dfeinzimer