-
Notifications
You must be signed in to change notification settings - Fork 1
Implement for App Alert #5
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
Conversation
1. move initialState to store and inject it when store creating 2. separate reducers
ungitConfig: for ungit configuraion userConfig: for user configuration version: for the versions of ungit itself and git common: some common actionCreators bootstrap: for initialization, aggregrate some actionCreators and use it when app init
@CYBAI please have a look on it, this PR have following tasks done, and you can merge it due to it will be easy and helpful for the development of your part.
I'm going to open another two PR One is for implement the components( The other is for the testing. |
src-react/actions/ungit-config.js
Outdated
}; | ||
}; | ||
|
||
function receiveUgitConfig(ungitConfig) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's typo in the function name?
receiveUgitConfig
=> receiveUn
gitConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src-react/containers/path.js
Outdated
import { connect } from 'react-redux' | ||
|
||
import AlerArea from 'components/alert-area'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo here for Alert
Area
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src-react/actions/bootstrap.js
Outdated
|
||
export function bootstrap() { | ||
return dispatch => { | ||
dispatch(pending(4)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to make my understanding much clearer.
I think the usage of pending
is to know how many APIs don't finish yet.
If my understanding is correct, according to this bootstrap
action, there're three fetch
action, why do you use 4
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to ungitconfig action will also fetch userconfig, but after I check the code, there's a condition to decide if fetching userconfig or not, so I think I need to move a pending call into ungitconfig
It's fixed
Commit some useful and important part for reviewing.
Target: implement the alert area on
component/app/app.js
.Todo: