Skip to content

Conversation

@SlimaneAmar
Copy link
Contributor

@SlimaneAmar SlimaneAmar commented Nov 12, 2025

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?

The legend format is not currently customizable

What is the new behavior (if this is a feature change)?
The legend is entirely customizable

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)

The method getBusLegendInfos has been removed from LabelProvider interface
Now SLD legends are managed in the SVGLegendWriter interface
See DefaultSVGLegendWriter class for usage

@SlimaneAmar SlimaneAmar requested a review from flo-dup November 12, 2025 16:58
Slimane AMAR added 3 commits November 13, 2025 10:24
Signed-off-by: Slimane AMAR <[email protected]>
Signed-off-by: Slimane AMAR <[email protected]>
@alicecaron alicecaron moved this from TODO to Waiting for review in Release 12/2025 Nov 24, 2025
Copy link
Member

@rolnico rolnico left a comment

Choose a reason for hiding this comment

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

Could you add some tests on SVGLegendWriter, to test it with another implementation than the default one?

Also, could you indicate the breaking changes? I see that at least the method getBusLegendInfos(VoltageLevelGraph graph) has been removed from the interface LabelProvider


legendRootElement.appendChild(gNode);

metadata.addBusLegendInfoMetadata(new GraphMetadata.BusLegendInfoMetadata(escapedIdNode));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now this metadata is specific to this writer only. Shouldn't this be in the API of SVGLegendWriter, in order to have this filled for all implementations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

@flo-dup flo-dup Dec 4, 2025

Choose a reason for hiding this comment

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

Finally removed as after investigating the BusLegendInfoMetadata is unused. Moreover, it's simply a list of svg ids, no additional information.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 4, 2025

@github-project-automation github-project-automation bot moved this from Waiting for review to Approved in Release 12/2025 Dec 4, 2025
@flo-dup flo-dup merged commit 4697877 into main Dec 4, 2025
8 checks passed
@flo-dup flo-dup deleted the add_legend_provider branch December 4, 2025 12:00
@github-project-automation github-project-automation bot moved this from Approved to Done in Release 12/2025 Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants