npm / npme-installer

npm Enterprise installer
https://www.npmjs.com/enterprise
Other
35 stars 21 forks source link

Add support for custom Logo per library using metadata in package.json #112

Open marcellodesales opened 8 years ago

marcellodesales commented 8 years ago

Hi there,

We've finally finished deploying NPM Onsite and we'd like to add the support for personalized icons for our own modules while they are listed in the website.

Requirement

  "logo": "https://cldup.com/Rg6WLgqccB.svg"

That would result in displaying a custom logo from the given PATH, whatever the protocol is (if possible supporting file-path relative to the package.json).

So, Instead of showing

screen shot 2016-01-12 at 12 22 45 pm

We could show the regular icons like

alt text

The locations where it would be great to see the icon are:

For an Enterprise, this is important to help engineers distinguish their @scope/package Modules from others.

Update Jan-14-2016

@bcoe suggests to use https://developer.chrome.com/apps/manifest/icons format:

  "logo": { 
    "16": "icon16.png",
    "48": "icon48.png",
    "128": "icon128.png" 
  },
bcoe commented 8 years ago

@marcellodesales I'm really excited about this idea, and was having a discussion about this feature early in the week with @stubbornella.

Can't promise a timeline, but this is pretty high up on the team's current roadmap.

bcoe commented 8 years ago

@marcellodesales how do you feel about this spec for icons, could we copy it? do you have other ideas?

https://developer.chrome.com/apps/manifest/icons

marcellodesales commented 8 years ago

@bcoe Thanks a lot for considering this feature!!! That's definitely needed in our Enterprise, but I'm sure the Open-source community would love to see their own icons displayed in the registry!

In regards to the Chrome's manifest, that's definitely a great design!!! That way, you can adjust how you display the different icons properly! :+1:

marcellodesales commented 8 years ago

@bcoe Do you want change the metadata to icons or maintain logo?

kevinSuttle commented 8 years ago

@marcellodesales @bcoe I've been looking into this as well, and it turns out packages already support it, though it's more of a grassroots convention. There is also some distinction between logo and icon covered in this thread.

See "Software package icons" section. https://github.com/schemaorg/schemaorg/issues/939

marcellodesales commented 8 years ago

So, @kevinSuttle I like the distinction made at http://www.pixelresort.com/blog/icons-and-logos-are-not-the-same/...

@bcoe Shouldn't we provide support for both? I mean, the mixed size of icon is important of where to display:

  "logo": "http://my-logo.images.com/mylogo.png",
  "icons": { 
    "16": "icon-16.png",
    "48": "icon-48.png"
  },

The logo should be displayed on top of the page. Something you guys already do with the packages with the logos...

screen shot 2016-01-20 at 12 36 38 am

@kevinSuttle Is this something you're looking for?

kevinSuttle commented 8 years ago

@marcellodesales Yes.

bcoe commented 8 years ago

@kevinSuttle @marcellodesales how do folks feel about this convention:

https://developer.chrome.com/apps/manifest/icons

I thought it might be good prior art to imitate.

kevinSuttle commented 8 years ago

I added that Chrome link and https://developer.mozilla.org/en-US/Apps/Build/Manifest#icons to the original issue on Schema.org.

However, I do think it's a bigger discussion that needs to happen. Wondering where the best place for that would be. I feel like here is it for now? https://github.com/schemaorg/schemaorg/issues/939

bcoe commented 8 years ago

@kevinSuttle seems like the discussion on https://github.com/schemaorg/schemaorg/issues/939 is a good place, I will loop a few of our web folks in on this.

kevinSuttle commented 8 years ago

:+1:

marcellodesales commented 8 years ago

@bcoe @kevinSuttle the W3C Web App Manifest (Working Draft 27 January 2016) includes the Icons section... https://www.w3.org/TR/appmanifest/#example-manifest...

kevinSuttle commented 8 years ago

@marcellodesales Nice!

marcellodesales commented 8 years ago

This PR https://github.com/npm/npm-explicit-installs/pull/12 is actually working on the NPMO docker install... Looks promising!