Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace isNew with generic, filterable context #278

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

A library that generates an interactive radar, inspired by [thoughtworks.com/radar](http://thoughtworks.com/radar).

## Difference to original radar

The original radar has an isNew column. This radar has a context column, that will create a second line of buttons, allowing you to filter for specific context items. While the filter is active, the other elements are greyed out.

## Demo

You can see this in action at https://radar.thoughtworks.com. If you plug in [this data](https://docs.google.com/spreadsheets/d/18A7oDuavlh89rAmqcaXpqle8QLqIvlAkoEUxcObzuUM/edit#gid=1985253373) you'll see [this visualization](https://radar.thoughtworks.com/?sheetId=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F18A7oDuavlh89rAmqcaXpqle8QLqIvlAkoEUxcObzuUM%2Fedit%23gid%3D1985253373).
Expand All @@ -24,12 +28,12 @@ You need to make your data public in a form we can digest.

Create a Google Sheet. Give it at least the below column headers, and put in the content that you want:

| name | ring | quadrant | isNew | description |
| ------------- | ------ | ---------------------- | ----- | ------------------------------------------------------- |
| Composer | adopt | tools | TRUE | Although the idea of dependency management ... |
| Canary builds | trial | techniques | FALSE | Many projects have external code dependencies ... |
| Apache Kylin | assess | platforms | TRUE | Apache Kylin is an open source analytics solution ... |
| JSF | hold | languages & frameworks | FALSE | We continue to see teams run into trouble using JSF ... |
| name | ring | quadrant | context | description |
| ------------- | ------ | ---------------------- | -------- | ------------------------------------------------------- |
| Composer | adopt | tools | Software | Although the idea of dependency management ... |
| Canary builds | trial | techniques | DevOps | Many projects have external code dependencies ... |
| Apache Kylin | assess | platforms | Data | Apache Kylin is an open source analytics solution ... |
| JSF | hold | languages & frameworks | Software | We continue to see teams run into trouble using JSF ... |

### Sharing the sheet

Expand All @@ -47,11 +51,11 @@ For example, a [raw URL](https://raw.githubusercontent.com/thoughtworks/build-yo
The format is just the same as that of the Google Sheet, the example is as follows:

```
name,ring,quadrant,isNew,description
Composer,adopt,tools,TRUE,"Although the idea of dependency management ..."
Canary builds,trial,techniques,FALSE,"Many projects have external code dependencies ..."
Apache Kylin,assess,platforms,TRUE,"Apache Kylin is an open source analytics solution ..."
JSF,hold,languages & frameworks,FALSE,"We continue to see teams run into trouble using JSF ..."
name,ring,quadrant,context,description
Composer,adopt,tools,Software,"Although the idea of dependency management ..."
Canary builds,trial,techniques,DevOps,"Many projects have external code dependencies ..."
Apache Kylin,assess,platforms,Data,"Apache Kylin is an open source analytics solution ..."
JSF,hold,languages & frameworks,Software,"We continue to see teams run into trouble using JSF ..."
```

If you do not want to host the CSV file publicly, you can follow [these steps](#advanced-option---docker-image-with-a-csvjson-file-from-the-host-machine) to host the file locally on your BYOR docker instance itself.
Expand All @@ -73,28 +77,28 @@ An example:
"name": "Composer",
"ring": "adopt",
"quadrant": "tools",
"isNew": "TRUE",
"context": "Software",
"description": "Although the idea of dependency management ..."
},
{
"name": "Canary builds",
"ring": "trial",
"quadrant": "techniques",
"isNew": "FALSE",
"context": "DevOps",
"description": "Many projects have external code dependencies ..."
},
{
"name": "Apache Kylin",
"ring": "assess",
"quadrant": "platforms",
"isNew": "TRUE",
"context": "Data",
"description": "Apache Kylin is an open source analytics solution ..."
},
{
"name": "JSF",
"ring": "hold",
"quadrant": "languages & frameworks",
"isNew": "FALSE",
"context": "Software",
"description": "We continue to see teams run into trouble using JSF ..."
}
]
Expand Down
5 changes: 1 addition & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/end_to_end_tests/resources/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
"name": "Babel",
"ring": "adopt",
"quadrant": "tools",
"isNew": "TRUE",
"context": "Software",
"description": "test"
},
{
"name": "Apache Kafka",
"ring": "trial",
"quadrant": "languages & frameworks",
"isNew": "FALSE",
"context": "DevOps",
"description": "test"
},
{
"name": "Android-x86",
"ring": "assess",
"quadrant": "platforms",
"isNew": "TRUE",
"context": "Software",
"description": "test"
},
{
"name": "GrapCloud lift and shifthQL",
"ring": "hold",
"quadrant": "techniques",
"isNew": "FALSE",
"context": "Data",
"description": "test"
}
]
10 changes: 5 additions & 5 deletions spec/end_to_end_tests/resources/sheet.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name,ring,quadrant,isNew,description
Babel,adopt,tools,TRUE,test
Apache Kafka,trial,languages & frameworks,FALSE,test
Android-x86,assess,platforms,TRUE,test
Cloud lift and shift,hold,techniques,FALSE,test
name,ring,quadrant,context,description
Babel,adopt,tools,Software,test
Apache Kafka,trial,languages & frameworks,DevOps,test
Android-x86,assess,platforms,Software,test
Cloud lift and shift,hold,techniques,Data,test
4 changes: 2 additions & 2 deletions spec/models/blip-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ describe('Blip', function () {
it('is new', function () {
blip = new Blip('My Blip', new Ring('My Ring'), true)

expect(blip.isNew()).toBe(true)
expect(blip.context()).toBe(true)
})

it('is not new', function () {
blip = new Blip('My Blip', new Ring('My Ring'), false)

expect(blip.isNew()).toBe(false)
expect(blip.context()).toBe(false)
})
})
8 changes: 4 additions & 4 deletions spec/util/contentValidator-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const ExceptionMessages = require('../../src/util/exceptionMessages')
describe('ContentValidator', function () {
describe('verifyContent', function () {
it('does not return anything if content is valid', function () {
var columnNames = ['name', 'ring', 'quadrant', 'isNew', 'description']
var columnNames = ['name', 'ring', 'quadrant', 'context', 'description']
var contentValidator = new ContentValidator(columnNames)

expect(contentValidator.verifyContent()).not.toBeDefined()
Expand All @@ -23,7 +23,7 @@ describe('ContentValidator', function () {

describe('verifyHeaders', function () {
it('raises an error if one of the headers is empty', function () {
var columnNames = ['ring', 'quadrant', 'isNew', 'description']
var columnNames = ['ring', 'quadrant', 'context', 'description']
var contentValidator = new ContentValidator(columnNames)

expect(function () {
Expand All @@ -32,14 +32,14 @@ describe('ContentValidator', function () {
})

it('does not return anything if the all required headers are present', function () {
var columnNames = ['name', 'ring', 'quadrant', 'isNew', 'description']
var columnNames = ['name', 'ring', 'quadrant', 'context', 'description']
var contentValidator = new ContentValidator(columnNames)

expect(contentValidator.verifyHeaders()).not.toBeDefined()
})

it('does not care about white spaces in the headers', function () {
var columnNames = [' name', 'ring ', ' quadrant', 'isNew ', ' description ']
var columnNames = [' name', 'ring ', ' quadrant', 'context ', ' description ']
var contentValidator = new ContentValidator(columnNames)

expect(contentValidator.verifyHeaders()).not.toBeDefined()
Expand Down
10 changes: 5 additions & 5 deletions spec/util/inputSanitizer-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('InputSanitizer', function () {
description: description,
ring: '<a href="/asd">Adopt</a>',
quadrant: '<strong>techniques and tools</strong>',
isNew: 'true<br>',
context: 'Software<br>',
}

blip = sanitizer.sanitize(rawBlip)
Expand All @@ -26,7 +26,7 @@ describe('InputSanitizer', function () {
})

it('strips out all tags from blip status', function () {
expect(blip.isNew).toEqual('true')
expect(blip.context).toEqual('Software')
})

it('strips out all tags from blip ring', function () {
Expand All @@ -53,13 +53,13 @@ describe('Input Santizer for Protected sheet', function () {
var sanitizer, rawBlip, blip, header
beforeAll(function () {
sanitizer = new InputSanitizer()
header = ['name', 'quadrant', 'ring', 'isNew', 'description']
header = ['name', 'quadrant', 'ring', 'context', 'description']

rawBlip = [
"Hello <script>alert('dangerous');</script>there <h1>blip</h1>",
'<strong>techniques & tools</strong>',
"<a href='/asd'>Adopt</a>",
'true<br>',
'Software<br>',
"<b>Hello</b> <script>alert('dangerous');</script>there <h1>heading</h1>",
]

Expand All @@ -75,7 +75,7 @@ describe('Input Santizer for Protected sheet', function () {
})

it('strips out all tags from blip status', function () {
expect(blip.isNew).toEqual('true')
expect(blip.context).toEqual('Software')
})

it('strips out all tags from blip ring', function () {
Expand Down
Loading