Skip to content

Commit

Permalink
Implement new PlaybookUI
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1028 committed Feb 13, 2024
1 parent 0a18e71 commit 3074e7c
Show file tree
Hide file tree
Showing 76 changed files with 1,822 additions and 2,686 deletions.
4 changes: 2 additions & 2 deletions Example/PlaybookExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -1043,7 +1043,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public struct HikeView: View {
HStack {
HikeGraph(hike: hike, path: \.elevation)
.frame(width: 50, height: 30)
.animation(nil)

VStack(alignment: .leading) {
Text(verbatim: hike.name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A single line in the graph.

import SwiftUI

public struct GraphCapsule: View {
public struct GraphCapsule: View, Equatable {
public var index: Int
public var height: CGFloat
public var range: Range<Double>
Expand All @@ -33,7 +33,7 @@ public struct GraphCapsule: View {
.fill(color)
.frame(height: height * heightRatio, alignment: .bottom)
.offset(x: 0, y: height * -offsetRatio)
.animation(animation)
.animation(animation, value: self)
}

public init(
Expand Down
1 change: 1 addition & 0 deletions Example/SamplePlaybook/Scenarios/AllScenarios.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Playbook
import SampleComponent
import SwiftUI

struct AllScenarios: ScenarioProvider {
static func addScenarios(into playbook: Playbook) {
Expand Down
2 changes: 1 addition & 1 deletion Example/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ options:
createIntermediateGroups: true
bundleIdPrefix: app.playbook-ui.Example
deploymentTarget:
iOS: 13.0
iOS: 15.0

settings:
CODE_SIGNING_REQUIRED: NO
Expand Down
296 changes: 172 additions & 124 deletions Playbook.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ internal final class SnapshotWindow: UIWindow {
scenarioViewController.disablesEndAppearanceTransition = true
scenarioViewController.shouldStatusBarHidden = true

frame.size = CGSize(
width: scenario.layout.fixedWidth ?? device.size.width,
height: scenario.layout.fixedHeight ?? device.size.height
)
windowLevel = .normal - 1
layer.speed = .greatestFiniteMagnitude
rootViewController = scenarioViewController
isHidden = false
frame.size = CGSize(
width: scenario.layout.fixedWidth ?? device.size.width,
height: scenario.layout.fixedHeight ?? device.size.height
)

if window != nil {
// In iOS 16 and 17, setting `isHidden` nor does not update
Expand Down
32 changes: 0 additions & 32 deletions Sources/PlaybookUI/Internal/Atomic.swift

This file was deleted.

13 changes: 0 additions & 13 deletions Sources/PlaybookUI/Internal/Blur.swift

This file was deleted.

17 changes: 0 additions & 17 deletions Sources/PlaybookUI/Internal/CatalogBarItem.swift

This file was deleted.

41 changes: 0 additions & 41 deletions Sources/PlaybookUI/Internal/CatalogDrawerStyle.swift

This file was deleted.

59 changes: 0 additions & 59 deletions Sources/PlaybookUI/Internal/CatalogSplitStyle.swift

This file was deleted.

37 changes: 0 additions & 37 deletions Sources/PlaybookUI/Internal/CatalogStore.swift

This file was deleted.

19 changes: 0 additions & 19 deletions Sources/PlaybookUI/Internal/Counter.swift

This file was deleted.

Loading

0 comments on commit 3074e7c

Please sign in to comment.