nextcloud / nextcloud/deck

Feature request: Visual diff-style output for card description changes

Open
#7,201 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
1.4k
Forks
354
Avg merge
1d 10h
Merged PRs (30d)
43

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 when SUBJECT_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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/Activity/ActivityManager.php and trace the handling of SUBJECT_CARD_UPDATE_DESCRIPTION, then locate the card activity feed UI that renders the resulting history. Determine how the old and new descriptions should be diffed and styled, including added, removed, and changed content. Done means the activity log displays the requested visual diff and the developer guide includes usage and example output.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
backend, frontend, full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.