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

Section custom spacing #172

Merged
merged 1 commit into from Jun 10, 2020
Merged

Conversation

gilbox
Copy link
Contributor

@gilbox gilbox commented Jun 10, 2020

Could use some advice for adding a test...
2020-06-09 20 14 55

@@ -152,10 +152,13 @@ public extension Section
struct Layout : Equatable
{
public var width : CustomWidth

public var customSpacing : CGFloat?
Copy link
Collaborator

@kyleve kyleve Jun 10, 2020

Choose a reason for hiding this comment

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

Maybe customInterSectionSpacing?

@kyleve
Copy link
Collaborator

kyleve commented Jun 10, 2020

For testing, I have a temp test kicking around here: https://github.com/kyleve/Listable/blob/main/Listable/Tests/Layout/List/DefaultListLayoutTests.swift#L71 which I'm using to allow for refactoring of the layout system without breaking things (after which will backfill more tests). Could update that with this property to test it does what's expected

@gilbox
Copy link
Contributor Author

gilbox commented Jun 10, 2020

@kyleve I addressed your comments, ptal

@kyleve
Copy link
Collaborator

kyleve commented Jun 10, 2020

Looks good, thanks! I forgot to mention this earlier, but could you drop an item in the Main section of the changelog as well? https://github.com/kyleve/Listable/blob/main/CHANGELOG.md

- Add `customInterSectionSpacing` property to `Section.Layout` which allows the user to specify custom spacing after a section, overriding the calculated spacing.
@gilbox gilbox force-pushed the gil/section-customSpacing branch from 88c9d8b to 44b72ff Compare June 10, 2020 18:51
@gilbox
Copy link
Contributor Author

gilbox commented Jun 10, 2020

@kyleve I updated the changelog and squashed

@kyleve kyleve merged commit 221d2f4 into square:main Jun 10, 2020
@gilbox gilbox deleted the gil/section-customSpacing branch June 10, 2020 21:01
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.

None yet

2 participants