This repository was archived by the owner on Jan 17, 2019. It is now read-only.
Releases: spotify/HubFramework
Releases · spotify/HubFramework
Hub Framework 2.0.9
Added
- A new diffing algorithm that performs a lot better when modifying a view model that has a large number of components.
HUBViewControllerScrollHandlercan now decide which keyboard dismiss mode that the view should use.HUBActionContextnow carriesHUBFeatureInfo, that can be used to make decisions in an action or action handler.HUBViewControllerDelegatecan 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:) throwsandaddJSON(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.
Hub Framework 2.0.8
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.
HUBViewControllernow exposes itsviewURIas a public property.
Fixed
- A crash that could occur because of a race condition during rapid view model updates.
Hub Framework 2.0.7
Added
HUBManagernow 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.
HUBViewControllernow has areloadAPI, that reloads its content (regardless of any reload policy). Thanks to @zhubofei for implementing this!- A
HUBViewControllerdelegate now gets notified whenever a component was reused. - You can now assign
customDatato 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
HUBComponentContentOffsetObserverno longer get called multiple times for the same content offset. HUBComponentFallbackHandleris 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.
hublivenow 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.
Hub Framework 2.0.6
Added
- Pagination support! Simply make your content operation conform to
HUBContentOperationWithPaginatedContentand get pagination/infinite scrolling for free. HUBComponentModelBuilder: All child component model builders can now be retrieved usingbuildersForChildrenInGroupWithIdentifier.- Programmatic scrolling now support nested components (using the
HUBComponentWithScrollingprotocol). customDatamay now be specified when a child component is selected.HUBViewModelLoadernow has aisLoadingproperty.HUBViewControllerDelegatehas a newviewControllerShouldStartScrollingAPI that lets you conditionally enable/disable scrolling.HUBViewModelBuildernow has a convenience API for setting custom data values:setCustomDataValue:forKey:.
Removed
HUBViewModel'sextensionURLproperty has been removed in favor of the newHUBContentOperationWithPaginatedContentAPI.HUBViewControllerno 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
HUBViewControllerwas laid out while the app was backgrounded. HUBViewControllernow 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.
HUBViewControlleris now exposed a concrete class, making all of its APIs usable from Swift.
Hub Framework 2.0.5
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
HUBComponentActionObserverprotocol). HUBViewControllernow has aisViewScrollingproperty.- You can now cancel any ongoing highligh/selection in a
HUBViewControllerprogrammatically usingcancelComponentSelection.
Removed
HUBContentOperationActionObserver's observation method no longer has aviewURIparameter (since it is included inHUBActionContext).
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
HUBComponentModelinstances 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.
Hub Framework 2.0.4
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. visibleBodyComponentViewsnow returns all visible components (both root & children), keyed on their index path.HUBComponentActionDelegateis nowHUBActionPerformer.HUBComponentActionPerformer.actionDelegateis 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!)
HUBImageLoaderimplementations now don't have to track download durations manually.HUBDefaultImageLoadernow doesn't do a manual cache lookup.- Unit test code completion in Xcode.
HUBViewControllerwill now send a component'sUIViewas part of its delegate methods, instead of sending theHUBComponentCollectionViewCellthat wraps it.- Crash that could occur when very rapid content operation updates were performed, due to a batch update inconsistency.
Hub Framework 2.0.3
Changed
Fixed
- Nesting touchable views inside a
UI(Table|Collection)ViewCell.- Fix by John Sundell in pull request #68.
- Incorrect order of compoenents when mixing components with and without preferred index.
- Fix by @mvlasieva in pull request #71.
- Framework file being included in the test target.
- Fix by John Sundell in pull request #72.
- CocoaPods spec pointing to the wrong directory for sources.
Hub Framework 2.0.2
Added
UINavigationItemsupport. Set it onHUBViewModelBuilder, and the framework will assign it to the associatedUIViewController.- 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
HUBComponentContentOffsetObserverare now notified when they appear on the screen. - Child components can now use
HUBComponentContentOffsetObserveras well.
Removed
HUBViewModel.titleremoved in favor ofHUBViewModel.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.
Hub Framework 2.0.1
Added
HUBManagerconvenience initializer.
Fixed
- Compiling for device.
- Documentation issues (thanks @eliperkins!)
- Invalid Demo App library search paths (thanks @keitaito!)
Hub Framework 2.0.0
The first open source release of the Hub Framework 🎉