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

Importer: Continue reduxification work #5936

Merged
merged 1 commit into from
Jun 15, 2016

Conversation

dmsnell
Copy link
Member

@dmsnell dmsnell commented Jun 9, 2016

Part of #5303

Updates the startImport action, which is one of the few actions that
can be simply converted without getting into thunk issues.

No functional or stylistic changes are intended.

Testing
Navigate to My Sites > Settings > Import and attempt to start a new import from the collapsed import panel; either WordPress or Medium will work. If an import session is currently in progress, cancel it and try to start a new one. This is mostly a smoke-test.

cc: @roundhill @rodrigoi

Test live: https://calypso.live/?branch=update/importer-redux/start-import

@dmsnell dmsnell added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Janitorial State labels Jun 9, 2016
@dmsnell dmsnell added this to the Importer: Reduxify milestone Jun 9, 2016
@dmsnell dmsnell force-pushed the update/importer-redux/start-import branch from da0e59a to d0e9e29 Compare June 9, 2016 21:02
startImport: flowRight( dispatch, startImport )
} );

export default connectDispatcher( null, mapDispatchToProps )( ImporterHeader );
Copy link
Contributor

Choose a reason for hiding this comment

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

mapDispatchToProps can also be an object:

export default connectDispatcher( null, { startImport } )( ImporterHeader );

https://github.com/reactjs/react-redux/blob/master/docs/api.md#arguments

Copy link
Member Author

Choose a reason for hiding this comment

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

nice! I didn't know…

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops - haha. This isn't connect - it's my transition function which doesn't have that property. Reverting the changes…

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah missed the dispatcher-converter there.

@gwwar
Copy link
Contributor

gwwar commented Jun 15, 2016

👍 Looks good

@gwwar gwwar added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jun 15, 2016
Updates the `startImport` action, which is one of the few actions that
can be simply converted without getting into thunk issues.
@dmsnell dmsnell force-pushed the update/importer-redux/start-import branch from d0e9e29 to 1f17a25 Compare June 15, 2016 19:09
@dmsnell
Copy link
Member Author

dmsnell commented Jun 15, 2016

@gwwar thanks for the review - I'm changing mapDispatchToProps to be a simple object, but I'm keeping it separate because more actions will come with successive PRs.

I'll merge after the tests pass.

@dmsnell dmsnell force-pushed the update/importer-redux/start-import branch from 1f17a25 to a0ccf55 Compare June 15, 2016 19:16
@dmsnell dmsnell merged commit dc37d5c into master Jun 15, 2016
@dmsnell dmsnell deleted the update/importer-redux/start-import branch June 15, 2016 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants