Skip to content

Commit

Permalink
Merge pull request #25 from DealerDirect/docs/developer-pain
Browse files Browse the repository at this point in the history
Adds developer pain.
  • Loading branch information
Potherca committed Mar 9, 2017
2 parents 91a732d + a33d5c7 commit ab585aa
Show file tree
Hide file tree
Showing 16 changed files with 3,296 additions and 19 deletions.
10 changes: 10 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ Postrel
Prince-Ramus
Saint-Exupery
Wadsworth
Rohn
Haruki
Murakami
Bukowski
Jalaluddin
Rumi
Brosnan
Evel
Abramovic
L'Engle
_

- ./definitions/README.md
Expand Down
6 changes: 1 addition & 5 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ <h1>That page does not seem to exist.</h1>

<ul>
{% for entry in entries %}
{% unless entry.url == '/404.html'
or entry.url == '/sitemap.xml'
or entry.url == '/robots.txt'
or entry.url contains "/assets/"
%}
{% unless entry.url == '/404.html' or entry.url == '/sitemap.xml' or entry.url == '/robots.txt' or entry.url contains "/assets/" %}
<li>
<a href="{{ entry.url }}">
{{ entry.url }}
Expand Down
3 changes: 1 addition & 2 deletions _includes/breadcrumb.lqd
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
{% capture next_prepender %}{{next_prepender}}/{{ splitted_url_parts[i] }}{% endcapture %}
{% for breadcrumb_page in site.pages %}

{% if current_breadcrumb_url == breadcrumb_page.url or
current_breadcrumb_md_url == breadcrumb_page.url %}
{% if current_breadcrumb_url == breadcrumb_page.url or current_breadcrumb_md_url == breadcrumb_page.url %}
{% capture breadcrumb_page_page_url_without_index_html %}{{ breadcrumb_page.url | remove: "index.html" }}{% endcapture %}
{% assign j = forLoopMaxInt | plus: 0 %}
<li class="breadcrumbs__item{% if i == j %} active{% endif %}">
Expand Down
3 changes: 2 additions & 1 deletion _includes/page-specific-css.lqd
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{% comment %}
Include any CSS file for the given URL
Include a CSS file for the given URL
{% endcomment %}
{% capture cache %}
{% assign parts = include.url | remove: ".html" |remove_first: '/' | split: "/" %}
{% assign slug = '' %}
{% assign tags = '' %}

{% for part in parts %}
{% assign part = part | slugify %}
Expand Down
28 changes: 28 additions & 0 deletions _includes/page-specific-js.lqd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% comment %}
Include a JS file for the given URL
{% endcomment %}
{% capture cache %}
{% assign parts = include.url | remove: ".html" |remove_first: '/' | split: "/" %}
{% assign slug = '' %}
{% assign tags = '' %}

{% for part in parts %}
{% assign part = part | slugify %}

{% if forloop.first == true %}
{% assign slug = slug | append: part %}
{% else %}
{% assign slug = slug | append: '-' | append: part %}
{% endif %}

{% assign filePath = slug | prepend: '/assets/js/' | append: '.js' %}

{% for static_file in site.static_files %}
{% if static_file.path == filePath %}
{% capture output %}
<script src="{{ filePath | prepend:site.baseurl }}"></script>{% endcapture %}
{% assign tags = tags | strip_newlines | append: output %}
{% endif %}
{% endfor %}
{% endfor %}
{% endcapture %}{% assign cache = nil %}{{ tags }}
2 changes: 2 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<!-- @TODO: link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" / -->
<link rel="stylesheet" media="all" href="https://pother.ca/CssBase/css/ribbon.css" />
<link rel="stylesheet" href="https://sindresorhus.com/github-markdown-css/github-markdown.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/font/octicons.min.css" media="all">
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/main.css" media="all">
{% include page-specific-css.lqd url=page.url %}
</head>
Expand Down Expand Up @@ -36,5 +37,6 @@
;
});
</script>
{% include page-specific-js.lqd url=page.url %}
</body>
</html>
33 changes: 32 additions & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
1. General Style
2. Javascript Zoom
3. Breadcrumbs
4. Print Styles
4. Helper Classes
5. Print Styles
*/

/********( CSS Introduction )**************************************************/
Expand Down Expand Up @@ -53,6 +54,11 @@ ol.breadcrumbs {
display: none;
}

/*=======( Helper Classes )===================================================*/
.hidden {
display: none;
}

/*=======( Print Styles )=====================================================*/
@media print {
.banner,
Expand All @@ -66,3 +72,28 @@ ol.breadcrumbs {
}

/********( EOF )***************************************************************/

/*=======( Table of Content )================================================*/
/*/ Adding 'Contents' headline to the TOC /*/
#table-of-contents
#markdown-toc::before {
content: "Contents";
font-weight: bold;
}

/*/ Using numbers instead of bullets for listing /*/
#table-of-contents + ul {
list-style: decimal;
}

#table-of-contents + ul ul {
list-style: upper-roman;
}


#markdown-toc {
border: 1px solid #aaa;
display: inline-block;
list-style: decimal;
padding: 1.5em;
}
41 changes: 41 additions & 0 deletions assets/css/protocols-estimating-developer-pain-criteria.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.criteria__help {
background: #ADF;
border: 1px solid #69B;
display: block;
padding: 1em;
text-align: center;
}

.criteria__help-icon {
background: #FFF;
border-radius: 100%;
color: #69b;
font-size: 1.5em;
line-height: 0.8em;
margin: 0 0.5em 0 0;
vertical-align: bottom;
width: 0.8em;
}

.criteria__selector {
cursor: pointer;
}

.criteria__selector:hover {
background-color: lightyellow;
}

.criteria__selector--selected,
.criteria__selector--selected:hover {
border-color: #69B;
background-color: #ADF;
}

/* Adding <input> selector to overwrite `.markdown-body input` from the GH style */
input.criteria__score {
font-size: 10em;
max-width: 100%;
text-align: center;
}

/*EOF*/
102 changes: 102 additions & 0 deletions assets/js/protocols-estimating-developer-pain-criteria.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
(function (Root, $) {

'use strict';

function addEventHandler(p_sSubject, p_oPoints, p_oCriteria, p_iCriteriaIndex) {
var sOpposite;

switch (p_sSubject) {
case 'upper':
sOpposite = 'lower';
break;
case 'lower':
sOpposite = 'upper';
break;
}

p_oCriteria[p_sSubject].addClass('criteria__selector criteria__selector--' + p_sSubject);

p_oCriteria[p_sSubject].on('click', function (/*p_oEvent*/) {
var iScoreIndex, iTotalScore, oScores, sScoreJson;

p_oCriteria[p_sSubject].addClass('criteria__selector--selected');
p_oCriteria[sOpposite].removeClass('criteria__selector--selected');

sScoreJson = $Score.attr('data-score');
oScores = JSON.parse(sScoreJson);

oScores[p_iCriteriaIndex] = p_oPoints[p_sSubject];

$Score.attr('data-score', JSON.stringify(oScores));

iTotalScore = 0;

for (iScoreIndex in oScores) {
if( oScores.hasOwnProperty(iScoreIndex)) {
iTotalScore += oScores[iScoreIndex];
}
}

$Score.val(Math.floor(iTotalScore) + '%');
});
}

function retrieveRows(p_iRowIndex, p_oRowElement) {

var oCriteria = {};

$(p_oRowElement).find('td').each(function (p_iCellIndex, p_oCellElement) {

var sKey;

switch (p_iCellIndex) {
case 0:
sKey = 'lower';
break;
case 1:
sKey = 'upper';
break;
case 2:
sKey = 'info';
break;
}

oCriteria[sKey] = $(p_oCellElement);
});

aCriteria.push(oCriteria);
}

function main (p_sTableSelector) {
var aCriteria = [], oPoints, $Help, $Score, $Table;

$Table = $(p_sTableSelector);

$Table.find('tbody tr').each(retrieveRows);

$Score = $('<input type="text" class="criteria__score" data-score="{}" readonly />');

$Help = $('<p class="criteria__help">' +
'<span class="octicon octicon-info criteria__help-icon"></span>' +
'To calculate the developer pain for a given issue, ' +
'please select the most appropriate cells in the table below.' +
'</p>'
);

$Score.insertBefore($Table.parent());
$Help.insertAfter($Score);

oPoints = {'lower': 10 / aCriteria.length, 'upper': 100 / aCriteria.length};

$.each(aCriteria, function (p_iCriteriaIndex, p_oCriteria) {
addEventHandler('lower', oPoints, p_oCriteria, p_iCriteriaIndex);
addEventHandler('upper', oPoints, p_oCriteria, p_iCriteriaIndex);

});
}

$('.criteria sup').addClass('hidden');

main('.protocols-estimating-developer-pain-criteria table');

})(document, jQuery);
8 changes: 4 additions & 4 deletions definitions/blocking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
permalink: /definitions/blocking/
---

# Definition of Blocking
# Definition of Blocking

> _“We don't purposely introduced bugs or anything, but this is kind of a natural
> _“We don't purposely introduced bugs or anything, but this is kind of a natural
> result of any complexities of software... that you can't fully test it.”_
> ~ Will Wright
![Definition of Blocking](../../images/definitions/definition-of-blocking.jpg)
![Definition of Blocking](../../images/definitions/definition-of-blocking.jpg)

An issue becomes blocking (thus gaining priority over all other issues) when any
of the following situations occur:
of the following situations occur:

1. All Consumers are unable to offer their vehicle via the website.
2. All Dealers are unable to place any bid on any of the lots.
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "MIT",
"dependencies": {
"alex": "^4.0.1",
"liquid-linter-cli": "^0.2.0",
"markdown-spellcheck": "^0.11.0",
"markdown-toc": "^1.1.0",
"remark-cli": "^2.1.0",
Expand All @@ -24,10 +25,11 @@
"scripts": {
"lint:alex": "alex .",
"lint:remark": "remark -f . --ignore-path '.gitignore'",
"lint:liquid": "find . -type f -regextype posix-extended -regex '.*\\.(html|lqd|md)' -not -path '*/\\.*' -not -path './node_modules/*' -not -path './_site/*' -print0 | xargs -0 -n1 liquid-linter",
"lint:spellcheck": "find . -type f -name '*.md' -not -path './CHANGELOG.md' -not -path './node_modules/*' -not -path './_site/*' -print0 | xargs -0 -n1 mdspell --report --en-us --ignore-numbers --ignore-acronyms",
"lint:spellcheck-interactive": "find . -type f -name '*.md' -not -path './node_modules/*' -print0 | xargs -0 -n1 mdspell --en-us --ignore-numbers --ignore-acronyms",
"lint": "npm run lint:alex && npm run lint:remark && npm run lint:spellcheck-interactive",
"test": "npm run lint:alex && npm run lint:remark && npm run lint:spellcheck"
"lint": "npm run lint:alex && npm run lint:remark && npm run lint:spellcheck-interactive && npm run lint:liquid",
"test": "npm run lint:alex && npm run lint:remark && npm run lint:spellcheck && npm run lint:liquid"
},
"repository": {
"type": "git",
Expand Down
3 changes: 3 additions & 0 deletions protocols/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Protocols are available for the following scenario's:
responsible for providing which deliverable during the software development
process.

- [Developer Pain](./estimating/developer-pain/) -- A way to estimate high-level
cost for a given issue or ticket.

- [Work Approach Checklist](./development-process/work-approach-checklist/) -- Outlines who is
responsible for providing which deliverable during the software development
process.

0 comments on commit ab585aa

Please sign in to comment.