This repository has been archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Support embedding data sources in a carousel #6
Closed
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
`_EmbeddedDataSource` can be made `private`, helping prevent the implementation details leak `CarouselSizingStrategy` will size cells to automatically, but is currently only used with `.automatic(isUniform: false)` Explicit reference to `EmbeddingDataSource` was removed from `DataSourceCoordinator` to try and prevent special requirements for `EmbeddingDataSource` `PersonCell` now supports horizontal layout
Performance
This doesn’t seem to crash or throw the assertion, so it’s unclear to me why this was crashing in the first place
JosephDuffy
force-pushed
the
feature/embedding
branch
from
May 17, 2019 16:49
755a632
to
6c868a8
Compare
A selection dataSource can now query its selectedIndexPaths
…ch also handles first-run scenarios.
…) no longer results in a failed animation
Added selection restoration to the example Added selectElement and deselectElement support
…imates as expected. Bugfix: Composed mappings are now invalidated in the correct order depending on whether we're removing or inserting
# Conflicts: # Composed/Core/DataSources/EmbeddingDataSource.swift # Composed/Views/DataSourceCoordinator.swift
# Conflicts: # Playground/AppDelegate.swift
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Classing as a draft since there are likely a few issues and this hasn't really been used "in the wild" yet.
But anyway I think this is the basic required.
The general idea is that the
EmbeddedDataSource
implements a few more of the delegate methods around sizing, and has a custom sizing strategy. Overall the API is pretty much the same (it needs to be told the sizing strategy for the embedded data source but I think that's it).One odd thing is that the data source you pass in to the embedding one will contain a sizing strategy, but it will be largely (maybe entirely?) ignored, but it still needs to provide UI because it's going to be providing the cells themselves.