Artemis icon indicating copy to clipboard operation
Artemis copied to clipboard

`Programming exercises`: Fix git-diff gutter width being too narrow for large files

Open Hialus opened this issue 2 years ago • 0 comments

Checklist

General

Client

  • [x] I followed the coding and design guidelines and ensured that the layout is responsive.
  • [x] Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • [x] I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • [x] I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • [x] I documented the TypeScript code using JSDoc style.
  • [x] I added multiple screenshots/screencasts of my UI changes.
  • [x] I translated all newly inserted strings into English and German.

Motivation and Context

On the live server I noticed that the line counter for the git-diff view was sometimes completely wrong and only displayed a single number like "9" for every line.

Description

This was caused by the gutter being too narrow and therefore only displaying the first number of the line counter (e.g. 9 for 92 and 1 for 120). This was in turn caused by an unnecessary addition, which I removed.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Programming Exercise
  1. Log in to Artemis
  2. You need to create a long file in the programming exercise template and solution repos with the only changes between the two being in the double- or triple-digit range
  3. Check that the git-diff view has the correct line numbers for this file.

Review Progress

Code Review

  • [x] Review 1
  • [x] Review 2

Manual Tests

  • [x] Test 1
  • [x] Test 2

Test Coverage

Unchanged

Hialus avatar Sep 18 '22 12:09 Hialus