-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add FlatSection
#21
base: 2.0-beta
Are you sure you want to change the base?
Add FlatSection
#21
Conversation
Still a little hacky, more like a POC, but is overall much more flexible
…ing by cache cell section
…s on UINib(nibName:bundle:)
[SBI-519] Add Composed hotfix
…atSection # Conflicts: # Sources/ComposedUI/CollectionView/CollectionCoordinator.swift
# Conflicts: # Sources/ComposedUI/CollectionView/CollectionCoordinator.swift
Mirror( | ||
self, | ||
children: [ | ||
"children": children, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your trickery haha
this is really interesting but I'm not 100% understanding its need. Im all for it, just would love to understand how you came to it 👍 |
The latest changes (https://github.com/opennetltd/Composed/tree/feature/FlatSection) account for a header. We have multiple There are still some downsides so we might need a few runtime warnings (e.g. that the headers and footers of the children of the flat section are ignored). I'm happy to keep this open an keep iterating on it until some of these issues are improved though. |
ahh I see the point now. Interesting. Yeah lets keep it open as a PR for the moment, can you mark this as a draft. |
# Conflicts: # Sources/Composed/Providers/ComposedSectionProvider.swift # Sources/ComposedUI/CollectionView/CollectionCoordinator.swift
} | ||
|
||
public func mappingDidInvalidateFooter(at sectionIndex: Int) { | ||
// TODO: Reload header |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A future PR can cover the updates already made to UICollectionView
, including batched updates.
@shaps80 we've been using this for a while now and I'm not aware of any issues. It still ignores the headers and footers of children but I feel this is worthy of being classed as a functioning beta (and thus merged in to |
This is a new type of section that is similar to
ComposedSectionProvider
, but rather than flattening each of the children in to a singleSectionProvider
it flattens them in to a singleSection
.The
ComposedUI
side of this has been updated to support multiple cells per section, with a convenience forFlatSection
that delegates the calls to each of the flattened sections.This is a breaking change since the protocol requirements have changed. I have set the base of the PR to
merge-all-libraries
since that's also a breaking change and this PR relies on those changes.edit: We've moved to our own fork to allow for more rapid development. The latest changes are in https://github.com/opennetltd/Composed/tree/feature/FlatSection, which will eventually be merged back in to this repo once some of the other PRs/issues have been resolved.