iop-alliance / okh-search

A self-hostable, federated search for open source hardware
https://search.openknowhow.org
MIT License
10 stars 9 forks source link

Some projects listed under manifest authors name #20

Closed julianstirling closed 4 years ago

julianstirling commented 4 years ago

The poseidon project is showing up on the website with Andre's name not with the name in the manifest: "A. Sina Booeshaghi". This may be because the full contact detains for the contact are not filled out.

I think we should allow partial contact details or show the line blank. Otherwise it may look like we are taking credit for other people's project!

kasbah commented 4 years ago

Relevant code is:

https://github.com/OpenKnowHow/okh-search/blob/324c35af8c315c40645d3f9456e8224e0419879f/components/ProjectCard.js#L6-L10

(sorry for using experimental javascript with optional chaining -- I even had to add a compiler plugin to enable this and make the code less readable to the average developer -- I just find checking for null so tedious)

It checks for licensor then the first contributor and only then falls back on manifest-author. I think we should just make sure to include project-author or licensor when we author manifests. Having your name listed on a project that you didn't create can act as a badge of shame. :laughing:

julianstirling commented 4 years ago

~Well the name is filled out, just nothing else in that section..~ From the way the template is with "Contact" then "Contributors" people (including me) have been putting the main person in contact, and further people in contributors. I think it should be:

const author =
   project.licensor?.name || 
   project.contact?.name ||  
   project.contributors?.[0]?.name || 
   project['manifest-author']?.name || 
   ''

While we can call it a "badge of shame", I would remove the project['manifest-author']?.name || line as if you go to a website and see your project listed under someone else's name that is pretty negative marketing for OHK as it makes it look like we are taking ownership.

kasbah commented 4 years ago

Ok, let's do what you suggest.