Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

On the fly badge #3

Closed
wants to merge 5 commits into from
Closed

On the fly badge #3

wants to merge 5 commits into from

Conversation

nguyenph88
Copy link
Contributor

thanks for the useful badge snippet :) Really love it! Hope I could help with the on the fly badges. I'm new to NodeJs and not good at coding so apologize for the messy code. Feel free to make any changes and let me know what I need to change. Thanks :)

@hiendv
Copy link
Owner

hiendv commented Aug 26, 2016

Hi @nguyenph88
First of all, thank you for your kind words and contributions.
Since the PR causes a breaking change, it took me a while to review all of these things. I think we should break your PR into two smaller ones. One allows hireable to switch between styles (with or without on-the-fly badges). One is for "on-the-fly" badges.

Styles

Let's talk about the customization. I agree that hireable should not be opinionated. Shields offers a variety of styles and colors, but in my opinion, we don't need such verbosity.

  1. When it comes to aesthetics, people usually have trouble with design, especially contrast.
  2. It takes considerable effort to have a beautiful set of badges.
  3. How about multiple styles?
  4. How to share your style?

So instead, I propose a structure for opt-in styles. E.g.

/styles
    /default
        yes.svg
        no.svg
        error.svg
    /flat-squared
        yes.svg
        no.svg
        error.svg
    ...

The only thing to be configured is the name of the style. If you have a beautiful set to share, just upload it ! What do you think?

On-the-fly badges

  • By "on-the-fly" badge I mean an implementation of badges/shields specs, not some kind of relay to http://img.shields.io. I want to make hireable independent from shields.io API.
  • Downloading images from shields.io may also waste of bandwidth and increase load-time. Your PR actually lacks existence image checking.

I would expect something:

  • Uses the above style structure with a small modification.
/styles
    default.json
    flat-squared.json
    ...
    # No pre-generated images at all

A style may look like this

{
  "name":"default",
  "style":"flat",
  "key":{
    "text":"hireable",
    "color":"#555"
  },
  "value":{
    "error":{
      "text":"error",
      "color":"#9f9f9f"
    },
    "yes":{
      "text":"yes",
      "color":"#97ca00"
    },
    "no":{
      "text":"no",
      "color":"#fbb034"
    }
  }
}

I would love to hear your thoughts on this.

@hiendv
Copy link
Owner

hiendv commented Aug 26, 2016

One more thing, you should directly fork our repo next time instead of another fork and forget about .bak files, git bless you 😆

@nguyenph88
Copy link
Contributor Author

nguyenph88 commented Aug 29, 2016

oh hey @hiendv, thank you so much for looking at my PR and share some useful information. My apologies that i could not get back on this earlier since I was out of town last week. Will definitely take a look at your comment and see what i can do for now - or later. I current have a full list of tasks that need to be done soon, but I really love this project and would love to contribute more so i can learn, at least from you.

Btw, .bak files were left on purpose since I respect other's work and do not usually remove their assets.

PS: it's hard to find such talent like you. Let keep in touch, perhaps for smaller projects that I have. Can I please have your email address? (or just send me an email, mine is on my profile)

@hiendv
Copy link
Owner

hiendv commented Aug 30, 2016

Your reply is wonderfully supportive and motivating, @nguyenph88. I couldn't blame you for your PR. It's completely my fault for the lack of a roadmap for Hireable and incomplete features. It's a side project, feel free to come back whenever it's convenient for you.
Back in the day, I did leave these .bak files for the same reason but I realized version control systems like Git actually help.
I'm not an exceptional developer, I'm just a CS student who is always curious about web development 😄. I also write (Articles are in Vietnamese, English versions will come soon).
You can write me an email: neo.go.vn[at]gmail.com or DM me anytime.
Thank you, once again.

@nguyenph88
Copy link
Contributor Author

let's closed this, outdated and lack of flexibility.

@nguyenph88 nguyenph88 closed this Sep 1, 2016
@hiendv hiendv mentioned this pull request Sep 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants