Releases: airbnb/epoxy-ios
Releases · airbnb/epoxy-ios
0.10.0
Changed
- Dropped support for Swift 5.4.
- EpoxyCore now supports macOS and tvOS.
- Renamed EpoxyCore's
SwiftUIUIView
toSwiftUIView
. - Renamed EpoxyCore's
MeasuringUIViewRepresentable
toMeasuringViewRepresentable
. - Added
UIScrollView.keyboardAdjustsBottomBarOffset
escape hatch to disable bottom bar keyboard
avoidance for cases where the keyboard is avoided at a higher level (e.g. a
UIPresentationController
subclass). - 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
/CollectionViewReusableView
to
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
EpoxyableView
flavors ofMeasuringUIViewRepresentable
in favor of a
single sharedSwiftUIUIView
that 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
HGroupItem
andVGroupItem
not respecting some properties of the style that is passed in. - Improved sizing of intrinsically sized
UIView
s in SwiftUI with no intrinsic metric size proposals. - Add extra logic for mitigating proposed sizes that match previous intrinsic size for hosted
UIView
s in SwiftUI.
0.8.0
Added
- Added
SwiftUIMeasurementContainer
for calculating the ideal height of aUIView
for wrapping
for SwiftUI usage. - Added
MeasuringUIViewRepresentable
as a convenience API for measuring aUIView
within a
UIViewRepresentable
using an enclosingSwiftUIMeasurementContainer
. - Added a method to
CollectionViewReorderingDelegate
to check the reordering destination is
expected. - Added the ability to pass a
CollectionViewConfiguration
to theCollectionViewController
initializers. - Added additional sizing behaviors to
SwiftUIMeasurementContainer
for sizingUIView
s hosted in
a SwiftUIView
. - Added a static
swiftUIView(…)
method toUIView
for hosting UIKit views that aren't
EpoxyableView
s while still leveraging the layout helpers. - Added support for calling
configure { _ in }
on the SwiftUIView
resulting from a
swiftUIView(…)
invocation to perform additional configuration of theUIView
instance. - Added
LayoutGroupUpdateAnimation
for customizingGroup
animated updates. - Added support for
WillDisplay
callbacks to be added to type-erasedAnyBarModel
types.
Fixed
- Fixed sizing of reused
EpoxySwiftUIHostingController
s on iOS 15.2+. - Fixed crash in
ScrollToItemHelper
caused bypreferredFrameRateRanges
on devices running iOS
15.0 (this issue is not present in devices on 15.1+) - Fixed an ambiguous layout issue when using
LayoutSpacer
without afixedWidth
orfixedHeight
. - Gracefully support cases where a
SwiftUIMeasurementContainer
with anintrinsicSize
SwiftUIMeasurementContainerStrategy
has 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.assertionFailure
andEpoxyLogger.shared.assert
would
unexpectedly crash in release builds.
Changed
- Updated name of
Spacer
toLayoutSpacer
to avoid name conflict with SwiftUI'sSpacer
- Updated to have Swift 5.4 as the minimum supported Swift version (previously Swift 5.3).
- Updated
HGroupView
andVGroupView
to haveinsetsLayoutMarginsFromSafeArea = false
by 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
/BottomBarContainer
to their parent bar installer - Added a
BarInstallerConfiguration
type to allow both global and per-instance configuration of
bar installers. - Added an
applyBars
closure toBarInstallerConfiguration
to allow consumers to configure when
bars are applied to the underlyingBarContainer
by 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 SwiftUIView
within an Epoxy container and
theswiftUIView(…)
method to host anEpoxyableView
within 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
CollectionView
scroll animation frames to have an incorrect
content offset when paired with a non-zeroadjustedContentInset
. - Fixes an issue that could cause
VGroupView
andHGroupView
to grow too tall when nested in
containers that give them a larger height than their natural height. - Fixes a bug in the
KeyboardPositionWatcher
that 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
avoidsKeyboard
parameter 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
insetMargins
property toTopBarContainer
andBottomBarContainer
that configures whether or not the container sets layout margins derived from thesafeAreaInsets
of itsviewController
.
Fixed
- Fixed incorrect assertion logging when accessing an item with an invalid index path.
- Mitigated a
EXC_BAD_ACCESS
crash that caused by a badnonnull
bridge inCollectionViewCell
. - Fixed an issue where styles were not being used in the
diffIdentifier
calculation ofGroupItems
.
Changed
- The
SectionModel
initializer now requires adataID
to 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
UpdateStrategy
toCollectionView
to allow specifying that it should update using non-
animatedperformBatchUpdates(…)
, which can be more performant and behave more predictably than
reloadData()
. - Added
reflowsForAccessibilityTypeSizes
andforceVerticalAccessibilityLayout
properties toHGroup.Style
.
Fixed
- Improved
CollectionView
logic for deciding when toreloadData(…)
overperformBatchUpdates(…)
in specific scenarios. - Fixed an issue where the
accessibilityAlignment
property ofHGroup
was not being respected. - Fixed an issue where
accessibilityAlignment
andhorizontalAlignment
would overwrite one another - Break a temporary retain cycle in
.system
presentation style
Changed
CollectionViewConfiguration.usesBatchUpdatesForAllReloads
now defaults totrue
.- Changed
CollectionViewConfiguration
from an immutableclass
to astruct
to make it easier to
modify an existing configuration.
0.4.0
0.3.0
Added
- Added support for
Array
andOptional
expressions to model result builders - Added support for
Optional
expressions toPresentationModel
result builders - Made
AnyItemModel
andAnySupplementaryItemModel
conform toDidChangeStateProviding
,
DidChangeStateProviding
andSetBehaviorsProviding
- Made
AnyItemModel
,AnySupplementaryItemModel
, andAnyBarModel
conform toStyleIDProviding
- Adds a
keyboardContentInsetAdjustment
property toUIScrollView
with the amount that the that itscontentInset.bottom
has been adjusted to accommodate for the keyboard by aKeyboardPositionWatcher
- Made
ItemSelectionStyle
conform toHashable
ReuseIDStore
has a new method to vend a previously registered reuse ID,registeredReuseID(for:)
Fixed
- Bar installers gracefully handle redundant calls to install/uninstall
CollectionView
more 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
CollectionViewController
that take an array ofItemModel
s
and transparently wrap them in aSectionModel
for consumers.
Changed
- Updated public let properties of public structs with memberwise initializers to be public var
BarStackView
now handles selection of bar models and can be used as anEpoxyableView
- The cases of
BarStackView.ZOrder
have been renamed to be more semantically accurate - Enables
CollectionView
prefetching 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