|
|
Subscribe / Log in / New account

Git for design projects

By Nathan Willis
April 20, 2016

LGM

At Libre Graphics Meeting 2016 in London, Julien Deswaef presented a talk exploring how Git can aid graphic designers and other artists in their daily processes, as well as pinpointing Git's shortcomings for that user community. The crux of the issue is that, for Git to be useful for visual design, it would need to provide ways for users to inspect and compare changes to media files as media, not as raw data. That is, to provide "visual diff."

Deswaef talks to a lot of designers, and an increasing number are familiar with Git and GitHub (although they are not always clear on the distinction between the two), but they rarely take advantage of it. Most design applications today provide their own file versioning, but of a rather limiting form, such as simply saving multiple local copies of a project file with numbers tacked somewhere onto the file name. Essentially no design tools implement anything close to Git's more advanced features like branching, even though they would be just as useful for design as for code.

The question of how to convince designers to use modern version-control tools like Git has been brewing in the back of his mind for some time, Deswaef said. At LGM 2013 in Madrid, he reminded the audience, he had presented a demo of his first "design with Git" experiment, which provided a "visual diff" for SVG files kept in a Git repository. [Julien Deswaef] The goal was to make tracking changes in a graphics file as convenient as it is for text, and he implemented a variety of visualization options, getting positive responses from designers. But his efforts to get companies that provide Git services (like GitHub) interested in the tool proved fruitless.

Last year, he said, he found himself living in a new country and with excessive free time, so he revisited the question—first, by cataloging all of the similar work he could find that is already used by designers. Some designers work with "digital asset management" (DAM) systems, although "if you don't work in a 500-person company, you probably don't have access to one." Then there are the web-based software services. Some of the most popular are targeted at specific sub-disciplines, like InVision and Pics.io for interaction design. There is a service called Gravit that lets users fork and remix projects; ironically, it used to be open-source software, then it was taken proprietary. Another, LayerVault, went bankrupt. Its closest competitor, Pixelapse, is still around, but was purchased by Dropbox (which Pixelapse had used as its storage back-end) and has stopped receiving updates. Not that the loss is great, he added: Dropbox's idea of versioning is just appending numbers onto the name of the file.

In practice, though, the market leader is Adobe's cloud service, which he described as "Adobe Captive Cloud;" it is a Dropbox clone that comes built into Adobe's desktop applications. But even then, it is a terrible versioning tool, he said. For starters, it treats every file format other than Photoshop's PSD as an opaque binary, giving the user no previews or thumbnails. Worse still, as the fine print reveals, the service may look like a folder on your desktop, but it actually only retains copies of files for ten days, then it deletes them. "Who wants to access something they worked on more than ten days ago?" he joked. "Nobody, I guess."

But if it seems like the proprietary offerings are not serving designers well, the free-software world is not doing much better. Anecdotally, it seemed clear that many designers and other Git users store image and media files in GitHub, so Deswaef decided to get a clearer picture of how common the practice is. Using the site API, he spent several weeks querying public projects hosted on the site, retrieving each project's file listings and logging the file types in a database.

He sampled one percent of GitHub's available projects altogether: 500,000 projects (including forks), which contained about 130 million files. Of those, he said, about 12% are some form of media. More than half of the media files are PNG images, followed by JPEG and GIF at around 14% each. About 9% of the media files fell into the "other" category, which included everything from PDF to font files to audio to 3D formats like OBJ. What stood out, though, was that many of those media formats are directly viewable in browsers, but GitHub does not display them. For example, "GitHub likes to promote that people use it for font design," he said, pointing to the site's promotional material, "but it's not helping them." A few rather arbitrary formats are displayed directly. The site renders STL files (for 3D printing) to WebGL, but does not do the same for OBJ, which is five times more popular.

Alternative GitHub-like offerings such as GitLab offer the same story, but with the added drawback of not being nearly as popular of a service. Self-hosting a package like Gogs is a non-starter for most users who are not experienced with server administration. There is one free-software Git system familiar to many in the LGM community, he said: visualculture, which is the project-publishing front-end used by the non-profit Open Source Publishing (OSP) project, many members of which are long-time LGM presenters and active free-software developers. But visualculture is highly customized to tie into OSP's internal structure and release processes. While it provides visual display of many types of media, it omits other features like issue tracking, and Deswaef said he was unable to get anything more than the home page running on his own machine.

One might consider telling designers to use Git locally, he said, except that doing so with any sort of visual diff means providing a GUI front-end. And writing a usable desktop front-end for Git still seems to elude developers—although not for lack of trying. "There are as many Git GUIs as there are people upset about Git GUIs," he noted. A few standalone tools for "visual diffing" do exist, he said. P4Merge is freeware, and does not even come with an end-user license agreement (EULA), which is a whole other issue on it's own, he said. There is also webdiff, although it only presents side-by-side views of the changed file, which turns the diff process into more of a "can you spot the changes" puzzle than anything else.

He concluded by turning the questions back to the audience. "Where is my open-source Git desktop?" We have isolated web tools that need further polish, he continued; is that the future? Deswaef said he maintains a growing list of bookmarked projects that might prove helpful for designers who want to use Git. For most of the media files that GitHub cannot render directly in the browser, there is some open-source project that could provide a solution, such as three.js, a JavaScript library to transform OBJ and other 3D file formats into WebGL. But it remains up to GitHub or other services to deploy solutions of that nature.

In the question-and-answer period at the end of the session, one audience member asked if perhaps designers needed to be more open and embrace other kinds of software interfaces. Deswaef replied that he does not think giving up on visual diff is necessary. "There are a lot of people interested in this problem; big companies as well as small shops. But everyone is waiting for someone else to find the recipe that will fix the whole thing."

Eric Schrijver from OSP also spoke up, first concurring with Deswaef's assessment of the visualculture tool. "We have tried finding funds to do the work of un-tying it from us," he said, but without success. He then asked whether Git was truly a good fit for design projects, considering that the workflow of an artist or design team can be so variable, depending on the project and the participants. Deswaef replied that he did not think that was an impediment. "Git supports thousands of different workflows already," he said. Schrijver then asked whether it might be worth setting an attainable goal, like "let's implement media-file display in GitLab by LGM 2017."

Deswaef did not object to that idea, but he re-emphasized the importance of GitHub. The company has already done work to standardize project presentation, such as making Markdown-formatted README files the entry point, he said, and it has rolled in other features like GitHub pages, issues, and announcements. "What I want to see is something that you can set up for your project when you don't know in advance who you will be collaborating with." Realistically, a self-hosted solution likely does not fit that bill, given that so many designers already have trouble distinguishing between Git, the tool, and GitHub, the service.

Discussion on the subject continued well after the session was over, as one might expect at a free-software event filled with artists and designers. There is clearly a lot of room for improvement in how Git tools and services handle media files. Whether GitHub takes the hint or someone else from the free-software development community beats the company to the punch remains an open question.

[The author would like to thank Libre Graphics Meeting for travel assistance to London for LGM 2016.]

Index entries for this article
ConferenceLibre Graphics Meeting/2016


to post comments

Review Board

Posted Apr 21, 2016 13:29 UTC (Thu) by emorrp1 (guest, #99512) [Link] (1 responses)

Review Board 2.5 is open source and has a number of different visualisations for Reviewing Images which appears to implemented with client-side js. We haven't yet upgrade to this series, so I can't comment on how well it works beyond their online demo.

Review Board

Posted Apr 23, 2016 23:45 UTC (Sat) by xuv (guest, #108358) [Link]

Thx for this suggestion. Will look into it.

Git for design projects

Posted Apr 21, 2016 19:09 UTC (Thu) by iabervon (subscriber, #722) [Link]

I feel like the right thing to start with would be basic version control operations in the generic GtkFileChooserDialog (and the like in other toolkits). This at least lets designers get used to having tracked history and interacting with it in simple ways. After that, it becomes natural to want to produce the visual diff between two files that are related in a way that's known to the application.

At some point, you'd want a git desktop, when you're coordinating changes to multiple files you edit in different applications, but until you're used to creating a history when dealing with the only file you're working on, it's too abstract, and it's not part of your normal workflow, so it can't help but be unhelpful.

Git for design projects

Posted Apr 22, 2016 0:30 UTC (Fri) by dlang (guest, #313) [Link] (1 responses)

git lets you define custom programs to use to do the diff for file types. So the hooks are in git. The problem is the availability of tools that will take two media streams and show you the differences between them in a sane way (and then beyond that, integrating them into a nice GUI somewhere)

Git for design projects

Posted Apr 24, 2016 0:01 UTC (Sun) by xuv (guest, #108358) [Link]

Webdiff is a nice approach to this. It does basic image diffing, but it works well.

That's out of scope

Posted Apr 22, 2016 5:47 UTC (Fri) by ksandstr (guest, #60862) [Link] (2 responses)

No format is usefully diffable unless it's been designed from day 0 to be that. Even plaintext, being lines separated by newlines forming paragraphs separated by double newline, is subject to issues like paragraph-length diff segments due to reflowing; or per-word diffs that just have the same thing but over a sentence where words have been reordered. Source code, inasmuch as it follows a similar convention of blocks made out of lines, has the same problems.

That's to say: showing all the differences in a way that indicates what specific edits were made, rather than what the difference in their results is, requires that the editing history is recorded and that the editing primitives are such that the accumulating difference can be usefully displayed. Not only does this severely restrict the kinds of tooling that can be applied (e.g. doing away with per-pixel editing of bitmaps, and the destructive mode in general), but all of that is well outside the domain of version control -- especially the kind that only handles commits, directories, directory entries, and blobs.

The problem here is not "does git support this", even though there'll doubtlessly be many who'd have the wizards of git applied to their pet problems by cynically casting said problems as those of version control. Rather, it is why the "design project" tools don't store an edit history that's as diff/mergeable as plaintext and, using git as a VCS backend, provide a nice user interface for showing differences and conducting merges. That's a very hard problem even for something as seemingly simple as a photographic image.

In closing, let's not have a good thing killed by unbounded scope creep, okay?

That's out of scope

Posted Apr 23, 2016 23:58 UTC (Sat) by xuv (guest, #108358) [Link] (1 responses)

Totally agree with you that it would be better to have file formats designed to be diffable. Now, as you demonstrate it, even for code, the actual diffing used by Git has its limitations. There is some plain-text file formats for design files (sometimes XML-based) and there is diffing algorithms for XML. Now that does not mean it will make sense from a design point of view, but it's worth a try. There's also merge conflicts with just plain text code anyway.
The point here is not to change Git, but as others have done, to build tools on top of it. Would it kill Git? I doubt it.

That's out of scope

Posted Apr 24, 2016 10:12 UTC (Sun) by dlang (guest, #313) [Link]

in git-attributes you can set a custom dif/merge tool to be used for specific files. So if you have tools that can handle the format, git can be smarter about reporting the changes.

Git for design projects

Posted Apr 24, 2016 9:05 UTC (Sun) by ncm (guest, #165) [Link] (4 responses)

Even gitting libreoffice-writer is hard. I thought the .fodt ASCII format would be perfect to check into git, but it turns out that, for no apparent reason, each object is given an index number that is discarded and remade when the file is loaded, so that every line is different, between saves, even when you haven't changed anything. I filed a bug report that got marked "enhancement request", and has since been ignored.

Git for design projects

Posted Apr 24, 2016 17:09 UTC (Sun) by xuv (guest, #108358) [Link] (2 responses)

Interesting. Do you have a link to the bug report? Thx.

Git for design projects

Posted Apr 26, 2016 6:43 UTC (Tue) by ncm (guest, #165) [Link]

Sorry, not anymore. But search for "ncm". I think I only ever filed one bug against LO.

Git for design projects

Posted Apr 26, 2016 7:29 UTC (Tue) by ncm (guest, #165) [Link]

My request appears to have vanished, but bug 88298 reproduces it adequately.

Git for design projects

Posted Apr 24, 2016 21:42 UTC (Sun) by oever (guest, #987) [Link]

To solve the problems of ODF diffing, I started a project to normalize the ODF files. There are many possible variations in the way that ODF applications save ODF. Even when sticking with one implementation, there are points that change a lot.

The most clear example are automatic styles. ODF has named (common) styles and automatic styles. Automatic styles have names that are generated. Often the names are 'T1', 'T2', 'P1', 'P2', 'L1', 'L2', for text, paragraphs, and lists respectively. The numbers may change in a load/save cycle. The order of the elements can also change.

One way to improve on this is to derive the name from the content of the style.

1) normalize the XML of the style
2) serialize that XML and calculate a hash, e.g. sha1
3) use the initial part of the hash as the style name

That, and more normalization steps can be found in odfhistory.

https://gitlab.com/odfplugfest/odfhistory/

Git for design projects

Posted Apr 24, 2016 18:03 UTC (Sun) by stevem (subscriber, #1512) [Link]

I've been complaining about gerrit in a similar way - if you're making changes to graphics, it doesn't even show you the two graphics side by side for you to have a chance to compare.

I'd love to be told about a plugin that does this!


Copyright © 2016, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds