Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Support embedding data sources in a carousel #6

Closed
wants to merge 29 commits into from

Conversation

JosephDuffy
Copy link
Contributor

@JosephDuffy JosephDuffy commented May 13, 2019

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.

`_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
@JosephDuffy JosephDuffy requested a review from shaps80 May 13, 2019 17:25
shaps80 and others added 3 commits May 15, 2019 12:32
This doesn’t seem to crash or throw the assertion, so it’s unclear to me why this was crashing in the first place
shaps80 and others added 21 commits May 22, 2019 15:27
A selection dataSource can now query its selectedIndexPaths
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
@shaps80 shaps80 closed this Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants