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

React/redux Task Search #1121

Merged
merged 30 commits into from
Jul 8, 2016
Merged

React/redux Task Search #1121

merged 30 commits into from
Jul 8, 2016

Conversation

kwm4385
Copy link
Contributor

@kwm4385 kwm4385 commented Jul 1, 2016

:partyparrot:

@tpetr @wolfd @Calvinp

return {
url: `/history/request/${requestId}/tasks?count=${count}&page=${page}${params.join('')}`
}
});
Copy link
Contributor

Choose a reason for hiding this comment

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

can we update this to match the API layout that @wolfd rolled out?

if (orderDirection) params.push(`&orderDirection=${orderDirection}`);
return {
url: `/history/tasks?count=${count}&page=${page}${params.join('')}`
};
Copy link
Contributor

Choose a reason for hiding this comment

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

we may want to use a function for building query params (like $.param(), but I'd rather not depend on jQuery), since it will handle escaping, etc. for us

@Calvinp
Copy link
Contributor

Calvinp commented Jul 6, 2016

You can delete DateEntry since you pulled out the only place where it was used.
If #1119 is merged before this, you can also delete DropDown - otherwise that PR can do it.

@kwm4385
Copy link
Contributor Author

kwm4385 commented Jul 6, 2016

@Calvinp Deleted DateEntry. I'll hold off on DropDown for now.

@Calvinp
Copy link
Contributor

Calvinp commented Jul 6, 2016

BOSMM2NGH0JG3QD:app cpomerantz$ eslint controllers/TaskSearch.es6 views/taskSearch.jsx components/taskSearch/* components/common/formItems/ReduxSelect.jsx
...
✖ 82 problems (82 errors, 0 warnings)

@Calvinp
Copy link
Contributor

Calvinp commented Jul 6, 2016

Found another file you can delete: LinkedFormItem

},
disableNext: false,
loading: false
};
Copy link
Contributor

Choose a reason for hiding this comment

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

would be preferable to have this in redux

Copy link
Contributor Author

@kwm4385 kwm4385 Jul 7, 2016

Choose a reason for hiding this comment

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

I can see the argument for having this in redux, but we should think about where we draw the line between component state and redux state.

See reduxjs/redux#1287

I'd argue that since this doesn't effect anything besides the state of this component to leave it in. Especially since the state of the underlying form is already in the store via redux-form. I'm open to conversation though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Long term, task search results should be true permalinks (i.e. have all this state data in the URL), and that would make for a good argument to move this stuff in to Redux (I'm using reduxjs/redux#1287 (comment) as a guide). But since permalinks don't exist in the original implementation, I'm okay with circling back on this.

Copy link
Contributor Author

@kwm4385 kwm4385 Jul 7, 2016

Choose a reason for hiding this comment

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

In the context of permalinks, that does make sense. That will be easier once this is in react router as well. Sounds like a plan 👍

@kwm4385
Copy link
Contributor Author

kwm4385 commented Jul 7, 2016

If anyone here see any reason why these should two branches not be united, speak now or forever hold thy peace.

@kwm4385 kwm4385 merged commit 83027e1 into decaf Jul 8, 2016
@kwm4385 kwm4385 deleted the new_task_search branch July 8, 2016 12:44
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.

3 participants