Repository navigation
fix: correct two compile errors in liquid-glass.md — Glass.prominent and GlassEffectStyle - #65
Merged
EngOmarElsayed merged 2 commits intoMay 17, 2026
Conversation
Glass.prominent does not exist in the shipping iOS 26 or macOS 26 SDKs. The real static values are .regular, .clear, and .identity. Replace all .prominent references with .regular (with tint for emphasis where needed) and document the full set of available Glass statics. Fixes AvdLee#64
GlassEffectStyle does not exist; the actual type is Glass. Also renames the parameter label from style to glass to match the SDK signature, and adds the missing isEnabled: Bool = true parameter to the modifier signature and the glassEffectWithFallback helper example.
EngOmarElsayed
approved these changes
May 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes two incorrect API references in liquid-glass.md that would cause agent-generated code to fail compilation: the non-existent Glass.prominent material and the incorrect GlassEffectStyle type name in modifier signatures.
Changes:
- Replaces
.prominentusages with.regular(optionally tinted) and documents the three realGlassstatics (.regular,.clear,.identity). - Corrects
glassEffectsignature to useGlasstype,glasslabel, and adds theisEnabledparameter; updatesglassEffectWithFallbackhelper accordingly. - Reworks the checklist item and "Prominence Levels" section to reflect tint-opacity as the path to visual emphasis.
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.
Fixes #64.
What was wrong
The skill file had two categories of incorrect API references that would cause agent-generated code to fail to compile.
1.
Glass.prominentdoes not existThe file used
.prominentas aGlassmaterial style in several places. This property is not part of the shipping SDK on any platform (iOS 26, macOS 26, tvOS 26, watchOS 26) — confirmed against theSwiftUICore.swiftinterfacefiles from both the macOS 26 and iOS 26 SDKs, and Apple's official documentation JSON.The confusion likely came from mixing up two separate APIs:
Glassmaterial styles:.regular,.clear,.identity— these are the only threeButtonStylevariants:.buttonStyle(.glass)and.buttonStyle(.glassProminent)— these are real and unrelatedThere is no "prominence level" on the
Glassmaterial. To make a glass surface appear more visually prominent, the correct approach is a stronger tint opacity.2.
GlassEffectStyleis not a typeThe modifier signature and a helper function used
GlassEffectStyleas the parameter type. The actual type isGlass. The parameter label was also wrong (style→glass) and theisEnabled: Bool = trueparameter was missing from the signature entirely. TheisEnabledparameter is confirmed by its presence in the official selectorglassEffect(_:in:isEnabled:), which Apple's own developer forums surface in a visionOS error message.What changed
Commit 1 — Glass.prominent
Glassstatics with descriptions.prominent.tint(...)→.regular.tint(...).prominent.interactive()→.regular.tint(.accentColor.opacity(0.4)).interactive()Commit 2 — GlassEffectStyle
GlassEffectStyle→Glass,style→glass, addedisEnabled: Bool = true### GlassEffectStyle→### GlassglassEffectWithFallbackhelper: parameter type and internal reference updated toGlassWhat was not changed
The
.buttonStyle(.glass)and.buttonStyle(.glassProminent)examples are correct and untouched.Test plan
glassEffectWithFallbackcompiles against iOS 26 SDK.buttonStyle(.glass)and.buttonStyle(.glassProminent)examples (unchanged) still compile