Skip to content

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

Merged
merged 14 commits into from
Jun 11, 2017
Merged

Conversation

AllenFang
Copy link
Member

@AllenFang AllenFang commented Jun 5, 2017

Commit some useful and important part for reviewing.

Target: implement the alert area on component/app/app.js.

Todo:

  • components
  • Unit test

AllenFang added 9 commits June 4, 2017 17:52
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
@AllenFang AllenFang added this to the 0.1.0-alpha.1 milestone Jun 5, 2017
@AllenFang
Copy link
Member Author

Currently, we can get some basic data via this PR

2017-06-05 11 54 58

@AllenFang AllenFang changed the title [WIP] Implement for App Alert Implement for App Alert Jun 10, 2017
@AllenFang
Copy link
Member Author

@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.

  • redux-thunk
  • A basic state tree(check src-react/store.js) and reducers implementation(check src-react/reducers)
  • path container implementation, now we have an essential entry point for path page

I'm going to open another two PR

One is for implement the components(AlertArea) event, because this PR only have the view(presentation) but I doesn't implement the events(click etc.) yet.

The other is for the testing.

};
};

function receiveUgitConfig(ungitConfig) {
Copy link
Contributor

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 => receiveUngitConfig

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

import { connect } from 'react-redux'

import AlerArea from 'components/alert-area';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here for AlertArea

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


export function bootstrap() {
return dispatch => {
dispatch(pending(4));
Copy link
Contributor

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?

Copy link
Member Author

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

@CYBAI CYBAI merged commit 69d2397 into revamp-with-react:phase-1 Jun 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants