Skip to content

[WIP]display CSV files in table format

username-removed-121470 requested to merge bengood/gitlab-ce:csv-view into master

What

  • Display CSV files in table format. See screenshot below
  • Display diffs of CSV files in a tabular format. See screenshot below

browse_file

Commit_View

Why

git can be a great place to store small data for collaborative editing or because the data is closely related to a git repository and needs to be revision controlled with the rest of the project.

How

This merge request adds the daff gem from https://github.com/paulfitz/daff. Daff performs the diff and also renders the diff in an HTML table format which complies with this standard http://dataprotocols.org/tabular-diff-format/

The blob view is also updated to show csv files in table format.

todo

  • display CSV files in a table
  • display daff highlighted table diffs for CSV commits
  • add a selector switch on the commit page to allow CSV commits to be displayed as regular text diffs
  • detect large commits and don't show them by default but allow the user to run the diff if desired
  • Allow expanding tabular diffs to show the whole file including areas with no changes.

Merge request reports