Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Previews Playbook #28

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Inspector/Inspector.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
91B2EA9928CA05B900A90A83 /* Compound in Frameworks */ = {isa = PBXBuildFile; productRef = 91B2EA9828CA05B900A90A83 /* Compound */; };
91B2EA9C28CA064800A90A83 /* ColorsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91B2EA9B28CA064800A90A83 /* ColorsScreen.swift */; };
91B946812A29062300F187EF /* IconsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91B946802A29062300F187EF /* IconsScreen.swift */; };
A7BBB5942ABCA632007CE7FB /* PlaybookScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7BBB5932ABCA632007CE7FB /* PlaybookScreen.swift */; };
91CA00362AD7D83200121E0F /* ButtonsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 917F562A28256DCD00D19543 /* ButtonsScreen.swift */; };
A75F953C2ACB0B31006C2657 /* PlatformViewVersionPredicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75F953B2ACB0B31006C2657 /* PlatformViewVersionPredicate.swift */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -64,6 +65,7 @@
91B2EA9B28CA064800A90A83 /* ColorsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorsScreen.swift; sourceTree = "<group>"; };
91B946802A29062300F187EF /* IconsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconsScreen.swift; sourceTree = "<group>"; };
9F9AF07976782861ECA2764C /* Pods-Compound Inspector.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Compound Inspector.release.xcconfig"; path = "Target Support Files/Pods-Compound Inspector/Pods-Compound Inspector.release.xcconfig"; sourceTree = "<group>"; };
A7BBB5932ABCA632007CE7FB /* PlaybookScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaybookScreen.swift; sourceTree = "<group>"; };
A75F953B2ACB0B31006C2657 /* PlatformViewVersionPredicate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlatformViewVersionPredicate.swift; sourceTree = "<group>"; };
B62609A3377EA1D9C59FCD20 /* Pods-Compound Inspector.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Compound Inspector.debug.xcconfig"; path = "Target Support Files/Pods-Compound Inspector/Pods-Compound Inspector.debug.xcconfig"; sourceTree = "<group>"; };
D2E28F45EEA9A8DE6AFB10E9 /* Pods_Compound_Inspector.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Compound_Inspector.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -155,6 +157,7 @@
9145A25128CCAD08001B3451 /* Tokens */,
91B2EA9A28CA05F300A90A83 /* Components */,
9132C62B2A72707500EAEF3D /* System Components */,
A7BBB5932ABCA632007CE7FB /* PlaybookScreen.swift */,
);
path = Sources;
sourceTree = "<group>";
Expand Down Expand Up @@ -304,6 +307,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A7BBB5942ABCA632007CE7FB /* PlaybookScreen.swift in Sources */,
91B946812A29062300F187EF /* IconsScreen.swift in Sources */,
9132C6352A72868B00EAEF3D /* NavigationBarScreen.swift in Sources */,
917F562F28256DD800D19543 /* SidebarList.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,56 @@
{
"pins" : [
{
"identity" : "flex",
"identity" : "compound-design-tokens",
"kind" : "remoteSourceControl",
"location" : "https://github.com/FLEXTool/FLEX",
"location" : "https://github.com/vector-im/compound-design-tokens.git",
"state" : {
"revision" : "ac50a6d36b738a15a6d3b6b51683d8a152319f59",
"version" : "4.7.0"
"revision" : "387d2b7211f07761c67e849c59414a1bb803defa"
}
},
{
"identity" : "prefire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/BarredEwe/Prefire",
"state" : {
"revision" : "898a4a9f5d5eb0a0b07adb1a7c89daf0f068b129",
"version" : "1.5.0"
}
},
{
"identity" : "sfsafesymbols",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SFSafeSymbols/SFSafeSymbols.git",
"state" : {
"revision" : "7cca2d60925876b5953a2cf7341cd80fbeac983c",
"version" : "4.1.1"
}
},
{
"identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing",
"state" : {
"revision" : "696b86a6d151578bca7c1a2a3ed419a5f834d40f",
"version" : "1.13.0"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax.git",
"state" : {
"revision" : "74203046135342e4a4a627476dd6caf8b28fe11b",
"version" : "509.0.0"
}
},
{
"identity" : "swiftui-introspect",
"kind" : "remoteSourceControl",
"location" : "https://github.com/siteline/SwiftUI-Introspect.git",
"state" : {
"revision" : "121c146fe591b1320238d054ae35c81ffa45f45a",
"version" : "0.12.0"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
"version" : "1.5.0"
}
},
{
"identity" : "prefire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/BarredEwe/Prefire",
"state" : {
"revision" : "898a4a9f5d5eb0a0b07adb1a7c89daf0f068b129",
"version" : "1.5.0"
}
},
{
"identity" : "sfsafesymbols",
"kind" : "remoteSourceControl",
Expand Down
26 changes: 26 additions & 0 deletions Inspector/Sources/PlaybookScreen.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// PlaybookScreen.swift
// Compound Inspector
//
// Created by Mauro Romito on 21/09/23.
//

import SwiftUI

import Compound
import Prefire

struct PlaybookScreen: View {
var body: some View {
NavigationStack {
PlaybookView(isComponent: true, previewModels: PreviewModels.models)
}
.navigationTitle("Playbook")
}
}

struct PlaybookScreen_Previews: PreviewProvider {
static var previews: some View {
PlaybookScreen()
}
}
4 changes: 4 additions & 0 deletions Inspector/Sources/Screen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ enum Screen: Hashable, View {
/// The system's share sheet component
case shareSheet

case playbook

var body: some View {
switch self {
case .colors: ColorsScreen()
Expand All @@ -55,6 +57,8 @@ enum Screen: Hashable, View {
case .contextMenu: ContextMenuScreen()
case .navigationBar: NavigationBarScreen()
case .shareSheet: ShareSheetScreen()

case .playbook: PlaybookScreen()
}
}
}
9 changes: 9 additions & 0 deletions Inspector/Sources/SidebarList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ struct SidebarList: View {
componentsSection
systemComponentsSection
missingFromFigmaSection
playbookSection
}
.navigationTitle("Components")
.listStyle(.sidebar)
Expand Down Expand Up @@ -66,6 +67,14 @@ struct SidebarList: View {
}
}

var playbookSection: some View {
Section("Playbook") {
NavigationLink(value: Screen.playbook) {
Label("Previews Playbook", systemImage: "book")
}
}
}

var missingFromFigmaSection: some View {
Section("Missing from Figma") {
NavigationLink(value: Screen.buttons) {
Expand Down
Loading