Skip to content

fix: correct two compile errors in liquid-glass.md — Glass.prominent and GlassEffectStyle - #65

Merged
EngOmarElsayed merged 2 commits into
AvdLee:mainfrom
kumamaki:fix/glass-prominent-nonexistent-api
May 17, 2026
Merged

EngOmarElsayed merged 2 commits into
AvdLee:mainfrom
kumamaki:fix/glass-prominent-nonexistent-api

Conversation

@kumamaki

@kumamaki kumamaki commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

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.prominent does not exist

The file used .prominent as a Glass material 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 the SwiftUICore.swiftinterface files 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:

  • Glass material styles: .regular, .clear, .identity — these are the only three
  • ButtonStyle variants: .buttonStyle(.glass) and .buttonStyle(.glassProminent) — these are real and unrelated

There is no "prominence level" on the Glass material. To make a glass surface appear more visually prominent, the correct approach is a stronger tint opacity.

2. GlassEffectStyle is not a type

The modifier signature and a helper function used GlassEffectStyle as the parameter type. The actual type is Glass. The parameter label was also wrong (style → glass) and the isEnabled: Bool = true parameter was missing from the signature entirely. The isEnabled parameter is confirmed by its presence in the official selector glassEffect(_:in:isEnabled:), which Apple's own developer forums surface in a visionOS error message.

What changed

Commit 1 — Glass.prominent

  • "Prominence Levels" section renamed to "Available Styles"; documents all three real Glass statics with descriptions
  • Added a note that tint opacity (not a non-existent prominence enum) is the right way to increase emphasis
  • Tinting example: .prominent.tint(...) → .regular.tint(...)
  • Segmented control example: selected-state .prominent.interactive() → .regular.tint(.accentColor.opacity(0.4)).interactive()
  • Checklist item reworded away from "prominence levels"

Commit 2 — GlassEffectStyle

  • Modifier signature: GlassEffectStyle → Glass, style → glass, added isEnabled: Bool = true
  • Section heading: ### GlassEffectStyle → ### Glass
  • glassEffectWithFallback helper: parameter type and internal reference updated to Glass

What was not changed

The .buttonStyle(.glass) and .buttonStyle(.glassProminent) examples are correct and untouched.

Test plan

  • Paste any snippet from the updated "Available Styles" section into an iOS 26 / macOS 26 target — all compile without error
  • glassEffectWithFallback compiles against iOS 26 SDK
  • .buttonStyle(.glass) and .buttonStyle(.glassProminent) examples (unchanged) still compile

kumamaki added 2 commits May 10, 2026 13:01
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.
@kumamaki kumamaki changed the title fix: replace non-existent Glass.prominent with correct API fix: correct two compile errors in liquid-glass.md — Glass.prominent and GlassEffectStyle May 10, 2026
@EngOmarElsayed
EngOmarElsayed requested a review from Copilot May 17, 2026 14:50
@EngOmarElsayed
EngOmarElsayed merged commit 4517a2f into AvdLee:main May 17, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .prominent usages with .regular (optionally tinted) and documents the three real Glass statics (.regular, .clear, .identity).
  • Corrects glassEffect signature to use Glass type, glass label, and adds the isEnabled parameter; updates glassEffectWithFallback helper accordingly.
  • Reworks the checklist item and "Prominence Levels" section to reflect tint-opacity as the path to visual emphasis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

references/liquid-glass.md uses non-existent Glass.prominent — fails to compile

3 participants