Skip to content

Conversation

@loinsir
Copy link

@loinsir loinsir commented Nov 27, 2025

Summary

  • Add findAllScrollViews method to detect all ScrollViews intersecting with overlay area
  • Implement best match selection logic based on intersection area calculation
  • When multiple ScrollViews have equal maximum intersection area, select the last one added
  • Add comprehensive test cases for multi-ScrollView scenarios

Changes

Core Implementation

  • ActivatedOverlayArea: Add intersectionArea(with:) method to calculate intersection area with a given rect
  • DynamicOverlayScrollViewProxy:
    • Add findAllScrollViews(in:) public method
    • Update findScrollView(in:) to select best match based on maximum intersection area
    • Implement private extension for recursive ScrollView detection

Test Coverage

  • testMultipleScrollViewsSelection: Verify selection of ScrollView with maximum intersection area
  • testMultipleScrollViewsWithPartialOverlap: Test selection with partially overlapping ScrollViews
  • testFindAllScrollViews: Verify detection of all intersecting ScrollViews
  • testNoScrollViewWhenNoIntersection: Verify no selection when overlay doesn't intersect any ScrollView
  • ViewRenderer: Fix window property handling for modern iOS scene-based architecture

Test plan

  • Run all existing tests to ensure no regression
  • Verify new test cases pass
  • Test multi-ScrollView selection with different intersection scenarios
  • Verify proper handling of edge cases (no intersection, equal areas)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant