-
-
I realize that this idiom was used earlier in the code, but I'm not entirely sure why the ternary expression is necessary. Additionally, I believe it should be changed to "issueOption.is(':checked')" (as recommended by http://api.jquery.com/prop/) as the behaviour for attr() will change in jQuery 1.6+ (and it's slightly more readable).
Expose Toggles for Opening Issues in Review Summary Dialog
Review Request #2827 — Created Jan. 26, 2012 and submitted
In the review summary dialog, there is now an "open an issue" checkbox after each comment. Also fixed the way we get checkbox states in reviews.js
Tested in my local linux machine with Chrome using the following steps 1. take any review request, view its diffs 2. comment on any line of the diff, open an issue 3. comment on some other line of the diff, don't open an issue 4. there should be a green bar on top, click the "edit review" button 5. in the summary, uncheck the "open an issue" in the first comment, don't modify the comment content 6. check the "open an issue" in the second comment, don't modify the comment content 7. save the review 8. refresh the page, and see that the issue states have been changed accordingly
Description | From | Last Updated |
---|---|---|
Agreed with the is(":checked"). Also, you should pull out this check so we only do it once. |
chipx86 | |
It kind of blows that we have to do this every time we set the issue_opened property. It feels error … |
mike_conley | |
Didn't we want to use something like: $(issueField[0]).is(":checked") ? |
mike_conley | |
Same as above, re: is(":checked") |
mike_conley | |
Same as above, re: .is(":checked") |
mike_conley | |
Same as above, re: .is(":checked") |
mike_conley | |
Same as above, re: .is(":checked") |
mike_conley |
- Change Summary:
-
Edited descriptions to reflect last changes
- Description:
-
~ In the review summary dialog, there is now an "open an issue" checkbox after each comment.
~ In the review summary dialog, there is now an "open an issue" checkbox after each comment.
+ Also fixed the way we get checkbox states in reviews.js
- Testing Done:
-
~ Tested in my local linux machine with Chrome
~ Tested in my local linux machine with Chrome using the following steps
+ 1. take any review request, view its diffs + 2. comment on any line of the diff, open an issue + 3. comment on some other line of the diff, don't open an issue + 4. there should be a green bar on top, click the "edit review" button + 5. in the summary, uncheck the "open an issue" in the first comment, don't modify the comment content + 6. check the "open an issue" in the second comment, don't modify the comment content + 7. save the review + 8. refresh the page, and see that the issue states have been changed accordingly
-
-
It kind of blows that we have to do this every time we set the issue_opened property. It feels error prone. We might want to update the comment object in datastore.js that's actually responsible for sending the data to the server. If we give *it* the responsibility of converting the boolean to the 0/1, I think we'd be in a better position.
-
Jim: This is really really close - I'm just wondering if we wanted to switch to .is(":checked"), as stated a few reviews back. -Mike
-
-
-
-
-