-
Notifications
You must be signed in to change notification settings - Fork 59
Add ForegroundStyle and BackgroundStyle support #785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ) -> Color.Resolved { | ||
| switch scheme { | ||
| case .light: | ||
| let combined = info.groupCount + context.rawValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.