Add ForegroundStyle and BackgroundStyle support#785
Conversation
🤖 Augment PR SummarySummary: This PR adds end-to-end support for context-driven Changes:
Technical Notes: Style resolution is driven via 🤖 Was this summary useful? React with 👍 or 👎 |
| ) -> Color.Resolved { | ||
| switch scheme { | ||
| case .light: | ||
| let combined = info.groupCount + context.rawValue |
There was a problem hiding this comment.
systemBackgroundColor(info:context:scheme:)’s .light branch ignores info.layer, so _addingBackgroundLayer() won’t affect the computed background color in light mode (only in .dark). If layers are meant to model the system’s “secondary/tertiary background” behavior, you may need to incorporate info.layer into the light-mode calculation too.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| for level in levels { | ||
| var innerShape = shape | ||
| base(level: level, env: shape.environment)._apply(to: &innerShape) | ||
| let style = innerShape.stylePack[name, 0] |
There was a problem hiding this comment.
In BackgroundStyle._apply’s generic .resolveStyle(name, levels) case, reading innerShape.stylePack[name, 0] assumes the inner application wrote at level 0; if levels.lowerBound isn’t 0 (e.g. via offset(by:)), this will likely read .clear and populate incorrect entries. Consider indexing using the level actually written (like levels.lowerBound or level) so offset ranges resolve correctly.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #785 +/- ##
==========================================
- Coverage 13.13% 13.04% -0.09%
==========================================
Files 620 621 +1
Lines 36773 37040 +267
==========================================
+ Hits 4829 4831 +2
- Misses 31944 32209 +265 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.