Skip to content

chore(sld-visualisation): add state estimation SLD css classes#4077

Open
KoloMenek wants to merge 2 commits into
mainfrom
marutk/feat/handle_state_estimation_mode_sld_visualisation
Open

chore(sld-visualisation): add state estimation SLD css classes#4077
KoloMenek wants to merge 2 commits into
mainfrom
marutk/feat/handle_state_estimation_mode_sld_visualisation

Conversation

@KoloMenek

Copy link
Copy Markdown
Member

PR Summary

Signed-off-by: Kamil MARUT <kamil.marut@rte-france.com>
@KoloMenek KoloMenek requested a review from TheMaskedTurtle July 3, 2026 11:23
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds 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.

Changes

Diagram measurement text styling

Layer / File(s) Summary
Add measurement state text styles
src/components/grid-layout/cards/diagrams/diagram-styles.ts
New CSS rules style .sld-feeder-info text: black for valid, red for invalid, and bold for critical measurements.

Suggested reviewers: SlimaneAmar

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is just a placeholder header and doesn't describe the actual style changes. Replace the placeholder with a short summary of the added SLD measurement text styling for valid, invalid, and critical states.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the PR's main change: adding SLD visualisation CSS classes for state estimation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/components/grid-layout/cards/diagrams/diagram-styles.ts (1)

67-75: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use theme palette colors instead of hardcoded literals.

Every other rule in this divSingleLineDiagram block derives colors from theme (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

📥 Commits

Reviewing files that changed from the base of the PR and between ce8b8ef and 1de3323.

📒 Files selected for processing (1)
  • src/components/grid-layout/cards/diagrams/diagram-styles.ts

@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

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.

2 participants