Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 23,809
    • Issues 23,809
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 856
    • Merge Requests 856
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • Container Registry
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #38094

Closed
Open
Opened Dec 04, 2019 by John Hope@johnhope🗽
  • Report abuse
  • New issue
Report abuse New issue

Adding/Removing new lines doesn't show in description diffs

Summary

Description diffs don't currently show addition or removal of newline characters.

image

This could lead to a confusing situation where a change only adding newlines would create a system note with nothing highlighted in the diff.

Context: #10103 (comment 246564553)

Steps to reproduce

  1. Visit an issue in a project with description diffs enabled (e.g. https://gitlab.com/gitlab-org/gitlab/issues)
  2. Edit issue description to only add/remove new lines
  3. Expand the new system note and observe the diff

Example Project

#38094 (this issue!)

What is the expected correct behavior?

Newline characters should be highlighted in green or red in the diff.

Possible fixes

Diffs are generated by storing the whole description using Rails' description_before_last_save method, so it's likely this is to do with rendering new lines in the system note diffs.

Edited Dec 04, 2019 by John Hope

Related issues

  • Discussion
  • Designs
Assignee
Assign to
12.7
Milestone
12.7
Assign milestone
Time tracking
None
Due date
None
8
Labels
Accepting merge requests P3 S3 bug devops::plan frontend group::certify workflow::planning breakdown
Assign labels
  • View project labels
Reference: gitlab-org/gitlab#38094