Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection bricks with fixed heights were infinitely resizing. #113

Merged

Conversation

thevwu
Copy link
Contributor

@thevwu thevwu commented Mar 22, 2017

This is an issue when you have an outer collection brick with a fixed height, and an inner collection brick with an automatic height. When scrolling the outer collection brick, the inner collection brick will keep resizing itself because the outer collection brick is also resizing itself. This merge makes it so that if a collection brick has a fixed height, it will not try to resize itself.

Fixes #109

@thevwu thevwu force-pushed the bugfix-collectionBrickFixedHeight branch from 24aae18 to 293ba4b Compare March 22, 2017 22:16
@thevwu thevwu force-pushed the bugfix-collectionBrickFixedHeight branch from 293ba4b to 4d53e18 Compare March 23, 2017 15:20
@codecov-io
Copy link

Codecov Report

Merging #113 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
+ Coverage   93.47%   93.48%   +<.01%     
==========================================
  Files          38       38              
  Lines        3034     3038       +4     
==========================================
+ Hits         2836     2840       +4     
  Misses        198      198
Impacted Files Coverage Δ
Source/Bricks/Collection/CollectionBrick.swift 86.73% <100%> (+0.56%) ⬆️

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 6506b08...4d53e18. Read the comment docs.

@@ -145,6 +145,11 @@ public class CollectionBrickCell: BrickCell, Bricklike, AsynchronousResizableCel
return super.preferredLayoutAttributesFittingAttributes(layoutAttributes)
}

guard self._brick.height.isEstimate else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need self. here?

@jay18001 jay18001 merged commit e8d74a8 into wayfair-archive:master Mar 23, 2017
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.

CollectionBrick issues with height sizing
3 participants