Skip to content

feat(report): add diff library to improve comparison feature#24

Merged
rieckpil merged 4 commits intoPragmaTech-GmbH:mainfrom
dberna2:feat/update-detailed-comparison
Sep 18, 2025
Merged

feat(report): add diff library to improve comparison feature#24
rieckpil merged 4 commits intoPragmaTech-GmbH:mainfrom
dberna2:feat/update-detailed-comparison

Conversation

@dberna2
Copy link
Copy Markdown
Contributor

@dberna2 dberna2 commented Sep 11, 2025

The default visual representation in the Detailed Comparison section is not very intuitive for visually identifying differences between contexts.

This change introduces the use of the diff library to provide a clearer visualization, highlighting which values have been added, removed, or modified. The goal is to make comparing the contents of both contexts simpler and more straightforward.

Current visualization

image

Proposed visualization

image

@dberna2 dberna2 marked this pull request as draft September 11, 2025 19:16
@dberna2 dberna2 marked this pull request as ready for review September 11, 2025 19:24
@rieckpil
Copy link
Copy Markdown
Contributor

that looks excellent, @dberna2! I'll review it today 💯

Copy link
Copy Markdown
Contributor

@rieckpil rieckpil left a comment

Choose a reason for hiding this comment

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

Neat library, thanks for the hint 🚀

I've cloned your fork and used your branch to test it with ./renderReport.sh(in the root of the repo to quickly generate the report).

Somehow the comparison for the activeProfiles is off:

image

To replicate, use the mentioned script and compare context-0 with context-2 and check the difference in the profiles.

I'd assume the the difftool to only highlight the integration profile as the difference.

Can you check what's going wrong there?

@dberna2
Copy link
Copy Markdown
Contributor Author

dberna2 commented Sep 15, 2025

I found the issue, I'm working on it and will update the PR as soon as I can 🙂

@sonarqubecloud
Copy link
Copy Markdown

@dberna2
Copy link
Copy Markdown
Contributor Author

dberna2 commented Sep 17, 2025

Hi @rieckpil!
I’ve fixed the bug in the text diff rendering.
When you have a chance, please check the updated report and confirm if it solves the issue on your side. 🙂

Note:
I’ve refactored the way the HTML is rendered for the context comparison.
Instead of rendering each side separately, both contexts are now rendered together so that differences are aligned on the same line as their corresponding property.

@rieckpil
Copy link
Copy Markdown
Contributor

@dberna2 excellent work! I've just tested it locally and really like it.

Thanks a lot for this great feature update 👍

image

@rieckpil rieckpil merged commit b687627 into PragmaTech-GmbH:main Sep 18, 2025
1 check passed
@dberna2 dberna2 deleted the feat/update-detailed-comparison branch September 18, 2025 06:54
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