HubFramework Versions Save

DEPRECATED – Spotify’s component-driven UI framework for iOS

2.0.9

7 years ago

Added

  • A new diffing algorithm that performs a lot better when modifying a view model that has a large number of components.
  • HUBViewControllerScrollHandler can now decide which keyboard dismiss mode that the view should use.
  • HUBActionContext now carries HUBFeatureInfo, that can be used to make decisions in an action or action handler.
  • HUBViewControllerDelegate can now change the center point for overlay components, if it wants to.

Changed

  • The API for adding JSON data to a builder has been tweaked to import better into Swift. In Swift, the methods are now named addJSON(data:) throws and addJSON(dictionary:).

Fixed

  • The project has now been updated for Xcode 8.2.
  • Image loading is no longer forced to be async. This should heavily reduce flickering for cached images.

2.0.8

7 years ago

Added

  • The framework now automatically manages highlights & selection for child components. You can still perform manual selection handling (for custom views) using childDelegate.
  • Carthage is now fully supported! We have a new dynamic framework target (HubFramework-iOS) that will automatically be picked up by Carthage.
  • Hub Framework can now be imported by other frameworks.
  • HUBViewController now exposes its viewURI as a public property.

Fixed

  • A crash that could occur because of a race condition during rapid view model updates.

2.0.7

7 years ago

Added

  • HUBManager now has a convenience initializer that makes it a lot simpler to set up the framework in an app.
  • You can now easily create view controllers by only having to supply an array of content operations & a feature title.
  • You can now optionally place body components under a header component, just like how navigation bars work.
  • HUBViewController now has a reload API, that reloads its content (regardless of any reload policy). Thanks to @zhubofei for implementing this!
  • A HUBViewController delegate now gets notified whenever a component was reused.
  • You can now assign customData to a component's image data (HUBComponentImageData). Thanks to @zhubofei for helping out on this!
  • You can now set local component images through JSON.
  • A new content operation implementation (HUBBlockContentOperation) enables you to easily create synchronous content operations using a block.
  • You can now unregister any previously registered custom JSON schemas.
  • There's a new Concept Guide, that gives you an alphabetical reference to all Hub Framework concepts.

Fixed

  • A bug that could cause a header component to end up in an invalid state when its view controller was reloaded.
  • A bug that could cause invalid component adjustment if only one component existed. Thanks to @aliak00 for fixing this!
  • A bug that could cause the callback to be called too soon when performing programmatic scrolling.
  • A bug that would cause some gesture recognizers to be retained for components that have been removed from a view controller.
  • A memory leak that could leave certain components retained even after they were removed from a view controller.
  • A crash that could occur if a view model was rapidly reloaded while a view controller was busy rendering.
  • Components conforming to HUBComponentContentOffsetObserver no longer get called multiple times for the same content offset.
  • HUBComponentFallbackHandler is now nicer to use in Swift, thanks to fixed nullability annotations.
  • Header components are now placed using proper margin instead of content insets, to play nicer with external systems that might rely on content insets.
  • Removed warnings for Xcode 8.1.
  • hublive now restores the original text color in your terminal after printing an error. Thanks to @mpluders for fixing this!
  • A number casting issue that prevented the framework to be compiled for 32 bit platforms without overriding some build settings.

2.0.6

7 years ago

Added

  • Pagination support! Simply make your content operation conform to HUBContentOperationWithPaginatedContent and get pagination/infinite scrolling for free.
  • HUBComponentModelBuilder: All child component model builders can now be retrieved using buildersForChildrenInGroupWithIdentifier.
  • Programmatic scrolling now support nested components (using the HUBComponentWithScrolling protocol).
  • customData may now be specified when a child component is selected.
  • HUBViewModelLoader now has a isLoading property.
  • HUBViewControllerDelegate has a new viewControllerShouldStartScrolling API that lets you conditionally enable/disable scrolling.
  • HUBViewModelBuilder now has a convenience API for setting custom data values: setCustomDataValue:forKey:.

Removed

  • HUBViewModel's extensionURL property has been removed in favor of the new HUBContentOperationWithPaginatedContent API.
  • HUBViewController no longer calls its scroll handler when the view was scrolled programmatically.

Fixed

  • A bug that could cause header and overlay components to flash when the view was reloaded.
  • A bug that would cause the background color of header & overlay components to be overriden when the background color of the view controller was set.
  • A bug that could cause the view to end up having incorrect content insets.
  • A bug that would cause header & overlay components to be re-configured although they were serving the same model.
  • A bug that could cause invalid visable components to be returned by HUBViewController, when components were being reused.
  • A crash that could occur if a HUBViewController was laid out while the app was backgrounded.
  • HUBViewController now notifies its delegate when header & overlay components appear, just like it does with body components.
  • Custom gesture recognizers can now be used on child components.
  • Unwanted warnings are now also suppressed on Xcode 8.1 (thanks @aliak00!) + Xcode 8.2.
  • HUBViewController is now exposed a concrete class, making all of its APIs usable from Swift.

2.0.5

7 years ago

Added

  • Live editing! You can now easily prototype new UIs using a local JSON file. See the live editing guide for more info.
  • Components can now observe actions (using the HUBComponentActionObserver protocol).
  • HUBViewController now has a isViewScrolling property.
  • You can now cancel any ongoing highligh/selection in a HUBViewController programmatically using cancelComponentSelection.

Removed

  • HUBContentOperationActionObserver's observation method no longer has a viewURI parameter (since it is included in HUBActionContext).

Fixed

  • A bug in the diffing algorithm that could generate invalid indexes under some circumstances.
  • Component hit testing when performed after the view has been scrolled.
  • Comparing two HUBComponentModel instances for equality is now slightly more efficient.
  • Objective-C block safety in some places (thanks @tammofreese!).
  • HUBViewController's delegate called before header & overlay components were setup.
  • A race condition that could cause all components to be misaligned during the first launch of the app.

2.0.4

7 years ago

Added

  • HUBComponentWithSelectionState, that enables non- table & collection view cell components to respond to user interactions and render a selection state.
  • HUBContentOperationActionPerformer, that enables content operations to perform actions.
  • Actions can now be asynchronous and chained, by conforming to HUBAsyncAction.
  • Demo app now has a "Todo list" feature that demonstrates the new revamped action API.

Changed

  • HUBViewController. visibleBodyComponentViews now returns all visible components (both root & children), keyed on their index path.
  • HUBComponentActionDelegate is now HUBActionPerformer.
  • HUBComponentActionPerformer.actionDelegate is now .actionPerformer.

Swift API:

  • HUBComponentModelBuilder.forChildWithIdentifier("id") is now .builderForChild(withIdentifier: "id").
  • HUBComponentModelBuilder.removeForChild(withIdentifier: "id") is now .removeBuilderForChild(withIdentifier: "id").

Fixed

  • Component programming guide link to HUBComponentModel (thanks @joanromano!)
  • Using custom gesture recognizers on component views.
  • Danger warning when tests didn't run (thanks @Antondomashnev!)
  • HUBImageLoader implementations now don't have to track download durations manually.
  • HUBDefaultImageLoader now doesn't do a manual cache lookup.
  • Unit test code completion in Xcode.
  • HUBViewController will now send a component's UIView as part of its delegate methods, instead of sending the HUBComponentCollectionViewCell that wraps it.
  • Crash that could occur when very rapid content operation updates were performed, due to a batch update inconsistency.

2.0.3

7 years ago

Changed

  • Improve getting started guide.

Fixed

  • Nesting touchable views inside a UI(Table|Collection)ViewCell.
  • Incorrect order of compoenents when mixing components with and without preferred index.
  • Framework file being included in the test target.
  • CocoaPods spec pointing to the wrong directory for sources.

2.0.2

7 years ago

Added

  • UINavigationItem support. Set it on HUBViewModelBuilder, and the framework will assign it to the associated UIViewController.
  • Convenience API to create view controllers without having to register a feature first.
  • HUBBlockContentOperationFactory, a concrete content operation factory implementation that uses a block to create operations. Useful when a custom factory is not needed.
  • Components conforming to HUBComponentContentOffsetObserver are now notified when they appear on the screen.
  • Child components can now use HUBComponentContentOffsetObserver as well.

Removed

  • HUBViewModel.title removed in favor of HUBViewModel.navigationItem.title.

Fixed

  • Documentation issues (thanks @jerball, @vijaytholpadi & @hewigovens!)
  • UI state management for components that were just created.
  • View controller content offset calculation after updates.
  • Potential crash & bug when performing partial updates of a view.

2.0.1

7 years ago

Added

  • HUBManager convenience initializer.

Fixed

  • Compiling for device.
  • Documentation issues (thanks @eliperkins!)
  • Invalid Demo App library search paths (thanks @keitaito!)

2.0.0

7 years ago

The first open source release of the Hub Framework ?