Skip to content

Latest commit

 

History

History
546 lines (335 loc) · 21.7 KB

CHANGELOG.md

File metadata and controls

546 lines (335 loc) · 21.7 KB

FlexLayout and PinLayout Performance

FlexLayout

Change Log

Upgrade yoga to v3.1.0

Added by OhKanghoon in Pull Request #255

Support align-content: space-evenly

Added by OhKanghoon in Pull Request #255

Add static position feature

Add feature for the static position supported in Yoga version 3.0.0.

  • Due to the default behavior of Yoga, insets like top, left, bottom, and right also affect relative position view. Accordingly, the README, docs and comments have been updated to match the Yoga specifications.
  • Added static case to position and unit tests.

https://www.yogalayout.dev/docs/styling/position https://www.yogalayout.dev/docs/styling/insets

Added by heoblitz in Pull Request #245

Update yoga to version 3.0.4

Added by heoblitz in Pull Request #245

Remove FlexLayoutYoga duplicate dependency in Swift Package

Added by OhKanghoon in Pull Request #245

Fix error that occur when creating XCFramework

Background

  • Public header issue occurs when using Objective-C package in Tuist's Dependency. To resolve this issue, I want to provide xcframework.
  • Resolve the issue that occurs when creating xcframework due to duplicate 'postfix operator %'.

Contents

  • remove unnecessary files and headers
    • Modified to manage yoga directly in FlexLayout. Buck dependency is now unnecessary.
  • remove duplicated postfix operator
  • update Podfile.lock
  • remove Info.plist
  • move FlexLayout.h to public header directory

Added by OhKanghoon in Pull Request #244

Released on 2024-01-11

1) Add Gap support

Add Gap methods:

  • columnGap(_ value: CGFloat) -> Flex
  • rowGap(_ value: CGFloat) -> Flex
  • gap(_ value: CGFloat) -> Flex
background

After Yoga layout updated to 2.0.0 the gap func added. and as needed by this issue and my company's product, me and my partner @TaekH made feature to use. 🙇‍♂️

Added by Buseong Kim in Pull Request #241

2) Fix "Child already has a owner" Assert

Upgrading to the latest version of Yoga introduced an assert in YGNodeInsertChild() that was previously removed accidentally (see relevant commit). This assert will throw an error if the node we are trying to add already has an owner. Unfortunately, we can fall into this case quite easily if we move a view between different superviews (as demonstrated in the following contrived example).

Restoring the changes from this old commit c303faa should ensure that any lingering parent references are cleaned up before we call YGNodeInsertChild()

Added by kennethpu in Pull Request #242

Released on 2024-01-06

Enhance Swift Package experience

  • Change the Swift Package Manager to be available without FLEXLAYOUT_SWIFT_PACKAGE flag
  • add public header path
  • remove FLEXLAYOUT_SWIFT_PACKAGE
  • remove library for internal (FlexLayoutYoga, FlexLayoutYogaKit)
  • move the unit test to the swift package with XCTest

Added by OhKanghoon in Pull Request #232

Split the Example project in 2 projects (Cocoapods & SPM)

Split the Example project in 2 projects:

  • FlexLayoutSample: Use cocoapods dependency manager
  • FlexLayoutSample-SPM: Use SPM (Swift Packager Manager) dependency manager

Added by Luc Dion in Pull Request #240

Released on 2023-10-15

Fix crashes that occurs when the node's topLeft position is nan

Added by OhKanghoon in Pull Request #230

Released on 2023-10-01

Update Yoga core to 2.0

FlexLayout version has been increased to reflect the new Yoga core version.

Added by OhKanghoon in Pull Request #230

Released on 2023-06-24

Resolve lldb debug issue when using CocoaPods

