Repository navigation
Conversation
SwiftUI has its own adaptive colors for these now: Color.primary and Color.secondary for labels, the .tertiary and .quaternary shape styles, and Color.blue, .green and so on for the standard system colors. Mark the 19 static properties as deprecated with a message that names the replacement. They stay available in 3.0.0. The background, fill, separator, link and placeholder colors have no SwiftUI counterpart and stay as they are. The library's own views and the documentation use the SwiftUI colors now, so the package itself emits no deprecation warnings.
The preview at the end of ColorExt.swift and two comments still used the now deprecated Color.systemBlue, so the package emitted its own deprecation warnings. Use Color.blue there instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HandySwiftUI's
Color.label,Color.secondaryLabel…Color.quaternaryLabelandColor.systemBlue…Color.systemGray6only repeat colors that SwiftUI offers directly today (.primary,.secondary,.blue,.gray, …). These 19 helpers are now deprecated, each with a message naming its SwiftUI replacement; they still work. The package's own views and the DocC page use the SwiftUI colors now.Background, fill, separator, placeholder and link colors stay as they are: SwiftUI has no direct replacement for them.
Considered: removing the helpers in 3.0.0. Deprecating first gives callers a warning with the replacement instead of a build error.
iPhone 17 on the branch, light and dark. The same screen on
mainrenders pixel for pixel the same (0 of 3,162,132 pixels differ in each appearance):MultiSelectionViewoption text, the verticalLabeledContentkey, thecbtext tag, and the blue preview color.How this was verified
swift test --build-system swiftbuild: 40 tests in 13 suites passed, no deprecation warning fromSources/. Built for iOS, tvOS, watchOS and visionOS withxcodebuild.mainand from the branch on an iPhone 17 simulator (iOS, Dynamic Type L) and compared pixel by pixel.Door two-way · Blast Radius breit (public API, re-exported by FlineDevKit; callers get deprecation warnings)