Skip to content

Entries with the spm tag

Pull request Correctly calculate `CollectionFlowLayoutEnvironment.contentSize` on composed-swift/Composed


Here's a small PR for a bug that I think has just gone unnoticed because we've never used the sectionInset property of the UICollectionViewFlowLayout, and we've never used the contentInset property of UICollectionView.

The issues looks to be that the layout's sectionInset property is applied on a per-section basis, but the collection view's contentInset was not being honoured.

It was also calculated using insetBy(dx:dy:), which will modify the width by -dx * 2, which would double the expected insets.

Pull request Add JosephDuffy/VaporDocC.git on SwiftPackageIndex/PackageList


The package(s) being submitted are:

Checklist

I have either:

  • [x] Run swift ./validate.swift.

Or, checked that:

  • [ ] The package repositories are publicly accessible.
  • [ ] The packages all contain a Package.swift file in the root folder.
  • [ ] The packages are written in Swift 5.0 or later.
  • [ ] The packages all contain at least one product (either library or executable), and at least one product is usable in other Swift apps.
  • [ ] The packages all have at least one release tagged as a semantic version.
  • [ ] The packages all output valid JSON from swift package dump-package with the latest Swift toolchain.
  • [ ] The package URLs are all fully specified including the protocol (usually https) and the .git extension.
  • [ ] The packages all compile without errors.
  • [ ] The package list JSON file is sorted alphabetically.

Pull request Cache `SingleElementSections.numberOfElements` on composed-swift/Composed


Overall this is pretty minor but when dealing with a lot of SingleElementSections that are infrequently updated is does start to slow down.

I thought a faster approach would be to use generics on replace(element:) to only check for nil when the value is Optional, but generics don't allow for this kind of overload.

Also added some basic tests. The performance tests show a ~9% performance increase.

Pull request Cache nib registrations to improve performance on composed-swift/Composed


@bill201207 found that UINib(nibName:bundle:) is a big part of the poor performance when our app launches.

Ultimately batching updates will help with a lot of things like this, but really that'll just be masking some of the performance issues so it's useful to find issues like this now.

Pull request Merge ComposedLayout and ComposedUI packages on composed-swift/Composed


This adds the ComposedLayout and ComposedUI packages, which will close #16.

The base for this is 2.0-beta, which we can use for testing new changes, which can also break API.

If you go to the repo settings you can (temporarily) set the default branch to 2.0-beta and we can add a note to the README stating this is the beta release and the stable release is available in the master branch.

Once merged and these changes are made the READMEs for ComposedLayout and ComposedUI repos can be updated to point to this repo and their repos archived.

Pull request Add `FlatSection` on composed-swift/Composed


This is a new type of section that is similar to ComposedSectionProvider, but rather than flattening each of the children in to a single SectionProvider it flattens them in to a single Section.

The ComposedUI side of this has been updated to support multiple cells per section, with a convenience for FlatSection that delegates the calls to each of the flattened sections.

This is a breaking change since the protocol requirements have changed. I have set the base of the PR to merge-all-libraries since that's also a breaking change and this PR relies on those changes.

edit: We've moved to our own fork to allow for more rapid development. The latest changes are in https://github.com/opennetltd/Composed/tree/feature/FlatSection, which will eventually be merged back in to this repo once some of the other PRs/issues have been resolved.