Skip to content

Introduce an ID provider for SGVs#774

Open
rolnico wants to merge 12 commits intomainfrom
sld_id_provider
Open

Introduce an ID provider for SGVs#774
rolnico wants to merge 12 commits intomainfrom
sld_id_provider

Conversation

@rolnico
Copy link
Copy Markdown
Member

@rolnico rolnico commented Jan 20, 2026

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?
No

What kind of change does this PR introduce?
Feature

What is the current behavior?
In SLD, the ids used in the SVGs are created by prepending the network element ids with id and by replacing non-alphanumeric characters with their unicode value.

What is the new behavior (if this is a feature change)?
An IdProvider can now be given to the draw methods to specify how the ids should be generated.
Default behavior is still the same, using LegacyIdProvider. A new IdProvider is also available, it works as in NAD and generates the ids by counting the elements.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

flo-dup and others added 4 commits January 14, 2026 16:08
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
@rolnico rolnico self-assigned this Jan 20, 2026
@rolnico rolnico marked this pull request as draft January 20, 2026 16:57
@rolnico rolnico moved this from TODO to In Progress in Release 03/2026 Jan 29, 2026
@alicecaron alicecaron linked an issue Jan 29, 2026 that may be closed by this pull request
@sonarqubecloud
Copy link
Copy Markdown

@rolnico rolnico requested a review from flo-dup February 10, 2026 16:26
@rolnico rolnico marked this pull request as ready for review February 10, 2026 16:26
@alicecaron alicecaron moved this from TODO to Waiting for review in Release 06/2026 Apr 10, 2026
if (subComponents != null && !subComponents.isEmpty()) {
Element group = document.createElement(GROUP);
group.setAttribute("id", c);
group.setAttribute("id", c); // TODO: check here
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

todo to solve? what needs to be checked?

drawVoltageLevel(network, voltageLevelId, svgFile, new SldParameters());
}

public static void drawVoltageLevel(Network network, String voltageLevelId, Path svgFile, IdProvider idProvider) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

method is not tested

rolnico added 6 commits April 13, 2026 11:30
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
…eDiagramTest`

Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Waiting for review

Development

Successfully merging this pull request may close these issues.

add mRIDs in NAD to enable interactivity

3 participants