ποΈ Forge: Style Infrastructure Parity Integration#288
Conversation
- Implements `Style` class containing Setters and Triggers. - Registers `StyleProperty` on `UIElement` and handles property changes. - Refactors `DependencyObject` property evaluation logic to respect strict XAML value precedence: Local > Template Trigger > Style Trigger > Style Setter > Inherited > Default. - Ensures concurrent thread safety without using ThreadStatic in recursive event paths. - Adds `StyleTests` validation covering local vs trigger vs style overrides. Co-authored-by: tedd <493224+tedd@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π‘ Hypothesis: The TUI framework lacked standard
Styleinfrastructure and the precise WPFDependencyPropertyvalue precedence (Local > Trigger > Style > Inherited > Default). This prevented declarative UI themes and generated incorrect states when local overrides collided with active triggers or styles.π― Execution:
Styleclass supporting collections ofSetterandTriggerBase.StylePropertyas a core dependency property onUIElement.StylePropertychanges to automatically extract, evaluate, and apply direct style setters.DependencyObjectstate management to include discrete_styleValuesand_styleTriggerValuesdictionaries alongside existing local and template trigger values.GetValue,SetValue, and override tracking mechanics to accurately resolve properties based on strict WPF hierarchical precedence rules.ThreadStatictraps during recursive layout evaluation to ensure deterministic thread safety.π Functional Impact: The framework now fully supports standard WPF-isomorphic style application, visual state modification, and accurate dependency property value resolution, significantly closing the gap for declarative XAML scenarios.
π¬ Verification Protocol:
Control).Stylecontaining aSetterand aTrigger.Stylesetter value correctly reflects in the property getter.Trigger, verify the active trigger supersedes the style setter, and ensure clearing the trigger correctly falls back to either the local override (if set) or the base style setter. All behaviors are validated inStyleTests.cs.PR created automatically by Jules for task 18247157550888493731 started by @tedd