spark-changelog
FreeUpdate the CHANGELOG.md with the description of the changes between the last released version and the new one
The English summary is being prepared. Showing the original description.
Create or update a token file in the Token folder in Sources of a spark-ios-component-XXX and add or update unit tests.
The English summary is being prepared. Showing the original description.
See how to installReview the instructions the agent will receive before you install.
This skill guides you to implement/update a token in spark component.
Parameter Handling:
If the skill is invoked with a parameter (e.g., /spark-component-token button):
Modules/Components/{component-name}/If no parameter is provided:
Modules/Components/ directoryOnce the component is selected, all operations must be performed in Modules/Components/{component-name}/ folder.
Use the files in the template folder as reference to manage the token and the unit tests. See Modules/Components/Chip/Sources/Core/Token for a full real-world example.
The template uses
Border,Size, andTypographypurely as illustrations of three recurring patterns (see Rules below). A real component's token categories are whatever it actually needs — e.g.Opacity,Layout,Spacing,Color,Icon,Animation, ... Determine the category names and count from the component's design/usage, not from the template names.
The Token file must respect theses rules :
public struct XXXToken: Equatable with one property per token category the component actually needs (there is no fixed list or fixed count — could be one category or a dozen), plus a public init(theme: any Theme) that forwards the theme to every category that needs it.XXXToken+Opacity.swift), containing a public extension XXXToken with a nested struct CategoryName: Equatable.Size in the template) must have a parameterless public init(). On the root struct, its property is a stored default value (public let size = Size()), not assigned in the root init(theme:) body.Border in the template) must have public init(theme: any Theme), and its property must be assigned in the root init(theme:).any ColorToken, any TypographyFontToken, or any other non-natively-Equatable existential (illustrated by Typography in the template) must provide a manual static func == using .equals() — the synthesized Equatable conformance does not work for existential protocol types.///). XXXToken/CategoryName: description)$ swiftlint.$ sourceryCreated by {firstname.lastname} on DD/MM/YYYYself.// sourcery: AutoMockableThemeGeneratedMock.mocked() and ThemeGeneratedMock.mocked2() to cover theme-dependent values and equality/inequalityXXXTokenTests must verify that each property matches a freshly-constructed instance of its own sub-struct (e.g. #expect(token.border == XXXToken.Border(theme: self.theme))), plus equatable true/false at the root levelIf you encounter:
Equatable and it's unclear whether a manual == is neededUse AskUserQuestion to clarify with the user before proceeding.
No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Update the CHANGELOG.md with the description of the changes between the last released version and the new one
The English summary is being prepared. Showing the original description.
Launch some action before create push in git
The English summary is being prepared. Showing the original description.
Create or update a accessibility identifier file in the AccessibilityIdentifier folder in Sources of a spark-ios-component-XXX and add or update unit tests.
The English summary is being prepared. Showing the original description.
Create or update a constants file in the Constants folder in Sources of a spark-ios-component-XXX and add or update unit tests.
The English summary is being prepared. Showing the original description.
Create or update the DocC documentation in Sources of a spark-ios-component-XXX.
The English summary is being prepared. Showing the original description.
Create or update an enum file in the Enum folder in Sources of a spark-ios-component-XXX and add or update unit tests.
The English summary is being prepared. Showing the original description.