-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fueled typography #1
base: fueled
Are you sure you want to change the base?
Conversation
struct Typography: Decodable { | ||
let fontSystem: FontSystem? | ||
let fontSwift: URL? | ||
let labelStyleSwift: URL? | ||
let textStyleSwift: URL? | ||
let labelStyleSwift: URL? | ||
let swiftUIFontSwift: URL? | ||
let generateLabels: Bool | ||
let labelsDirectory: URL? | ||
let generateStyles: Bool | ||
let stylesDirectory: URL? | ||
let nameStyle: NameStyle | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation is not consistent here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh good one, its difficult on the project since the default is spaces, so I need to change this for every file I'm working on.
# [optional] Absolute or relative path to swift file where to generate TextStyle extensions for each style (TextStyle extension). | ||
textStyleSwift: "./Source/UIComponents/TextStyle+extension.swift" | ||
# [optional] Absolute or relative path to swift file where to export SwiftUI fonts (Font extension). | ||
swiftUIFontSwift: "./Source/View/Common/Font+extension.swift" | ||
# Should FigmaExport generate UILabel for each text style (font)? E.g. HeaderLabel, BodyLabel, CaptionLabel | ||
generateLabels: true | ||
# Relative or absolute path to directory where to place UILabel for each text style (font) (Requred if generateLabels = true) | ||
labelsDirectory: "./Source/UIComponents/" | ||
# Should FigmaExport generate TextStyles for each text style (font)? E.g. Header, Body, Caption | ||
generateTextStyles: true | ||
# Relative or absolute path to directory where to place TextStyles for each text style (font) (Required if generateTextStyles = true) | ||
textStylesDirectory: "./Source/UIComponents/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be in addition to the original labelStyleSwift
, generateLabels
, and labelsDirectory
properties instead of replacing them? Since we are still supporting generating the Label
, LabelStyle
, LabelStyle+extension
files for UIKit
# Should FigmaExport generate TextStyles for each text style (font)? E.g. Header, Body, Caption | ||
generateStyles: true | ||
# Relative or absolute path to directory where to place TextStyles for each text style (font) (Required if generateTextStyles = true) | ||
textStylesDirectory: "./Source/UIComponents/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
# Choose what font system you want to use SwiftUI or UIKit | ||
fontSystem: UIKit | ||
# Path to directory where to place UIFont+extension.swift file required for both SwiftUI and UIKit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we include this in CONFIG.md
as well?
# Should FigmaExport generate TextStyles or Labels (based on fontSystem) for each text style (font)? E.g. Header, Body, Caption | ||
generateStyles: true | ||
# Relative or absolute path to directory where to place TextStyles or Labels (based on fontSystem) for each text style (font) (Required if generateStyles = true) | ||
stylesDirectory: "./UIComponents/Source/Typography" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Should FigmaExport generate TextStyles for each text style (font)? E.g. Header, Body, Caption | ||
generateTextStyles: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- TextStyle.swift.stencil, | ||
- TextStyle+extension.swift.stencil, | ||
- Font+extension.swift.stencil | ||
- UIFont+extension.swift.stencil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question - are we removing support for Label
and LabelStyle
?
return labelStylesSwiftExtension | ||
} | ||
|
||
private func makeLabel(textStyles: [TextStyle], labelsDirectory: URL, separateStyles: Bool) throws -> FileContents { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we are generating files for style
and style+extension
files based on the fontSystem, but if it is UIKit, we are not generating Label.swift
anymore?
First steps to support SwiftUI and UIKit for typography into one project