-
Notifications
You must be signed in to change notification settings - Fork 259
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
Nested visible frame inset fix #119
Open
casperzandbergenyaacomm
wants to merge
7
commits into
SoySauceLab:master
Choose a base branch
from
casperzandbergenyaacomm:nested-visibleFrameInset-fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Nested visible frame inset fix #119
casperzandbergenyaacomm
wants to merge
7
commits into
SoySauceLab:master
from
casperzandbergenyaacomm:nested-visibleFrameInset-fix
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…th the visible indexes and the frame they appear in. This frame can be different from the input frame if the layout changes it (like VisibleFrameInsetLayout does).
…d by taking the order of indexes returned by the layout into account. This does add two filters when `visible(for:)` is called on a SectionProvider.
…ns a rect for the section to add its visible frame inset to.
…t (or the other way around). After this fix there is one more issue: When a horizontal layout section with visible frame inset is inside a section provider with vertical layout (or the other way around) the visible frame inset is actually twice the set value. This is due to the optimised index search not checking vertical position. Right now I added a guard to not show the section when visible frame is empty instead of when there is no frames inside the visibleFrame. Not sure if this is better optimised or not. A way to fix it would be to check if rootLayout is a vertical or horizontal layout and adjusting the inset inside the VisibleFrameInset init, but this is not the root of the problem so I'm not sure how to do it instead.
…e insets are in the right direction because the VisibleFrameInsetLayout might get transposed later.
Codecov Report
@@ Coverage Diff @@
## master #119 +/- ##
==========================================
+ Coverage 73.46% 73.84% +0.38%
==========================================
Files 41 41
Lines 1123 1147 +24
==========================================
+ Hits 825 847 +22
- Misses 298 300 +2
Continue to review full report at Codecov.
|
Ah there is an unused CGRect extension in there by accident |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From commit messages:
After this fix there is one more issue:
When a horizontal layout section with visible frame inset is inside a section provider with vertical layout (or the other way around) the visible frame inset is actually twice the set value. This is due to the optimised index search not checking vertical position. Right now I added a guard to not show the section when visible frame is empty instead of when there is no frames inside the visibleFrame. Not sure if this is better optimised or not.
We can't really fix this since we can't actually check if the insets are in the right direction because the VisibleFrameInsetLayout might get transposed after checking.