chore(sld-visualisation): add state estimation SLD css classes#4077
chore(sld-visualisation): add state estimation SLD css classes#4077KoloMenek wants to merge 2 commits into
Conversation
Signed-off-by: Kamil MARUT <kamil.marut@rte-france.com>
📝 WalkthroughWalkthroughAdds three CSS selector rules to the divSingleLineDiagram style object in diagram-styles.ts, styling sld-feeder-info measurement text based on state: black for valid, red for invalid, and bold for critical measurements. ChangesDiagram measurement text styling
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/grid-layout/cards/diagrams/diagram-styles.ts (1)
67-75: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse theme palette colors instead of hardcoded literals.
Every other rule in this
divSingleLineDiagramblock derives colors fromtheme(e.g.theme.palette.text.primary), but these new rules hardcode'black'/'red'. This breaks theming consistency and won't adapt to dark mode or custom palette overrides.♻️ Proposed fix
'& .sld-feeder-info.sld-measurement-valid text': { - fill: 'black', + fill: theme.palette.text.primary, }, '& .sld-feeder-info.sld-measurement-invalid text': { - fill: 'red', + fill: theme.palette.error.main, },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/grid-layout/cards/diagrams/diagram-styles.ts` around lines 67 - 75, The new measurement-state styles in divSingleLineDiagram use hardcoded color literals instead of the theme, which breaks palette consistency. Update the '& .sld-feeder-info.sld-measurement-valid text' and '& .sld-feeder-info.sld-measurement-invalid text' rules in diagram-styles.ts to derive their fill values from theme.palette entries, matching the rest of the block’s theme-based styling. Keep the existing fontWeight rule for the critical state, and use the same theme object already available in this style definition.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/components/grid-layout/cards/diagrams/diagram-styles.ts`:
- Around line 67-75: The new measurement-state styles in divSingleLineDiagram
use hardcoded color literals instead of the theme, which breaks palette
consistency. Update the '& .sld-feeder-info.sld-measurement-valid text' and '&
.sld-feeder-info.sld-measurement-invalid text' rules in diagram-styles.ts to
derive their fill values from theme.palette entries, matching the rest of the
block’s theme-based styling. Keep the existing fontWeight rule for the critical
state, and use the same theme object already available in this style definition.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b85844af-7036-4b8b-8f08-c80f48cf5623
📒 Files selected for processing (1)
src/components/grid-layout/cards/diagrams/diagram-styles.ts
|



PR Summary