Releases: airbnb/epoxy-ios
Releases · airbnb/epoxy-ios
0.11.0
Added
- Expose
forceLayoutinEpoxySwiftUIHostingViewfor updating the hosting view size from outside. - Added
CollectionViewConfiguration.usesSafeAreaLayoutGuideLeadingTrailingAnchorsto respect leading/trailing layoutGuide anchors which are needed for landscape orientation. Defaults tofalseand uses the view'sleadingAnchorandtrailingAnchor. Whentrueit will use the view'ssafeAreaLayoutGuideleadingAnchorandtrailingAnchor.
Changed
AnyItemModelnow implements theErasedContentProvidingprotocol.- Updated
ErasedContentProvidingprotocol to use its type name instead ofSelfin the keys of itsEpoxyModelPropertypropertiescontentPropertyandisContentEqualProperty.
Fixed
- Fixed an issue causing incorrect view callbacks and a corresponding assertion when a view
disappears during a collection view update and is only in the post-update data. - Removed non-functioning
accessibilityDelegateand associated code. - Fixed a possible index out of bounds assertion when accessing
visibilityMetadataduring a
batch update. - Added caching for
visibilityMetadatacalculations. - Fixed an issue that could cause SwiftUI views to be incorrectly sized in a collection view.
- Added
forcesEarlySwiftUIRenderingflag toCollectionViewConfigurationto test a SwiftUI layout
approach to resolve an issue that could cause collection view cells to layout with
unexpected dimensions - Made new layout-based SwiftUI cell rendering option the default.
- Fixed interaction of SwiftUI bars on visionOS
- Added flag for forcing layout on a hosted SwiftUI view after layout margins change
- Updated
EpoxySwiftUIHostingControllerwith a flag to disable its keyboard avoidance behavior
0.10.0
Changed
- Dropped support for Swift 5.4.
- EpoxyCore now supports macOS and tvOS.
- Renamed EpoxyCore's
SwiftUIUIViewtoSwiftUIView. - Renamed EpoxyCore's
MeasuringUIViewRepresentabletoMeasuringViewRepresentable. - Added
UIScrollView.keyboardAdjustsBottomBarOffsetescape hatch to disable bottom bar keyboard
avoidance for cases where the keyboard is avoided at a higher level (e.g. a
UIPresentationControllersubclass). - Added
configuredView(traitCollection:)API toSupplementaryItemModeling. - Changed
NavigationModel'sremove()method access modifier to public (previously internal). - Changed
NavigationModel'shandleDidRemove()method access modifier to public (previously
internal).
Fixed
- For top and bottom bars, if any view in the hierarchy has a scale transform, wait to apply the
insets as they may be incorrect. - Pass initial size to embedded view from
CollectionViewCell/CollectionViewReusableViewto
better load embedded SwiftUI views. - Guard against a UIKit crash caused by attempting to scroll to an item that no longer exists.
0.9.0
Changed
- Remove all of the
EpoxyableViewflavors ofMeasuringUIViewRepresentablein favor of a
single sharedSwiftUIUIViewthat supports a genericStorage, which has the added benefit of
fixing some Xcode preview crashes.
Fixed
- Improved double layout pass heuristics for views that have intrinsic size dimensions below 1 or
for views that have double layout pass subviews that aren't horizontally constrained to the edges. - Fixed
HGroupItemandVGroupItemnot respecting some properties of the style that is passed in. - Improved sizing of intrinsically sized
UIViews in SwiftUI with no intrinsic metric size proposals. - Add extra logic for mitigating proposed sizes that match previous intrinsic size for hosted
UIViews in SwiftUI.
0.8.0
Added
- Added
SwiftUIMeasurementContainerfor calculating the ideal height of aUIViewfor wrapping
for SwiftUI usage. - Added
MeasuringUIViewRepresentableas a convenience API for measuring aUIViewwithin a
UIViewRepresentableusing an enclosingSwiftUIMeasurementContainer. - Added a method to
CollectionViewReorderingDelegateto check the reordering destination is
expected. - Added the ability to pass a
CollectionViewConfigurationto theCollectionViewController
initializers. - Added additional sizing behaviors to
SwiftUIMeasurementContainerfor sizingUIViews hosted in
a SwiftUIView. - Added a static
swiftUIView(…)method toUIViewfor hosting UIKit views that aren't
EpoxyableViews while still leveraging the layout helpers. - Added support for calling
configure { _ in }on the SwiftUIViewresulting from a
swiftUIView(…)invocation to perform additional configuration of theUIViewinstance. - Added
LayoutGroupUpdateAnimationfor customizingGroupanimated updates. - Added support for
WillDisplaycallbacks to be added to type-erasedAnyBarModeltypes.
Fixed
- Fixed sizing of reused
EpoxySwiftUIHostingControllers on iOS 15.2+. - Fixed crash in
ScrollToItemHelpercaused bypreferredFrameRateRangeson devices running iOS
15.0 (this issue is not present in devices on 15.1+) - Fixed an ambiguous layout issue when using
LayoutSpacerwithout afixedWidthorfixedHeight. - Gracefully support cases where a
SwiftUIMeasurementContainerwith anintrinsicSize
SwiftUIMeasurementContainerStrategyhas an intrinsic size that exceeds the proposed size by
compressing rather than overflowing, which could result in broken layouts. - Fixed intrinsic size invalidation triggered by a SwiftUI view from within a collection view
cell by invalidating the enclosing collection view layout. - Fixed an issue where
EpoxyLogger.shared.assertionFailureandEpoxyLogger.shared.assertwould
unexpectedly crash in release builds.
Changed
- Updated name of
SpacertoLayoutSpacerto avoid name conflict with SwiftUI'sSpacer - Updated to have Swift 5.4 as the minimum supported Swift version (previously Swift 5.3).
- Updated
HGroupViewandVGroupViewto haveinsetsLayoutMarginsFromSafeArea = falseby default - Gated an old autoresizing-mask-related bug workaround to only run on iOS versions 13 and below
- The
swiftUIView(…)methods now default to an automatic sizing behavior that makes a best effort
at sizing the view based on heuristics, rather than defaulting to intrinsic height and proposed
width.
0.7.0
Added
- Added a weak reference from
TopBarContainer/BottomBarContainerto their parent bar installer - Added a
BarInstallerConfigurationtype to allow both global and per-instance configuration of
bar installers. - Added an
applyBarsclosure toBarInstallerConfigurationto allow consumers to configure when
bars are applied to the underlyingBarContainerby a bar installer, e.g. to defer bar model
updates that might conflict with an in-flight shared element transition. - Support for hitting 120 FPS on iPhone ProMotion displays when programmatically scrolling to an
item in a collection view. - Added
itemModel(…),barModel(…)methods to host a SwiftUIViewwithin an Epoxy container and
theswiftUIView(…)method to host anEpoxyableViewwithin a SwiftUIView - Added a SwiftUI environment value for requesting size invalidation of the containing Epoxy collection view cell.
Fixed
- Fixes an issue that could cause
CollectionViewscroll animation frames to have an incorrect
content offset when paired with a non-zeroadjustedContentInset. - Fixes an issue that could cause
VGroupViewandHGroupViewto grow too tall when nested in
containers that give them a larger height than their natural height. - Fixes a bug in the
KeyboardPositionWatcherthat would consider an even slightly offscreen view
as having a keyboard overlap when the keyboard is dismissed, resulting in incorrect keyboard
offsets. - Fixes an issue when mutating state synchronously does not pick up the current SwiftUI transaction.
- Fixes a bug where the
avoidsKeyboardparameter would be disregarded in aBottomBarInstaller
initializer.
Changed
- Removed the default bar installer behavior where bar model updates were deferred while a view
controller transition is in progress.
0.6.0
Added
- Added an
insetMarginsproperty toTopBarContainerandBottomBarContainerthat configures whether or not the container sets layout margins derived from thesafeAreaInsetsof itsviewController.
Fixed
- Fixed incorrect assertion logging when accessing an item with an invalid index path.
- Mitigated a
EXC_BAD_ACCESScrash that caused by a badnonnullbridge inCollectionViewCell. - Fixed an issue where styles were not being used in the
diffIdentifiercalculation ofGroupItems.
Changed
- The
SectionModelinitializer now requires adataIDto make it harder to have sections with duplicate identity that causes a runtime warning and potentially unexpected diffing behavior.
0.5.0
Added
- Added an
UpdateStrategytoCollectionViewto allow specifying that it should update using non-
animatedperformBatchUpdates(…), which can be more performant and behave more predictably than
reloadData(). - Added
reflowsForAccessibilityTypeSizesandforceVerticalAccessibilityLayoutproperties toHGroup.Style.
Fixed
- Improved
CollectionViewlogic for deciding when toreloadData(…)overperformBatchUpdates(…)
in specific scenarios. - Fixed an issue where the
accessibilityAlignmentproperty ofHGroupwas not being respected. - Fixed an issue where
accessibilityAlignmentandhorizontalAlignmentwould overwrite one another - Break a temporary retain cycle in
.systempresentation style
Changed
CollectionViewConfiguration.usesBatchUpdatesForAllReloadsnow defaults totrue.- Changed
CollectionViewConfigurationfrom an immutableclassto astructto make it easier to
modify an existing configuration.
0.4.0
0.3.0
Added
- Added support for
ArrayandOptionalexpressions to model result builders - Added support for
Optionalexpressions toPresentationModelresult builders - Made
AnyItemModelandAnySupplementaryItemModelconform toDidChangeStateProviding,
DidChangeStateProvidingandSetBehaviorsProviding - Made
AnyItemModel,AnySupplementaryItemModel, andAnyBarModelconform toStyleIDProviding - Adds a
keyboardContentInsetAdjustmentproperty toUIScrollViewwith the amount that the that itscontentInset.bottomhas been adjusted to accommodate for the keyboard by aKeyboardPositionWatcher - Made
ItemSelectionStyleconform toHashable ReuseIDStorehas a new method to vend a previously registered reuse ID,registeredReuseID(for:)
Fixed
- Bar installers gracefully handle redundant calls to install/uninstall
CollectionViewmore gracefully handles styleID mutations after registration
Changed
ReuseIDStore.registerReuseID(for:)has been renamed toReuseIDStore.reuseID(byRegistering:)
0.2.0
Added
- Added result builders for
SectionModel,ItemModel,BarModel,PresentationModel, and
NavigationModel - Added initializers and methods to
CollectionViewControllerthat take an array ofItemModels
and transparently wrap them in aSectionModelfor consumers.
Changed
- Updated public let properties of public structs with memberwise initializers to be public var
BarStackViewnow handles selection of bar models and can be used as anEpoxyableView- The cases of
BarStackView.ZOrderhave been renamed to be more semantically accurate - Enables
CollectionViewprefetching by default, as the issues preventing it from being enabled by
default are now resolved in recent iOS versions - Support animated moves in
BarStackView - Fixed ordering when inserting and removing bar models
- Crossfade between bars of the same view type with different style IDs in
BarStackView