Conversation
@@ -107,6 +107,8 @@ var BadgePage = React.createClass({ | |||
parseBadgeDetails: function(data) { | |||
var bdata = data.badge; | |||
|
|||
console.log(bdata); |
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.
remove
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.
Generally looks good, just a few questions!
render: function () { | ||
var icon = null; | ||
|
||
if (this.props.icon !== false) { |
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.
not sure I understand this block...does the false
value actually mean something? If so, can we comment on that 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.
yes, it means "no icon, at all" rather than "this icon, or the default icon if we didn't set this prop value"
return ( | ||
<div className="apply-send-qualifications"> | ||
{/* | ||
<div className="evidence-title">{ this.props.evidence }</div> |
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.
umm, remove?
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.
fun fact: uncommenting this in the PR for parsing evidence and criteria as HTML lists, so no need to remove here.
<fieldset> | ||
<input type="file" className="hidden" ref="optionalFile" onChange={this.handleFiles}/> | ||
<label className="control-label">Attach one or more file (if needed):</label> | ||
<button className="btn attach" onClick={this.selectFiles}>click here to pick one or more files...</button> |
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.
Capital 'C'?
return null; | ||
} | ||
|
||
return this.state.evidenceFiles.map(e => { |
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.
can we name this evidence?
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.
no, because evidence is the full collection of fields. Both the text and the files are evidence as far as Credly cares, hence evidenceText
(from the textArea) and evidenceFiles
(from the file picker)
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.
evidenceFile maybe?
}, | ||
|
||
handleFiles: function(evt) { | ||
var self = this; |
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.
is this still needed?
@@ -107,6 +105,10 @@ var BadgePage = React.createClass({ | |||
parseBadgeDetails: function(data) { | |||
var bdata = data.badge; | |||
|
|||
// FIXME: LOGGING ONLY, REMOVE REMOVE REMOVE | |||
console.log(bdata); |
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.
remove
var criteria = []; | ||
|
||
// extract evidence as itemized list based on newlines (\n with optional \r) if we can | ||
var splitOnItems = /\n\r?/g; |
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.
This is temporary right? Until we settle on a format?
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.
yeah this gets removed in the PR for proper parsing of marked up data.
status: status | ||
criteria, | ||
evidence, | ||
date_achieved: bdata.created_at, |
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.
this needs to be changed? Isn't it some other property?
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.
it is, need to find out which property that is as separate task
lgtm |
fixes #2312, fixes #2313
Before this can land: