Wishlist View

Last Updated - Platform 19.0 - SDK 14.0

The WishlistView is the main view of a WishlistViewController to present the wishlist items. It also presents the loading, empty, and error states.

Container.shared.views.wishlistView = {
PoqWishlistView()
}

The PoqWishlistView (default) variation of this view:

  • Uses and passes WishlistViewData to subviews.
  • Presents the WishlistHeaderView view to present the item count and clear button.
  • Presents a tableView of wishlist items using a WishlistViewDataSource.
  • Supports Skeletonable whilst loading; where the data source is responsible for skeleton cells.
  • Presents an EmptyView when there are no items with a CTA to begin shopping.
  • Presents an ErrorView when fetching the Wishlist fails.
  • Uses a TransitioningContainerView to transition with a fade between default (or loading), error and empty states.

Wishlist View
Wishlist View

Data Source

The WishlistViewDataSource for a PoqWishlistView to present the wishlist items. This data source:

  • Uses an array of WishlistItemViewData passed from WishlistViewData.
  • Presents WishlistItemView cells for WishlistItemViewData.
  • Supports Skeletonable and presents skeletonised WishlistItemView cells whilst loading.
  • Supports Move to Wishlist which is enabled by default but can be disabled by the initialiser.
Container.shared.dataSources.wishlistViewDataSource = {
WishlistViewDataSource()
}

View Data Mapper

The WishlistViewDataMapper to map from the WishlistDomainModel (currently an outdated domain object) to the WishlistViewData to present.

Container.shared.mappers.wishlistViewDataMapper = {
PoqWishlistViewDataMapper()
}