chromium-dashboard
chromium-dashboard copied to clipboard
Highlight diffs in notification emails
Is your feature request related to a problem? Please describe. It can be hard to see what text changed in an update notification. The notifications contain old and new text for each field that changed, but the specific words that changed within those field values can be hard to spot.
Describe the solution you'd like We could use an HTML span with a pale red or green background to indicate words that changed.
In cases where the entire text has changed (or maybe over 50%) we can skip highlighting because it would not be too useful. We should try a few different thresholds to see how they work with realistic data.
This could be implemented with python's difflib. E.g.,
list(difflib.ndiff('hello there , how are you?'.split(), 'hey there , where are you?'.split())) ['- hello', '+ hey', ' there', ' ,', '- how', '+ where', ' are', ' you?']
Additional context Color alone should never be used to convey important information, so we should keep the Old and New labels.
Making it easier to see what changes will improve the quality of data coming out of Chrome Status. This would be as small change with a big impact.
can i work on it
Hey there! I can fix this issue easily. Please assign this to me.
If the issue is still unresolved, I would like to work on this.
I would like to work on this issue, can I work on it?
@jrobbins Can i work on this issue?
Hi @jrobbins As I see this is inactive, Can you please assign it to me? I am trying to contribute to the dashboard project for GSOC 2023
@jrobbins @DanielRyanSmith I would like to work on this. Can I use JavaScript/TypeScript instead of Python, considering it is for the web, and they are well-suited for the task.
@jrobbins & @DanielRyanSmith I would like to work on it. using difflib module we can write a function that will print the old and new text with highlighted changes using HTML spans with red background for deletions and green background for additions. It also considers a threshold for significant changes, beyond which the entire text is shown without highlighting. we can adjust the threshold value as needed to suit our requirements.
Hi @DanielRyanSmith @jrobbins I have proposed an initial draft for the issue by adding a highlight difference colour code function. I have completed the setup and working on the CLA , meanwhile could you provide me some feedback on my proposed function .
Proposed Solution #3682