square/Valet 3535
Valet lets you securely store data in the iOS, tvOS, or macOS Keychain without knowing a thing about how the Keychain works. It’s easy. We promise.
This package makes your Decodable types resilient to decoding errors and allows you to inspect those errors.
SuperDelegate provides a clean application delegate interface and protects you from bugs in the application lifecycle
An example app showing how Buck can be used to build a simple iOS app.
square/Aardvark 239
Aardvark is a library that makes it dead simple to create actionable bug reports.
A performant cache for logging systems. CacheAdvance persists log events 30x faster than SQLite.
A programmatic layout engine and DSL that provides an alternative to Auto Layout
airbnb/buck 20
A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
XCTest-watchOS provides an implementation of XCTest that can run on watchOS
Celluloid is a reactive, input-output oriented language with support for blocks and timelines designed to make both simple and complex media composition operations more comprehensible to the author.
fork aaronn/Swift-YouTube-Player
Swift library for embedding and controlling YouTube videos in your iOS applications!
fork in 2 hours
fork ljharb/proposal-record-tuple
ECMAScript proposal for the Record and Tuple value types. | Stage 2: it will change!
fork in 13 hours
fork martinmroz/HalfModalPresentationController
Modal presentation that takes up half the screen. Swipe down to dismiss.
http://martinnormark.com/presenting-ios-view-controller-as-bottom-half-modal/
fork in a day
startedbazelbuild/rules_swift
started time in a day
push eventairbnb/BuckSample
commit sha 0dc454cff957caeac465e5eba79f54ab2d6626c7
update window initialization to occur at the correct time in application start up (#140)
push time in a day
PR merged airbnb/BuckSample
👋 Greetings!
First of all, great work to everyone who contributed thus far. As a iOS dev new to Buck, this repo has been immensely helpful in learning the best practices.
One thing I noticed is that occasionally when running the example application, the sim will go black and the following is output is visible in the console:
ExampleApp[14655:2132796] [ApplicationLifecycle] UIWindows were created prior to initial application activation. This may result in incorrect visual appearance.
As far as I know, this is a simple change to initialize the window once the appropriate life cycle method is called on the app delegate. Immutable initialization as an instance property cannot ensure that the window is initialized at the right time.
pr closed time in a day
pull request commentdfed/CacheAdvance
CacheAdvance isn't Carthage compatible
Codecov Report
Merging #49 (1ed3341) into main (34524cc) will decrease coverage by
1.39%. The diff coverage isn/a.
@@ Coverage Diff @@
## main #49 +/- ##
==========================================
- Coverage 98.05% 96.65% -1.40%
==========================================
Files 12 12
Lines 359 359
==========================================
- Hits 352 347 -5
- Misses 7 12 +5
| Impacted Files | Coverage Δ | |
|---|---|---|
| Sources/CacheAdvance/FileHandleExtensions.swift | 80.00% <0.00%> (-20.00%) |
:arrow_down: |
comment created time in a day
pull request commentairbnb/BuckSample
Initialize window in the example app's AppDelegate correctly
@shepting do you want to merge if this looks good to you too?
comment created time in 2 days
PR opened airbnb/BuckSample
👋 Greetings!
First of all, great work to everyone who contributed thus far. As a iOS dev new to Buck, this repo has been immensely helpful in learning the best practices.
One thing I noticed is that occasionally when running the example application, the sim will go black and the following is output is visible in the console:
ExampleApp[14655:2132796] [ApplicationLifecycle] UIWindows were created prior to initial application activation. This may result in incorrect visual appearance.
As far as I know, this is a simple change to initialize the window once the appropriate life cycle method is called on the app delegate. Immutable initialization as an instance property cannot ensure that the window is initialized at the right time.
pr created time in 2 days
startedgoogle/swift-benchmark
started time in 2 days
startedexcalidraw/excalidraw
started time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class FrameProvider { let x = minXOfMonth(containingItemWithFrame: layoutItem.frame, at: position) let y = minYOfMonth(containingDayItemWithFrame: layoutItem.frame, atRowInMonth: rowInMonth) return CGPoint(x: x, y: y)+ + case .monthFooter(let month):+ let x = layoutItem.frame.origin.x+ let y = layoutItem.frame.minY -+ monthHeaderHeight -+ content.monthDayInsets.top -+ (monthsLayout.pinDaysOfWeekToTop ? 0 : (daySize.height + content.verticalDayMargin)) -+ CGFloat((CGFloat(numberOfRows(in: month)) * daySize.height) + (CGFloat(numberOfRows(in: month) - 1) * content.verticalDayMargin)) -+ content.monthDayInsets.bottom
This is all working as expected now. I will spend some time on implementing some form of footer experience that I could see worthy of this. Do you want me to solely focus on UI presentation of a footer, or actually the UI and logic implementation?
Can see it getting quite intense just for a demo that is all, I'm indifferent, just want some direction on how thought out I should be in the demo.
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class FrameProvider { return CGRect(origin: CGPoint(x: x, y: y), size: daySize) } + func frameOfMonthFooter(_ month: Month, inMonthWithOrigin monthOrigin: CGPoint) -> CGRect {+ let x = monthOrigin.x+ let y = monthOrigin.y ++ monthHeaderHeight ++ content.monthDayInsets.top ++ (monthsLayout.pinDaysOfWeekToTop ? 0 : (daySize.height + content.verticalDayMargin)) ++ (CGFloat(numberOfRows(in: month)) * (daySize.height + content.verticalDayMargin))+ return CGRect(origin: CGPoint(x: x, y: y), size: CGSize(width: monthWidth, height: monthFooterHeight ?? 0))
Once #79 is merged, I'll update this branch with the same fixes to accommodate the clean up.
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
+// Created by Sebastien Audeon on 11/26/20.+// Copyright © 2020 Airbnb. All rights reserved.++// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import UIKit+import HorizonCalendar++class SingleDaySelectionFooterDemoViewController: DemoViewController {
- ✅
- I haven't found the need just yet to add a footer to these in my own projects, but I can definitely make an attempt at coming up with something...
- ✅
- ✅
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class LayoutItemTypeEnumerator { } else { return .day(calendar.day(byAddingDays: -1, to: day)) }+ + case .monthFooter(let month):+ let day = calendar.day(containing: calendar.lastDate(of: month))+ return .day(day)
yeah, great idea. We already use that for the Airbnb app repo internally, and it pulls rules from our Swift style guide: https://github.com/airbnb/swift
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class LayoutItemTypeEnumerator { } else { return .day(calendar.day(byAddingDays: -1, to: day)) }+ + case .monthFooter(let month):+ let day = calendar.day(containing: calendar.lastDate(of: month))+ return .day(day)
It's okay! As for enforcing, can look into swiftlint or something similar?
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class LayoutItemTypeEnumerator { } else { return .day(calendar.day(byAddingDays: -1, to: day)) }+ + case .monthFooter(let month):+ let day = calendar.day(containing: calendar.lastDate(of: month))+ return .day(day)
Ah, some more 4 space instead of 2 space indentation. I'll look into enforcing this at the project level. This is probably annoying to deal with, sorry!
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class FrameProvider { size: CGSize, layoutMargins: NSDirectionalEdgeInsets, scale: CGFloat,- monthHeaderHeight: CGFloat)+ monthHeaderHeight: CGFloat,+ monthFooterHeight: CGFloat? = 0.0)
monthFooterHeight: CGFloat?)
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
extension CalendarViewContent { accessibilityTraits: []), viewModel: .init(text: dayText, accessibilityLabel: accessibilityLabel)) }-+
nit: remove this diff / added space
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
+// Created by Sebastien Audeon on 11/26/20.+// Copyright © 2020 Airbnb. All rights reserved.++// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import HorizonCalendar+import UIKit++// MARK: CalendarItemViewRepresentable
And for consistency, add the CalendarItemViewRepresentable conformance below so that it looks similar to the DayView file structure.
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
+// Created by Sebastien Audeon on 11/26/20.+// Copyright © 2020 Airbnb. All rights reserved.++// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import HorizonCalendar+import UIKit++// MARK: CalendarItemViewRepresentable
// MARK: - FooterView
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
+// Created by Sebastien Audeon on 11/26/20.+// Copyright © 2020 Airbnb. All rights reserved.++// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import HorizonCalendar+import UIKit++// MARK: CalendarItemViewRepresentable++class FooterView: CalendarItemViewRepresentable {
nit:
final class FooterView: CalendarItemViewRepresentable {
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
Bk/reduce frame math duplication
final class FrameProvider { return rowOfLastDateInMonth + 1 } + // Gets the height of day content for a specified number of week rows, including the additional+ // height for vertical day padding.+ // For example, the returned height value for 5 week rows will be 5x the `daySize.height`, plus 4x+ // the `content.verticalDayMargin`.+ private func heightOfDayContent(forNumberOfWeekRows numberOfWeekRows: Int) -> CGFloat {+ (CGFloat(numberOfWeekRows) * daySize.height) ++ (CGFloat(numberOfWeekRows - 1) * content.verticalDayMargin)+ }++ // Gets the height of the days of the week row, plus the padding between it and the first row of+ // days in each month. The returned value will be `0` if+ // `monthsLayout.pinDaysOfWeekToTop == true`.+ private func heightOfDaysOfTheWeekRowInMonth() -> CGFloat {
Very clean! Nice!
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
+// Created by Sebastien Audeon on 11/26/20.+// Copyright © 2020 Airbnb. All rights reserved.++// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import UIKit+import HorizonCalendar++class SingleDaySelectionFooterDemoViewController: DemoViewController {
final class MonthFootersDemoViewController: DemoViewController {
I'd prefer to keep the demos as focused as possible, rather than combining independent concepts like single day selection and month footer configuration. Could we make the following changes (in addition to the naming suggestion above):
- Remove all selection related naming / code
- Give the footer some more interesting content, rather than just repeating the date in YYYY-MM format. Curious if you have any ideas / inspiration from your own projects of what would be useful in a footer?
- Increase the value of
monthDayInsets.bottomso that the footer isn't right up against the last week row of the month - Update the indentation to be 2 spaces instead of 4
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class FrameProvider { return CGRect(origin: CGPoint(x: x, y: y), size: daySize) } + func frameOfMonthFooter(_ month: Month, inMonthWithOrigin monthOrigin: CGPoint) -> CGRect {+ let x = monthOrigin.x+ let y = monthOrigin.y ++ monthHeaderHeight ++ content.monthDayInsets.top ++ (monthsLayout.pinDaysOfWeekToTop ? 0 : (daySize.height + content.verticalDayMargin)) ++ (CGFloat(numberOfRows(in: month)) * (daySize.height + content.verticalDayMargin))+ return CGRect(origin: CGPoint(x: x, y: y), size: CGSize(width: monthWidth, height: monthFooterHeight ?? 0))
That's what I am talking about! Very nice indeed!
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class FrameProvider { let x = minXOfMonth(containingItemWithFrame: layoutItem.frame, at: position) let y = minYOfMonth(containingDayItemWithFrame: layoutItem.frame, atRowInMonth: rowInMonth) return CGPoint(x: x, y: y)+ + case .monthFooter(let month):+ let x = layoutItem.frame.origin.x+ let y = layoutItem.frame.minY -+ monthHeaderHeight -+ content.monthDayInsets.top -+ (monthsLayout.pinDaysOfWeekToTop ? 0 : (daySize.height + content.verticalDayMargin)) -+ CGFloat((CGFloat(numberOfRows(in: month)) * daySize.height) + (CGFloat(numberOfRows(in: month) - 1) * content.verticalDayMargin)) -+ content.monthDayInsets.bottom
Be careful of the sign though, this one is subtracting parts of the layout, while the linked comment is adding parts of the layout. It'll be pretty obvious if it's wrong though when you build and run ;)
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class FrameProvider { let x = minXOfMonth(containingItemWithFrame: layoutItem.frame, at: position) let y = minYOfMonth(containingDayItemWithFrame: layoutItem.frame, atRowInMonth: rowInMonth) return CGPoint(x: x, y: y)+ + case .monthFooter(let month):+ let x = layoutItem.frame.origin.x+ let y = layoutItem.frame.minY -+ monthHeaderHeight -+ content.monthDayInsets.top -+ (monthsLayout.pinDaysOfWeekToTop ? 0 : (daySize.height + content.verticalDayMargin)) -+ CGFloat((CGFloat(numberOfRows(in: month)) * daySize.height) + (CGFloat(numberOfRows(in: month) - 1) * content.verticalDayMargin)) -+ content.monthDayInsets.bottom
Similar feedback as here https://github.com/airbnb/HorizonCalendar/pull/75/files#r533051542
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class FrameProvider { return CGRect(origin: CGPoint(x: x, y: y), size: daySize) } + func frameOfMonthFooter(_ month: Month, inMonthWithOrigin monthOrigin: CGPoint) -> CGRect {+ let x = monthOrigin.x+ let y = monthOrigin.y ++ monthHeaderHeight ++ content.monthDayInsets.top ++ (monthsLayout.pinDaysOfWeekToTop ? 0 : (daySize.height + content.verticalDayMargin)) ++ (CGFloat(numberOfRows(in: month)) * (daySize.height + content.verticalDayMargin))+ return CGRect(origin: CGPoint(x: x, y: y), size: CGSize(width: monthWidth, height: monthFooterHeight ?? 0))
Also, these complicated calculation are simplified a bit after I merge https://github.com/airbnb/HorizonCalendar/pull/79. Once you pull that into your branch, we can update this to be something like this:
let numberOfWeekRows = self.numberOfWeekRows(in: month)
let x = monthOrigin.x
let y = monthOrigin.y +
monthHeaderHeight +
content.monthDayInsets.top +
heightOfDaysOfTheWeekRowInMonth() +
heightOfDayContent(forNumberOfWeekRows: numberOfWeekRows) +
content.monthDayInsets.bottom
return CGRect(x: x, y: y, width: monthWidth, height: monthFooterHeight ?? 0)
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class FrameProvider { return CGRect(origin: CGPoint(x: x, y: y), size: daySize) } + func frameOfMonthFooter(_ month: Month, inMonthWithOrigin monthOrigin: CGPoint) -> CGRect {+ let x = monthOrigin.x+ let y = monthOrigin.y ++ monthHeaderHeight ++ content.monthDayInsets.top ++ (monthsLayout.pinDaysOfWeekToTop ? 0 : (daySize.height + content.verticalDayMargin)) ++ (CGFloat(numberOfRows(in: month)) * (daySize.height + content.verticalDayMargin))+ return CGRect(origin: CGPoint(x: x, y: y), size: CGSize(width: monthWidth, height: monthFooterHeight ?? 0))
Ah great, I knew I missed something simple.
I wonder if there is a way to make this less intense, the calculations etc...
comment created time in 3 days
Pull request review commentairbnb/HorizonCalendar
feat: provide ability to add footer to month
final class FrameProvider { let x = minXOfMonth(containingItemWithFrame: layoutItem.frame, at: position) let y = minYOfMonth(containingDayItemWithFrame: layoutItem.frame, atRowInMonth: rowInMonth) return CGPoint(x: x, y: y)+ + case .monthFooter(let month):+ let x = layoutItem.frame.origin.x+ let y = layoutItem.frame.minY -
I personally also like 4, but can fix the indention now!
comment created time in 3 days