Skip to content

Add VoltageLevelIcon component#1203

Open
flomillot wants to merge 7 commits into
mainfrom
voltage-level-icon
Open

Add VoltageLevelIcon component#1203
flomillot wants to merge 7 commits into
mainfrom
voltage-level-icon

Conversation

@flomillot

@flomillot flomillot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Overview

Add a VoltageLevelIcon (a "kV" voltage-level symbol) to the shared icon set, so apps can reuse it like the other symbol icons.

Add a VoltageLevelIcon (kV symbol) to the shared icon set, rendered
through the MUI SvgIcon API like the other symbol icons.

Signed-off-by: Florent MILLOT <florent.millot_externe@rte-france.com>
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f5f3103b-4d19-46a6-ba58-f6ea14fc6030

📥 Commits

Reviewing files that changed from the base of the PR and between a15516b and 5cb482c.

📒 Files selected for processing (2)
  • src/components/ui/icons/NominalVoltageIcon.tsx
  • src/components/ui/icons/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/ui/icons/index.ts

📝 Walkthrough

Walkthrough

Adds a new NominalVoltageIcon MUI SvgIcon wrapper around voltage-level.svg and re-exports it from src/components/ui/icons.

Changes

NominalVoltageIcon addition

Layer / File(s) Summary
Icon wrapper and barrel export
src/components/ui/icons/NominalVoltageIcon.tsx, src/components/ui/icons/index.ts
Defines NominalVoltageIcon as a SvgIcon wrapper for voltage-level.svg, forwards SvgIconProps, uses inheritViewBox, and re-exports it from the icons barrel.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change by announcing a new shared icon component.
Description check ✅ Passed The description is directly related to the icon addition and its reuse in the shared set.
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.

import { SvgIcon, type SvgIconProps } from '@mui/material';
import VoltageLevel from '../../../images/voltage-level.svg?react';

export function VoltageLevelIcon(props: SvgIconProps) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be NominalVoltageIcon ? Voltage levels are the plain equipments no ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the name our UX designer gave to this icon but I agree with you. I will change it.

flomillot and others added 2 commits June 26, 2026 15:41
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Florent MILLOT <florent.millot_externe@rte-france.com>
@TheMaskedTurtle TheMaskedTurtle self-assigned this Jul 3, 2026
@TheMaskedTurtle

Copy link
Copy Markdown
Contributor

VoltageUnitIcon maybe ? In terms of business, it does not make much sense with VoltageLevel or NominalVoltage, kV is just the electrical unit of a voltage

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 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.

3 participants