Background

  • Since #219 was merged, LLDB problems have occurred in environments where CocoaPods and SPM are used together.
  • This reverts commit f36c766865df29ac70f31b604dde54c5a975819c. (#219)

Changes

  • Revert f36c766865df29ac70f31b604dde54c5a975819c commit to resolve
  • The existing problem is solved by writing each package.swift like the code below
// in Package.swift
.target(
  name: "SomeTarget",
  dependencies: [
    "FlexLayout",
  ],
  cSettings: [
    .define("FLEXLAYOUT_SWIFT_PACKAGE"),
  ],
  cxxSettings: [
    .define("FLEXLAYOUT_SWIFT_PACKAGE"),
  ],
  swiftSettings: [
    .define("FLEXLAYOUT_SWIFT_PACKAGE"),
  ]
)

Added by OhKanghoon in Pull Request #226

Released on 2023-05-10

Fixes an issue where YGApplyLayoutToViewHierarchy assigns a value to frame.size that does not rounded to the pixel grid

Added by Dongkyu Kim in Pull Request #225

Released on 2023-04-12

Fix for Swift 5.8

Added by Rachik Abidi in Pull Request #223

Released on 2023-02-28

Fixes issue while including FlexLayout as a dependency of another Swift Package

Fixes issue #219 where including FlexLayout as a dependency of another swift package would fail to build - because it isn't possible to set the preprocessor definition FLEXLAYOUT_SWIFT_PACKAGE without an Xcode project.

Added by Luke Wakeford in Pull Request #221

Released on 2023-02-28

Add border(_ width: CGFloat, _ color: UIColor)

Added by gyuchan in Pull Request #216

Released on 2023-02-25

Add Flex.direction property

Added by gyuchan in Pull Request #213

Released on 2023-01-20

Round pixel values of intrinsicSize with YGRoundPixelValue

Added by Dongkyu Kim in Pull Request #210

Released on 2023-01-20

Fixed crash with nan dimensions

Added by iohin in Pull Request #211

Released on 2022-12-23

Add flex.cornerRadius(_ value: CGFloat) function

Added by minhaaan in Pull Request #209

Released on 2022-04-08

Change the access control of margin padding functions

Added by OhKanghoon in Pull Request #199

Released on 2021-11-22

Percent padding support.

New methods:

  • paddingTop(_ percent: FPercent)**
  • paddingLeft(_ percent: FPercent)**
  • paddingBottom(_ percent: FPercent)**
  • paddingRight(_ percent: FPercent)**
  • paddingStart(_ percent: FPercent)**
  • paddingEnd(_ percent: FPercent)**
  • paddingHorizontal(_ percent: FPercent)**
  • paddingVertical(_ percent: FPercent)**

Added by albertocs-noma in Pull Request #159

Released on 2021-10-25

Released on 2020-05-29

Add baseline item support. Note that for now baseline support is only for the first baseline.

Added by Michael Ong in Pull Request #159

Released on 2020-05-01

Adds Swift Package Manager Support

Added by gcox in Pull Request #150

Released on 2019-10-090

Add new methods to position items in absolute positionning (https://github.com/layoutBox/FlexLayout#4-absolute-positioning):

  • vertically(: CGFloat) / vertically(: FPercent):
    Controls the distance child’s top and bottom edges from the parent’s edges. Equal to top().bottom().
  • horizontally(: CGFloat) / horizontally(: FPercent):
    Controls the distance child’s left and right edges from the parent’s edges. Equal to left().right().
  • all(: CGFloat) / all(: FPercent):
    Controls the distance child’s edges from the parent’s edges. Equal to top().bottom().left().right().

Added by Kuluum in Pull Request #146

Released on 2019-08-03

  • Delegate isIncludedInLayout to yoga vs using default value:
    Previously the value of isIncludedInLayout may have not reflect what the underlying yoga value is as the developer may have manipulated the yoga value directly. This could potentially leave the Flex initial value out of sync. This change defers the get/set of this property to yoga.

Released on 2019-06-07

  • Fix public extension warning
  • Update to Swift 4.2
  • Update cocoapods to 1.7

Released on 2019-05-17

Add method:

  • basis(_ : FPercent): This method is similar to basis(_ : CGFloat?) but takes a percentage parameter.

  • Added by Andreas Mattsson in Pull Request #128

Released on 2018-08-09

Fix top padding in method padding(_ top: CGFloat, _ left: CGFloat, _ bottom: CGFloat, _ right: CGFloat).

Released on 2018-07-24

Add cocoapods c++ library dependency to the podspec file. Required to avoid possible linking errors.

Released on 2018-05-31

Removed alignItems .baseline mode which is not currently supported by Yoga. So we remove it from the list of supported mode until Yoga support it.

Released on 2018-05-09

Add display(:Display) method to set the Yoga's display property.

Released on 2018-05-01

Upgrade to Swift 4.1

Released on 2018-04-16

Update the Podspec minimum iOS platform to 8.0

Released on 2018-03-06

Add supports for spaceEvenly justifyContent mode

Flex view's getter is public once again.

Released on 2018-03-05

Fix retain cycle

  • Now Flex's hosting view is kept using a weak reference.
  • Fixed by Alexey Zinchenko in Pull Request #64

Released on 2018-02-28

Fix Yoga's rounding issues

  • Integer truncation of sizes calculated by sizeThatFits:, and utility functions. Introduced by Obj-C -> Obj-C++ conversion in previous PR
  • Low coordinate rounding threshold, which results in flooring apparently valid values. Layout becomes very wrong with absolute coordinate values larger than 100 and having pointScaleFactor set to 3.
  • Fixed by Alexey Zinchenko in Pull Request #63

Released on 2018-02-27

Update Yoga core to latest master

  • Yoga core updated to facebook/yoga@295d111
  • Yoga core tests and their buck configuration added, see core-tests folder
  • Add buck tests to CI config
  • Added by Alexey Zinchenko in Pull Request #62

Released on 2018-02-23

Integrates Yoga's sources into FlexLayout

Released on 2017-12-20

Add margins methods taking percentage parameters:

  • marginTop(_ percent: FPercent)
    Top margin specify the offset the top edge of the item should have from it’s closest sibling (item) or parent (container).

  • marginLeft(_ percent: FPercent)
    Left margin specify the offset the left edge of the item should have from it’s closest sibling (item) or parent (container).

  • marginBottom(_ percent: FPercent)
    Bottom margin specify the offset the bottom edge of the item should have from it’s closest sibling (item) or parent (container)

  • marginRight(_ percent: FPercent)
    Right margin specify the offset the right edge of the item should have from it’s closest sibling (item) or parent (container).

  • marginStart(_ percent: FPercent)
    Set the start margin. In LTR direction, start margin specify the left margin. In RTL direction, start margin specify the right margin.

  • marginEnd(_ percent: FPercent)
    Set the end margin. In LTR direction, end margin specify the right margin. In RTL direction, end margin specify the left margin.

  • marginHorizontal(_ percent: FPercent)
    Set the left, right, start and end margins to the specified value.

  • marginVertical(_ percent: FPercent)
    Set the top and bottom margins to the specified value.

    Usage examples:
       view.flex.margin(20%)
       view.flex.marginTop(20%).marginLeft(20%)
       view.flex.marginHorizontal(10%)

Released on 2017-11-23

Update Carthage support

Released on 2017-11-23

Many properties can be reset to their initial state. Specifying nil when calling these properties reset their value:

  • width(nil)
  • height(nil)
  • size(nil)
  • minWidth(nil)
  • maxWidth(nil)
  • minHeight(nil)
  • maxHeight(nil)
  • aspectRatio(nil)

FlexLayout now integrates YogaKit source code, this was needed to improve efficiently the iOS's yoga interface.

Released on 2017-11-23

AspectRatio can now be reset. Simply call aspectRatio(nil).

Released on 2017-10-31

Add new margin methods:

  • margin(_ insets: UIEdgeInsets): Set all margins using UIEdgeInsets. This method is particularly useful to set all margins using iOS 11 UIView.safeAreaInsets
  • margin(_ directionalInsets: NSDirectionalEdgeInsets): Set margins using NSDirectionalEdgeInsets. This method is particularly to set all margins using iOS 11 UIView.directionalLayoutMargins

Add new padding methods:

  • padding(_ insets: UIEdgeInsets): Set all paddings using UIEdgeInsets. This method is particularly useful using iOS 11 UIView.safeAreaInsets

  • padding(_ directionalInsets: NSDirectionalEdgeInsets): Set paddings using NSDirectionalEdgeInsets. This method is particularly useful to set all paddings using iOS 11 UIView.directionalLayoutMargins

  • Update all examples to support iPhone X landscape orientation.

  • Add an example of UICollectionView using FlexLayout

  • Added by Luc Dion in Pull Request #33

Released on 2017-10-17

  • Add width/height methods taking percentage parameter

    • width(_ percent: FPercent)
    • height(_ percent: FPercent)
    • minWidth(_ percent: FPercent)
    • maxWidth(_ percent: FPercent)
    • minHeight(_ percent: FPercent)
    • maxHeight(_ percent: FPercent)

    Usage examples:

    • view.flex.width(50%)

    • view.flex.height(25%)

    • Added by Luc Dion in Pull Request #28

Released on 2017-10-02

  • Add Carthage support

Released on 2017-08-23

  • Add missing markDirty() method
  • ⚠️ BREAKING CHANGE: Renamed the method addContainer() to `addItem(). It is clearer that the added view is in fact a flex item, and not just a flex container.
  • Add an implementation of the Ray Wenderlich Yoga Tutorial
  • Add Swift 4.0 support

Released on 2017-08-20

  • Initial official release.
  • Add unit tests

Released on 2017-08-02

  • Initial beta release.