zenangst / Spots

:bamboo: Spots is a cross-platform view controller framework for building component-based UIs
Other
1.31k stars 72 forks source link

Improve initial content offset for infinite scrolling #804

Closed zenangst closed 6 years ago

zenangst commented 6 years ago

This PR improves the starting position for components that use infinite scrolling. It will now try to calculate a different starting position depending if mulitple views actually fit on screen. This leads to a more symetrical starting point.

codecov[bot] commented 6 years ago

Codecov Report

Merging #804 into master will increase coverage by 7.32%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #804      +/-   ##
==========================================
+ Coverage   77.13%   84.46%   +7.32%     
==========================================
  Files         152      152              
  Lines       10317    10440     +123     
==========================================
+ Hits         7958     8818     +860     
+ Misses       2359     1622     -737
Flag Coverage Δ
#ios 83.31% <100%> (+24.97%) :arrow_up:
#osx 86.59% <ø> (+0.02%) :arrow_up:
#tvos 82.46% <100%> (+7.95%) :arrow_up:
Impacted Files Coverage Δ
Sources/iOS/Classes/Component.swift 90.61% <100%> (+22.12%) :arrow_up:
SpotsTests/tvOS/SpotsScrollViewTVOSTests.swift 0% <0%> (-100%) :arrow_down:
SpotsTests/tvOS/SpotsControllerTVOSTests.swift 0% <0%> (-100%) :arrow_down:
...potsTests/Shared/ComponentFocusDelegateTests.swift 0% <0%> (-86.37%) :arrow_down:
Sources/iOS/Classes/DefaultItemView.swift 80.64% <0%> (-6.46%) :arrow_down:
SpotsTests/iOS/ComponentDelegateiOSTests.swift 81.01% <0%> (-3.8%) :arrow_down:
...es/iOS-Exclusive/Classes/SpotsScrollView+iOS.swift 88.67% <0%> (-3.78%) :arrow_down:
...urces/iOS/Extensions/Delegate+iOS+Extensions.swift 88.88% <0%> (-1.24%) :arrow_down:
Sources/macOS/Classes/Component.swift 75.56% <0%> (+0.9%) :arrow_up:
Sources/Shared/Extensions/Codable+Extensions.swift 57.77% <0%> (+2.22%) :arrow_up:
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 959cce8...459c542. Read the comment docs.