-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#35: create index, help and reducers files
create index File for the visualization with all Components and Imports, create the empty Help File and define config props and data actions handler in reducers
- Loading branch information
1 parent
64225f3
commit e68c557
Showing
5 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use strict'; | ||
|
||
import cx from 'classnames'; | ||
import styles from './styles.scss'; | ||
|
||
export default () => ( | ||
<div className={cx('box', styles.help)}> | ||
<h1 className="title">File Evolution Help</h1> | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
|
||
import ChartComponent from './chart'; | ||
import ConfigComponent from './config.js'; | ||
import HelpComponent from './help.js'; | ||
import saga from './sagas'; | ||
import reducer from './reducers'; | ||
|
||
export default { | ||
id: 'fileEvolution', | ||
label: 'File Evolution', | ||
saga, | ||
reducer, | ||
ChartComponent, | ||
ConfigComponent, | ||
HelpComponent | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict'; | ||
|
||
import { handleActions } from 'redux-actions'; | ||
import _ from 'lodash'; | ||
|
||
export default handleActions( | ||
{ | ||
SET_COMMIT_BOX_WIDTH: (state, action) => _.assign({}, state, { commitBoxWidth: action.payload }), | ||
SET_COMMIT_BOX_HEIGHT: (state, action) => _.assign({}, state, { commitBoxHeight: action.payload }), | ||
SET_COMMIT_BOX_COLOR: (state, action) => _.assign({}, state, { commitBoxColor: action.payload }), | ||
SET_SELECTED_AUTHORS: (state, action) => _.assign({}, state, { selectedAuthors: [...action.payload] }), | ||
SET_SELECTED_BRANCHES: (state, action) => _.assign({}, state, { selectedBranches: [...action.payload] }), | ||
SET_SHOW_COMMIT_DATE: (state, action) => _.assign({}, state, { showCommitDate: action.payload }), | ||
SET_SHOW_COMMIT_MESSAGE: (state, action) => _.assign({}, state, { showCommitMessage: action.payload }), | ||
SET_SHOW_COMMIT_AUTHOR: (state, action) => _.assign({}, state, { showCommitAuthor: action.payload }) | ||
}, | ||
{ | ||
commitBoxWidth: 100, | ||
commitBoxHeight: 100, | ||
commitBoxColor: 'author', | ||
selectedAuthors: [], | ||
selectedBranches: [], | ||
showCommitDate: true, | ||
showCommitMessage: 'header', | ||
showCommitAuthor: false | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
import { handleActions } from 'redux-actions'; | ||
import _ from 'lodash'; | ||
|
||
export default handleActions( | ||
{ | ||
REQUEST_FILE_EVOLUTION_DATA: state => _.assign({}, state, { isFetching: true }), | ||
RECEIVE_FILE_EVOLUTION_DATA: (state, action) => { | ||
console.log(action.payload); | ||
return _.assign({}, state, { | ||
data: action.payload, | ||
isFetching: false, | ||
receivedAt: action.meta.receivedAt | ||
}); | ||
} | ||
}, | ||
{ | ||
data: {}, | ||
lastFetched: null, | ||
isFetching: null | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use strict'; | ||
|
||
import config from './config.js'; | ||
import data from './data.js'; | ||
import { combineReducers } from 'redux'; | ||
|
||
export default combineReducers({ | ||
data, | ||
config | ||
}); |