Skip to content

Commit

Permalink
Merge pull request #95 from conveyal/dev
Browse files Browse the repository at this point in the history
v0.6.0
  • Loading branch information
trevorgerhardt authored Nov 28, 2016
2 parents c3b80eb + aeee8b8 commit 08ff877
Show file tree
Hide file tree
Showing 28 changed files with 462 additions and 180 deletions.
2 changes: 1 addition & 1 deletion configurations/default/settings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cloudfront: EJKZ46R7IC1BB
entries:
- src/index.js:assets/index.js
- src/containers/indianapolis/style.css:assets/index.css
- src/index.css:assets/index.css
env: development
flyle: true
s3bucket: taui
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
},
"homepage": "https://github.com/conveyal/taui",
"devDependencies": {
"mastarm": "^2.0.0",
"semantic-release": "^4.3.5"
"mastarm": "^3.0.0",
"semantic-release": "^6.3.2"
},
"dependencies": {
"@conveyal/woonerf": "^0.2.1",
"@conveyal/woonerf": "^0.3.1",
"browsochrones": "^0.9.1",
"color": "^0.11.1",
"debug": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {createAction} from 'redux-actions'
import fetch, {
incrementFetches as incrementWork,
decrementFetches as decrementWork
} from '@conveyal/woonerf/build/lib/fetch'
} from '@conveyal/woonerf/fetch'

import featureToLabel from '../utils/feature-to-label'
import {setKeyTo} from '../utils/hash'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
import lonlng from 'lonlng'
import React, {Component, PropTypes} from 'react'
import {connect} from 'react-redux'

import {
clearEnd,
clearIsochrone,
clearStart,
setBaseActive,
setComparisonActive,
updateDestination,
updateOrigin,
updateSelectedTimeCutoff
} from '../../actions'
import featureToLabel from '../../utils/feature-to-label'
import featureToLabel from '../utils/feature-to-label'
import Form from './form'
import Fullscreen from '../../components/fullscreen'
import Icon from '../../components/icon'
import Log from '../../components/log'
import Fullscreen from './fullscreen'
import Icon from './icon'
import Log from './log'
import Map from './map'
import messages from '../../utils/messages'
import RouteCard from '../../components/route-card'
import initializeBrowsochrones from '../../utils/initialize-browsochrones'
import messages from '../utils/messages'
import RouteCard from './route-card'
import initializeBrowsochrones from '../utils/initialize-browsochrones'

class Indianapolis extends Component {
export default class Application extends Component {
static propTypes = {
actionLog: PropTypes.arrayOf(PropTypes.object),
browsochrones: PropTypes.object.isRequired,
Expand Down Expand Up @@ -245,23 +234,3 @@ class Indianapolis extends Component {
)
}
}

function mapStateToProps (state, ownProps) {
return state
}

function mapDispatchToProps (dispatch, ownProps) {
return {
clearEnd: () => dispatch(clearEnd()),
clearIsochrone: () => dispatch(clearIsochrone()),
clearStart: () => dispatch(clearStart()),
initializeBrowsochrones: (actions) => dispatch(actions),
moveOrigin: (options) => dispatch(updateOrigin(options)),
moveDestination: (options) => dispatch(updateDestination(options)),
onTimeCutoffChange: (options) => dispatch(updateSelectedTimeCutoff(options)),
setBaseActive: () => dispatch(setBaseActive()),
setComparisonActive: () => dispatch(setComparisonActive())
}
}

export default connect(mapStateToProps, mapDispatchToProps)(Indianapolis)
14 changes: 0 additions & 14 deletions src/components/deep-equal.js

This file was deleted.

10 changes: 5 additions & 5 deletions src/containers/indianapolis/form.js → src/components/form.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Pure from '@conveyal/woonerf/components/pure'
import React from 'react'
import Geocoder from 'react-select-geocoder'

import DeepEqual from '../../components/deep-equal'
import featureToLabel from '../../utils/feature-to-label'
import {search} from '../../utils/mapbox-geocoder'
import messages from '../../utils/messages'
import featureToLabel from '../utils/feature-to-label'
import {search} from '../utils/mapbox-geocoder'
import messages from '../utils/messages'

export default class Form extends DeepEqual {
export default class Form extends Pure {
render () {
const {
geocoder,
Expand Down
11 changes: 6 additions & 5 deletions src/components/fullscreen/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Pure from '@conveyal/woonerf/components/pure'
import React from 'react'

import {pure} from '../deep-equal'

const Fullscreen = (props) => <div className='Fullscreen'>{props.children}</div>

export default pure(Fullscreen)
export default class Fullscreen extends Pure {
render () {
return <div className='Fullscreen'>{this.props.children}</div>
}
}
26 changes: 14 additions & 12 deletions src/components/icon.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import Pure from '@conveyal/woonerf/components/pure'
import React from 'react'

import {pure} from './deep-equal'
export default class Icon extends Pure {
render () {
const {
className = '',
type,
...props
} = this.props

const Icon = ({
className = '',
type,
...props
}) =>
<i
className={`fa fa-${type} fa-fw ${className}`}
{...props}
/>

export default pure(Icon)
return <i
className={`fa fa-${type} fa-fw ${className}`}
{...props}
/>
}
}
5 changes: 2 additions & 3 deletions src/components/log-item/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import Pure from '@conveyal/woonerf/components/pure'
import React, {PropTypes} from 'react'
import moment from 'moment'

import DeepEqual from '../deep-equal'

const format = 'HH:mm:ss'

export default class LogItem extends DeepEqual {
export default class LogItem extends Pure {
static propTypes = {
createdAt: PropTypes.object,
level: PropTypes.string,
Expand Down
4 changes: 2 additions & 2 deletions src/components/log/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Pure from '@conveyal/woonerf/components/pure'
import React, {PropTypes} from 'react'

import DeepEqual from '../deep-equal'
import LogItem from '../log-item'

export default class Log extends DeepEqual {
export default class Log extends Pure {
static propTypes = {
items: PropTypes.arrayOf(PropTypes.object).isRequired
};
Expand Down
27 changes: 14 additions & 13 deletions src/containers/indianapolis/map.js → src/components/map.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import Pure from '@conveyal/woonerf/components/pure'
import {Browser} from 'leaflet'
import {mapbox} from 'mapbox.js'
import React, {PropTypes} from 'react'
import {GeoJson, Map as LeafletMap, Marker, Popup, TileLayer, ZoomControl} from 'react-leaflet'

import DeepEqual from '../../components/deep-equal'
import Icon from '../../components/icon'
import messages from '../../utils/messages'
import TransitiveLayer from '../../components/transitive-map-layer'
import transitiveStyle from './transitive-style'
import Icon from './icon'
import leafletIcon from '../utils/leaflet-icons'
import messages from '../utils/messages'
import TransitiveLayer from './transitive-map-layer'
import transitiveStyle from '../transitive-style'

const startIcon = mapbox.marker.icon({
'marker-size': 'large',
'marker-symbol': 'star',
'marker-color': '#4269a4'
const startIcon = leafletIcon({
icon: 'play',
markerColor: 'darkblue'
})
const endIcon = mapbox.marker.icon({
'marker-color': '#ff8c00'

const endIcon = leafletIcon({
icon: 'stop',
markerColor: 'orange'
})

export default class Map extends DeepEqual {
export default class Map extends Pure {
static propTypes = {
centerCoordinates: PropTypes.arrayOf(PropTypes.number),
clearStartAndEnd: PropTypes.func.isRequired,
Expand Down
4 changes: 2 additions & 2 deletions src/components/route-card.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Pure from '@conveyal/woonerf/components/pure'
import Color from 'color'
import React from 'react'
import toCapitalCase from 'lodash.capitalize'
import toSpaceCase from 'lodash.lowercase'
import unique from 'lodash.uniq'

import DeepEqual from './deep-equal'
import Icon from './icon'
import messages from '../utils/messages'

export default class RouteCard extends DeepEqual {
export default class RouteCard extends Pure {
render () {
const {
active,
Expand Down
32 changes: 0 additions & 32 deletions src/components/timecutoff-select.js

This file was deleted.

33 changes: 33 additions & 0 deletions src/containers/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {connect} from 'react-redux'

import {
clearEnd,
clearIsochrone,
clearStart,
setBaseActive,
setComparisonActive,
updateDestination,
updateOrigin,
updateSelectedTimeCutoff
} from '../actions'
import Application from '../components/application'

function mapStateToProps (state, ownProps) {
return state
}

function mapDispatchToProps (dispatch, ownProps) {
return {
clearEnd: () => dispatch(clearEnd()),
clearIsochrone: () => dispatch(clearIsochrone()),
clearStart: () => dispatch(clearStart()),
initializeBrowsochrones: (actions) => dispatch(actions),
moveOrigin: (options) => dispatch(updateOrigin(options)),
moveDestination: (options) => dispatch(updateDestination(options)),
onTimeCutoffChange: (options) => dispatch(updateSelectedTimeCutoff(options)),
setBaseActive: () => dispatch(setBaseActive()),
setComparisonActive: () => dispatch(setComparisonActive())
}
}

export default connect(mapStateToProps, mapDispatchToProps)(Application)
1 change: 1 addition & 0 deletions src/containers/indianapolis/style.css → src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@import url(src/components/log/style.css);
@import url(src/components/log-item/style.css);
@import url(src/components/transitive-map-layer/style.css);
@import url(src/utils/leaflet-icons/index.css);

body {
font-size: 16px;
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import mount from '@conveyal/woonerf/build/lib/mount'
import mount from '@conveyal/woonerf/mount'

import Indianapolis from './containers/indianapolis'
import Application from './containers/application'
import reducers from './reducers'

mount({
app: Indianapolis,
app: Application,
reducers
})
2 changes: 1 addition & 1 deletion src/reducers/ui.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {DECREMENT_FETCH, INCREMENT_FETCH} from '@conveyal/woonerf/build/lib/fetch'
import {DECREMENT_FETCH, INCREMENT_FETCH} from '@conveyal/woonerf/fetch'
import {handleActions} from 'redux-actions'

export default handleActions({
Expand Down
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/utils/leaflet-icons/images/markers-plain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/utils/leaflet-icons/images/markers-shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/utils/leaflet-icons/images/markers-soft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 08ff877

Please sign in to comment.