[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task] Adjust icons to make pixel perfect #1613

Open
JimiC opened this issue Jun 1, 2018 · 41 comments
Open

[Task] Adjust icons to make pixel perfect #1613

JimiC opened this issue Jun 1, 2018 · 41 comments

Comments

@JimiC
Copy link
Member
JimiC commented Jun 1, 2018

As pointed out by @mpodciwinski, our icons aren't pixel perfect and it's about time to fix that.

A good reference about pixel perfect icon designing: https://www.youtube.com/watch?v=KYpVtDj-xQs

@JimiC JimiC added this to the Backlog milestone Jun 1, 2018
@JimiC JimiC mentioned this issue Jun 1, 2018
@mpodciwinski
Copy link

@JimiC it's sounds good for me.
I attach 2 folder samples Dropbox
Check with yourself, and write to me or see the differences before and after.

@JimiC
Copy link
Member Author
JimiC commented Jun 2, 2018

@mpodciwinski Because this is going to be a lengthy and time-consuming task, I suggest you better fork the repo and make a branch, that you will eventually use for a PR, add your suggested icons there and post the link here. It will be better to track the progress this way.

@JimiC
Copy link
Member Author
JimiC commented Jun 2, 2018

Looking at your icons I have the following requests:

  • The background icon MUST have a 2px margin from all sides, meaning if the artwork is a 32x32 canvas, the background icon must always be 28x28. Exception is made only for the opened folder backgound icon.
  • The background icon SHOULD be centered.
  • The overlaying icon MUST be no more than 21x21px and SHOULD always be placed on the right bottom corner with a 1px margin from right and bottom.

@mpodciwinski
Copy link
mpodciwinski commented Jun 2, 2018

@JimiC Ok, but now can you send me folder with examples? or write me how I can easily create own?it's help me a lot with create new icon.

You guidelines is not correct. I will describe them exactly tomorrow.

@JimiC
Copy link
Member Author
JimiC commented Jun 2, 2018

We have no folder with examples. All icons are in the icons folder.

@mpodciwinski
Copy link

I know, but how i want see how icon look in VsCode, must create folder (or file) with this extension. This is problematic.

@JimiC
Copy link
Member Author
JimiC commented Jun 2, 2018

Yeah. you see the examples generator is a legacy tool. I made it when we switched from PNG to SVG and at that time we didn't have implemented the language id support. So all the icons that are supported via a language highlighting extension will not show if the extension is not installed in vscode.

There is though a workaround by using the customization feature. This works if you follow these and these instructions.

@mpodciwinski
Copy link

Don't be angry for me, but i can not do this. It's too hard for me now. 😓
I just start with code, i am beginner. Before this, i was only designing, i still do this, but it's time learning something new. Meybe thats why i saw this not perfect icons. 😁

I would be grateful if you do this himself and publish.

@JimiC
Copy link
Member Author
JimiC commented Jun 2, 2018

I can help you further tomorrow.

@mpodciwinski
Copy link

Thank's ✌️

@JimiC
Copy link
Member Author
JimiC commented Jun 3, 2018

@mpodciwinski Turns out that examples-generator has a bug on Windows. Same bug was in wpilgenerator, I fixed that but forgot to do the same with the examples-generator It works on *nix OSes though. So I assume you are working on Windows (hench you working with Ai).

So until I get the fix in, you can start with the folders manually in vscode.

  • Create a folder named examples.
  • Under examples folder, create a folder using as name any value from the Folder Name column in the folders list.

The icon should show up.

Now if you want to test your icons simply replace the existing icon (make a backup first just in case) in the icons folder. Then start Launch Extension from the Debugger (F5) and open the examples folder in the new vscode instance that will pop-up.

@JimiC
Copy link
Member Author
JimiC commented Jun 3, 2018

If you have any link I can read or watch on why our guidelines aren't correct, I would appreciate it much.

@mpodciwinski
Copy link
mpodciwinski commented Jun 3, 2018

I attach a detailed description of creating pixel perfect icons.
The way I describes is based on Ai.

Pixel Perfect guidelines

  1. Global settings
    Before start create or modify icons, must correct set our artboard settings.
  • Keyboard increment:
    Set 1 px
    Preferences > General
    zrzut ekranu 2018-06-03 o 21 28 19
  • Units
    General and Stroke set to 1px
    Preferences > Units
    zrzut ekranu 2018-06-03 o 21 24 28
  • Guides & Grid
    Gridline and Subdivisions set to 1
    Preferences > Guides & Grid
    zrzut ekranu 2018-06-03 o 21 24 55
  1. Artboard
    Size 512 px x 608 px - this is very important!
    Color Mode: RGB
    Raster Effects: 72
    Preview Mode: Pixel
    And select Align New Object to Pixel Prid
    zrzut ekranu 2018-06-03 o 21 40 51

After create new artboard go to the Transform window and select both "Scale Strokes & Effects" and "Align to pixel grid"
zrzut ekranu 2018-06-03 o 21 43 37

  1. Create icons
  • First icons must be create in small version (otherwise, we will not get the Pixel perfect icons).
    Of course, we create icons in accordance with pixel perfect principles, i.e. without halfpixels, etc.
    zrzut ekranu 2018-06-03 o 21 55 02
  • Our space for design is 16px x 19px (it can not be more or less). But for the icon it is best to use max 14px width.
  • 1px or 2px it's max for line.
  • the best way to create circle wirhout fill is use 1px border to inside
  1. Resize icons to target size
    if we have finished designing the icon, we have to enlarge it now to 512px x 608px. (This size is exactly 16px x 19px if we enlarge our icon x5 times)
    How to do this?
    The simplest way will be to create a temporary rectangle (16x19) under our icon and enlarge its width to 512px. if we succeed, we remove the rectangle and our icon is magnified exactly 5 times.

  2. Template
    Created two files that will help us to create the rest:
    Just change the color and add a graphic element.
    Folder template
    Blank page 512x608

Enjoy! 😉

@mpodciwinski
Copy link
mpodciwinski commented Jun 3, 2018

@JimiC ok, give me a sign if you fix it and generate examples.
btw. I use both systems, Mac and Windows.

@mpodciwinski
Copy link
mpodciwinski commented Jun 4, 2018

@JimiC i did as you wrote:

Now if you want to test your icons simply replace the existing icon (make a backup first just in case) in >the icons folder. Then start Launch Extension from the Debugger (F5) and open the examples folder in >the new vscode instance that will pop-up.

but some errors appear to me Error screencast

2018-06-04_11h44_17

And when I preview the file's file it still leads to the installation folder.

Even i disable vscode-icons in vscode and launch extensions (F5) and choose VSCode Icons in "Preferences:File Icon Theme" then too nothing happens (icons dont shows up).

I'm doing something wrong?

@JimiC
Copy link
Member Author
JimiC commented Jun 4, 2018

That means that the project did not build. Try npm run build. If all goes well you will see a success message in console. Otherwise, post back any error message.

@mpodciwinski
Copy link

output from shell:

PS D:\Dropbox\Folder zespołu Inspect\Repo\github\vscode-icons> npm run build

> vscode-icons@7.23.0 prebuild D:\Dropbox\Folder zespołu Inspect\Repo\github\vscode-icons
> npm run lint && npm run test


> vscode-icons@7.23.0 lint D:\Dropbox\Folder zespołu Inspect\Repo\github\vscode-icons
> tslint -p .

'tslint' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vscode-icons@7.23.0 lint: `tslint -p .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vscode-icons@7.23.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mpodc\AppData\Roaming\npm-cache\_logs\2018-06-04T10_44_33_250Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vscode-icons@7.23.0 prebuild: `npm run lint && npm run test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vscode-icons@7.23.0 prebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mpodc\AppData\Roaming\npm-cache\_logs\2018-06-04T10_44_33_288Z-debug.log

I've installed all the recommended packages.

@JimiC
Copy link
Member Author
JimiC commented Jun 4, 2018

Delete node_modules folder and install the dependencies again via npm i. Something must have gone wrong in the first install.

@mpodciwinski
Copy link

It also fails.
If I try install npm i:

PS D:\Dropbox\Folder zespołu Inspect\Repo\github\vscode-icons> npm i

> vscode-icons@7.23.0 preinstall D:\Dropbox\Folder zespołu Inspect\Repo\github\vscode-icons
> git submodule update --init --recursive

fatal: 'submodule' appears to be a git command, but we were not
able to execute it. Maybe git-submodule is broken?
npm ERR! code ELIFECYCLE
npm ERR! errno 128
npm ERR! vscode-icons@7.23.0 preinstall: `git submodule update --init --recursive`
npm ERR! Exit status 128
npm ERR!
npm ERR! Failed at the vscode-icons@7.23.0 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mpodc\AppData\Roaming\npm-cache\_logs\2018-06-04T13_23_14_309Z-debug.log

@JimiC
Copy link
Member Author
JimiC commented Jun 4, 2018

You are in trouble. The Git installation seems busted.

@JimiC
Copy link
Member Author
JimiC commented Jun 4, 2018

Do me a favor and tell me what node -v and npm -v returns.

@mpodciwinski
Copy link

Maybe, but other project works correct with git.
I will reinstall Git and see what happens.

PS C:\Users\mpodc\Desktop\vscode-icons> node -v
v8.11.2
PS C:\Users\mpodc\Desktop\vscode-icons> npm -v
6.1.0
PS C:\Users\mpodc\Desktop\vscode-icons>

@JimiC
Copy link
Member Author
JimiC commented Jun 4, 2018

Node and npm looks good although we use Node 7.9.0 for the project to be inline with the node version vscode uses.

Can you perform git submodule update --init --recursive on the project directly?

@mpodciwinski
Copy link

Reinstal Git and still this same.
Yes, i try. 😢

@mpodciwinski
Copy link

I do not know if this is important, but I meant it as a "change" for files and I did not change anything there.
2018-06-04_16h01_13

@JimiC
Copy link
Member Author
JimiC commented Jun 4, 2018

You need to revert any changes. Make a copy of your changes first if you want to keep them (or stash them).

You should not change anything in the submodules folders.

@mpodciwinski
Copy link

I do not make any changes to the entire root, except changing the same svg files. These changes in the submodule it creates itself after typing npm i in console.

@JimiC
Copy link
Member Author
JimiC commented Jun 4, 2018

I'm at a loss here. I don't know how to help you further.

@mpodciwinski
Copy link

Thanks anyway, i give up too.
I will wait until you solve the problems you mentioned above. ✌️

@JimiC
Copy link
Member Author
JimiC commented Jun 4, 2018

Still, you will have to resolve the issue with npm install. Even fixing the bug, examples-generator is a submodule of the project.

@JimiC
Copy link
Member Author
JimiC commented Jun 6, 2018

@mpodciwinski I figured out your issue. It's a bug with npm 6.1.0 (npm/npm#20815).

Since some commits have been made to the project it's prudent to fetch those commits before you try the following workaround.

There are two ways to bypass the error:

  1. Downgrade npm to 5.10.0 by typing npm i -g npm@5.10.0.

or

  1. Remove the preinstall script from package.json and perform a manual git submodule update --init --recursive.

Then proceed with npm i as usual. In case of 2, revert the removal of the preinstall script.

P.S.: In case you install node 7.9.0 then upgrade npm to v5.10.0.

@mpodciwinski
Copy link

I did as you said, install node 7.9.0 and npm 5.10.0.

❯ node -v
v7.9.0
❯ npm -v
5.10.0

but still 😞

> vscode-icons@7.23.0 preinstall /Users/michal_mac/Dropbox/Folder zespołu Inspect/Repo/github/vscode-icons
> git submodule update --init --recursive


> nodegit@0.18.3 install /Users/michal_mac/Dropbox/Folder zespołu Inspect/Repo/github/vscode-icons/node_modules/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install

[nodegit] Running pre-install script
[nodegit] Configuring libssh2.
{ Error: spawn /bin/sh ENOENT
    at exports._errnoException (util.js:1050:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn /bin/sh',
  path: '/bin/sh',
  spawnargs:
   [ '-c',
     '/Users/michal_mac/Dropbox/Folder\\ zespołu\\ Inspect/Repo/github/vscode-icons/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/michal_mac/Dropbox/Folder\\ zespołu\\ Inspect/Repo/github/vscode-icons/node_modules/nodegit/vendor/openssl/openssl' ],
  cmd: '/Users/michal_mac/Dropbox/Folder\\ zespołu\\ Inspect/Repo/github/vscode-icons/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/michal_mac/Dropbox/Folder\\ zespołu\\ Inspect/Repo/github/vscode-icons/node_modules/nodegit/vendor/openssl/openssl' }

[nodegit] ERROR - Could not finish preinstall
{ Error: spawn /bin/sh ENOENT
    at exports._errnoException (util.js:1050:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn /bin/sh',
  path: '/bin/sh',
  spawnargs:
   [ '-c',
     '/Users/michal_mac/Dropbox/Folder\\ zespołu\\ Inspect/Repo/github/vscode-icons/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/michal_mac/Dropbox/Folder\\ zespołu\\ Inspect/Repo/github/vscode-icons/node_modules/nodegit/vendor/openssl/openssl' ],
  cmd: '/Users/michal_mac/Dropbox/Folder\\ zespołu\\ Inspect/Repo/github/vscode-icons/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/michal_mac/Dropbox/Folder\\ zespołu\\ Inspect/Repo/github/vscode-icons/node_modules/nodegit/vendor/openssl/openssl' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodegit@0.18.3 install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodegit@0.18.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/michal_mac/.npm/_logs/2018-06-09T15_52_34_852Z-debug.log

Even how i delete preinstall script. Still this same error.
I don't know why he installs this script as I removed it.

"preinstall": "git submodule update --init --recursive",

@JimiC
Copy link
Member Author
JimiC commented Jun 9, 2018

Since some commits have been made to the project it's prudent to fetch those commits before you try the following workaround.

@mpodciwinski
Copy link

I missed it.
Now it's works! 😄
Thanks!

@JimiC
Copy link
Member Author
JimiC commented Aug 13, 2018

@mpodciwinski Have you abandoned the task?

@mpodciwinski
Copy link

No, I'm still working. there is a lot to do.

@JimiC
Copy link
Member Author
JimiC commented Sep 25, 2018

Good to know.

@JimiC
Copy link
Member Author
JimiC commented Sep 28, 2018

@mpodciwinski FYI, you can update npm to 6.4+ as the bug with the submodule was fixed.

@KingDarBoja
Copy link
Member

Does this task still in progress? Because there is a option to make every icon pixel perfect for their current size (32x32) without having to rely on those steps. Just right click on the selection and select "Generate Pixel Perfect" and adobe Illustrator will automatically modify the svg sizes to make it fit the grid as stated by the guidelines.

Example with the default file icon:
image

@JimiC
Copy link
Member Author
JimiC commented Feb 20, 2019

Illustrator version?

@KingDarBoja
Copy link
Member

@JimiC Adobe Illustrator CC 2019 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants