-
Notifications
You must be signed in to change notification settings - Fork 300
Description
Is your feature request related to a problem? Please describe.
Currently, when the description of a card is changed, the activity log only records the before and after states, without visually highlighting what has changed. This makes it difficult for users and collaborators to quickly understand the specific modifications, especially for long or complex descriptions.
Describe the solution you'd like
Introduce a visual diff-style output for card description changes in the activity log. The new format would:
- Show added lines in green.
- Show removed lines in red and striked-out.
- Highlight changed content within a line in a distinct color (e.g., blue or yellow).
- Render this diff output either in the activity feed UI or as part of the card history.
Sample Output:
- This line was removed
+ This line was added
! This part of the line changed
Where:
- Lines prefixed with '-' are removed (red)
- Lines prefixed with '+' are added (green)
- Changed content within a line is highlighted (e.g. blue/yellow)
Describe alternatives you've considered
- Relying on the current before/after text without diff formatting (less clear)
- Linking to external diff tools (less integrated)
Additional context
How and where to update the code:
- Backend: Update
lib/Activity/ActivityManager.php
to generate a diff between the old and new description whenSUBJECT_CARD_UPDATE_DESCRIPTION
is triggered. Consider using a PHP diff library (e.g.jfcherng/php-diff
) to produce the formatted diff. - Frontend: Update the card activity feed UI to render the diff output using appropriate colors/styles for added, removed, and changed content. CSS classes like
.diff-added
,.diff-removed
,.diff-changed
can be used. - Documentation: Add usage and example output to the developer guide for contributors.
Community Discussion
This feature aims to improve transparency and collaboration. Feedback and ideas from the community are encouraged before proceeding to implementation.