{"action":"created","issue":{"url":"https://api.github.com/repos/linuxmint/mint-y-theme/issues/34","repository_url":"https://api.github.com/repos/linuxmint/mint-y-theme","labels_url":"https://api.github.com/repos/linuxmint/mint-y-theme/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/linuxmint/mint-y-theme/issues/34/comments","events_url":"https://api.github.com/repos/linuxmint/mint-y-theme/issues/34/events","html_url":"https://github.com/linuxmint/mint-y-theme/pull/34","id":173901050,"number":34,"title":"A complete overhaul of the asset creation and build process","user":{"login":"ccprog","id":5325416,"avatar_url":"https://avatars.githubusercontent.com/u/5325416?v=3","gravatar_id":"","url":"https://api.github.com/users/ccprog","html_url":"https://github.com/ccprog","followers_url":"https://api.github.com/users/ccprog/followers","following_url":"https://api.github.com/users/ccprog/following{/other_user}","gists_url":"https://api.github.com/users/ccprog/gists{/gist_id}","starred_url":"https://api.github.com/users/ccprog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccprog/subscriptions","organizations_url":"https://api.github.com/users/ccprog/orgs","repos_url":"https://api.github.com/users/ccprog/repos","events_url":"https://api.github.com/users/ccprog/events{/privacy}","received_events_url":"https://api.github.com/users/ccprog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-30T00:06:07Z","updated_at":"2016-08-31T10:06:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/linuxmint/mint-y-theme/pulls/34","html_url":"https://github.com/linuxmint/mint-y-theme/pull/34","diff_url":"https://github.com/linuxmint/mint-y-theme/pull/34.diff","patch_url":"https://github.com/linuxmint/mint-y-theme/pull/34.patch"},"body":"I'll be the first to say that this pull request is an impertinence. It aims to make future design processes easier to manage, but accomplishes this by exchanging literally every file that has to do with the grafical assets.\r\n\r\nThe work I have done does not change any design aspect of the theme, but only concerns the technical infrastructure.\r\n\r\nCurrently, there are partial processes to produce asset files from sprite-like overview SVG files. But these files are in a disorderly state (from a technical standpoint) and if you want to change something, the best you can do is a search-and replace in a text editor to exchange one color for another.\r\n\r\nWhile it is not in widespread use for vector grafics, I think the principle of division of concerns that is well established for web design would be a clear benefit for structured groups of grafical elements like icon sets and the elements of a desktop theme.\r\n\r\nTherefore I introduce stylesheets as a means to discern between the structural descriptions of elements and their coloring. (While the SVG format defines a lot more attributes as \"style\", only colors and opacities lend themself well to a succinct distinction.) Furtheron, at least partially, the definition of grafical primitives and paths are done in a seperate part of the file to provide them for reuse in multiple elements - think a checkmark, or the circle that defines the circumference of a radio button.\r\n\r\nThis comes together in a workflow like this:\r\n\r\n* Draw the primitive components for the grafical assets, but void them of any style definitions (here: color and opacity)\r\n* Group clones (`<use>` elements) of these components together to form the individual assets\r\n* Group all assets and their components after the logic of their use, and appoint classes to make identification of related parts possible\r\n* Write a stylesheet (using Sass) to define colors and opacities for every component\r\n\r\nI have redrawn the existing GTK overview files and introduced new ones for the Cinnamon and XFWM parts. (There is even one for the Metacity part, but that has admittedly only a very minor benefit.)\r\n\r\nFor the next part, I have written a node.js tool [svg-icon-toolbox](https://www.npmjs.com/package/svg-icon-toolbox) that can\r\n* compile the Sass stylesheets to css and inject them into the SVG file,\r\n* distribute the styles from the sheet to direct style attributes of the respective elements,\r\n* export the individual asset elements to separate files, either in PNG or SVG format.\r\n\r\nThis last part may look like what the various `render-assets.sh` scripts do, but it is much faster, because of the asynchronous execution and especially the use of the `inkscape --shell` command.\r\n\r\nFinally, it seemed to me that introducing yet another tool into the build workflow is not really beneficial. So I bundled everything together with [Grunt](http://gruntjs.com), including the compilation of the main CSS files and the copying of the files to the theme folders.\r\n\r\nThe changes in the workflow drop dependencies to Ruby Sass and Python, and add dependencies to [nodejs](https://nodejs.org/) with a minimum version of 4.0, the [ImageMagick](http://www.imagemagick.org/script/convert.php) `convert` command and libsass. Inkscape and optipng remain needed.\r\n\r\nThe end result of my efforts is a project with several hundred changed files. I hope I have done a few things to explain what has happened why:\r\n\r\n1. All asset overview files have been redrawn, and several have been added. In the README.md files for every subdirectory I have described the class structure of these files, which SCSS files belong to them, and given hints how to edit.\r\n\r\n2. As an inevitable consequence, all individual asset files have changed. A pixel-perfect identity between files is an almost futile task. Instead, I try to document the amount and relevance of changes.  \r\nFirstly, only the asset files in the `src/` tree have been exchanged for now. Their counterparts in the `usr/share/themes/` tree are yet untouched to facilitate their comparison.  \r\nSecondly, there is a commit for every theme section that exchanges the asset files. If you look at these commits on github, you will find detailed analyses of the changes in the commit comment section:\r\n   - Cinnamon: https://github.com/ccprog/mint-y-theme/commit/0177c98e3c1230cefea6c831066c16824f765428\r\n   - GTK 2: https://github.com/ccprog/mint-y-theme/commit/5963bd2952a200a4fad20f46a90c601839db56e8\r\n   - GTK 3: https://github.com/ccprog/mint-y-theme/commit/5ac1c1ad707df7163ebe7854ce40e62a3e7f13fe\r\n   - XFWM4: https://github.com/ccprog/mint-y-theme/commit/e8e8879b10a621df980f7729c8e0635b83d03cf6\r\n\r\n3. Exchanging Ruby Sass for libsass has the unfortunate consequence that also the main CSS files change. Most of these changes are only formatting related, but it seems that Ruby Sass has a few optimization mechanisms that libsass has not. If you look at these two gists:\r\n   - https://gist.github.com/ccprog/83aa9a510bdd2c74608149fc2d0144bf\r\n   - https://gist.github.com/ccprog/b823a9d5356e9552533406b0e5c333af  \r\nyou will find the slimmed-down test cases of the differences. In short, in some cases Ruby Sass deletes selectors when it finds that they select a subset of another selector in the list for the same declaration.\r\n\r\n4. Looking at and comparing all the assets again and again meant that I have found some inconsistencies and errors that seem to have evaded spotting until now:\r\n   - GTK 2 `assets/toolbar.png` differs between the source and distribution folder.\r\n   - XFWM4 has a `menu-prelight.xpm` for the dark variant, but not for the light.\r\n   - under `usr/share/themes/Mint-Y-Dark/cinnamon/` are a few stray folders (`menu`,  `misc` and `panel`) that seem to have got there by a faulty copy action.\r\n  - `usr/share/themes/Mint-Y/xfwm4/` has three extra files `title-1-active-shaded`, `top-left-active-shaded` and `top-right-active-shaded` I don't know what to make of.\r\n   - https://github.com/ccprog/mint-y-theme/commit/65c468e032f19725cc97c10f2f2c8a92bde94c17 is a bugfix that would be needed independently of this request.\r\n "},"comment":{"url":"https://api.github.com/repos/linuxmint/mint-y-theme/issues/comments/243718953","html_url":"https://github.com/linuxmint/mint-y-theme/pull/34#issuecomment-243718953","issue_url":"https://api.github.com/repos/linuxmint/mint-y-theme/issues/34","id":243718953,"user":{"login":"JosephMcc","id":2231759,"avatar_url":"https://avatars.githubusercontent.com/u/2231759?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephMcc","html_url":"https://github.com/JosephMcc","followers_url":"https://api.github.com/users/JosephMcc/followers","following_url":"https://api.github.com/users/JosephMcc/following{/other_user}","gists_url":"https://api.github.com/users/JosephMcc/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephMcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephMcc/subscriptions","organizations_url":"https://api.github.com/users/JosephMcc/orgs","repos_url":"https://api.github.com/users/JosephMcc/repos","events_url":"https://api.github.com/users/JosephMcc/events{/privacy}","received_events_url":"https://api.github.com/users/JosephMcc/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T10:06:23Z","updated_at":"2016-08-31T10:06:23Z","body":"Ok, so I have to admit I'm not familiar with some of the tools and things that you are using here. For me personally to be interested in this I would need to know that there is some real benefit to it. So my first question would be, what does all of this add that benefits us now or moving forward?"}}
{"actor":{"display_login":"JosephMcc"}}