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

Make indicator submission/edit convert csv to json #25

Merged
merged 5 commits into from
Nov 18, 2016

Conversation

drewbo
Copy link
Contributor

@drewbo drewbo commented Nov 18, 2016

@kamicut this isn't finished yet (no display parsing) but do you think the csv conversion can just be wrapped in a try/catch block to display errors while parsing?

@drewbo drewbo changed the title [WIP] Make indicator submission/edit convert csv to json Make indicator submission/edit convert csv to json Nov 18, 2016
@drewbo
Copy link
Contributor Author

drewbo commented Nov 18, 2016

cc: @dereklieu

@dereklieu
Copy link

I think try/catch is the right way to go here.

@drewbo
Copy link
Contributor Author

drewbo commented Nov 18, 2016

@kamicut this works now by changing tabs to commas on change and doing live validation, it occasionally warns with:

Failed prop type: Invalid prop `value` of type `array` supplied to `TextWidget`, expected `string`
Failed prop type: Invalid prop `formData` supplied to `StringField`.

but I'm not positive why; works though...

@@ -30,12 +40,20 @@ class NewIndicator extends React.Component {
});
}

handleChange (e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since there's duplication between NewIndicator and EditIndicator, do you think this textfield should be its own widget?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, do you want ticket that out as a separate refactor?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah let's ticket it

@kamicut kamicut merged commit 4a79ead into master Nov 18, 2016
@drewbo drewbo deleted the feature/24-csv2json branch November 18, 2016 23:00
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