Closed mdworken closed 6 years ago
YES PLEASE.
I was trying to do this with the styleguide but just haven't had time (cf. #241) : https://github.com/rubyforgood/diaper/wiki/Styleguide
I'll add more if I can remember anything further
We should probably unify the font-awesome icons in our buttons as well. Some buttons have icons and others don't.
My recommendation, right now -- please discuss / pushback if you disagree:
btn-success
for button
/ a.btn
that save data to the database. Pair with an appropriate icon. (Is the floppy-disk "Save" still understood? Or should we do a checkmark or something?)btn-success
for button
/ a.btn
that upload data, paired with the standard upload icon: [|^]btn-danger
for button
/ a.btn
that are destructive / delete data / would be difficult to reverse. Pair with a trash icon for deletion, or an appropriate contextual icon otherwise. btn-primary
for button
/ a.btn
that patch/put/modify existing data in the database, or that do not change the database at all, but just advance a workflow. An icon can be used here if desired.btn-secondary
for button
/ a.btn
that cancels, aborts, clears or steps backwards in a workflow and ideally does not hit the database at all, explicitly. An icon can be used here if desired.Icons are mandatory for any buttons that use red or green (for colorblindness).
All button text should be a present-tense verb that clearly indicates the intent of the action. (Mostly, these should be intuitive). Should be a single word, though if you think there's a good case for multiple words, then feel free to bring it up for discussion.
btn-lg
size to have a large hit-target and be obvious. btn-md
, btn-sm
as necessaryThis looks like a good list to start on for evaluation
aaron@toph:~/Documents/Code/rails/diaper/app/views$ grep -lR btn *
We should cleanup the way we use buttons regarding edit, view, print, etc etc. Examples of things to fix: