Additional Branch and Revision optional fields within Submission Banner
Review Request #3965 — Created March 13, 2013 and discarded
Feature - This feature adds two additional optional fields to the Submit banner alongside the original "describe your submission"; being "Revision" and Branch". - These new fields are dynamically addressed in the change log found at the bottom of a review request. NOTE: This review request is currently bugged, as it is not allowing the removal of the following issues from the tracker: File 17, 18, 33, 34, 38. Consider these issues dealt with.
THE FOLLOWING OCCUR AFTER CURSORING OVER THE CLOSE DROP DOWN AND THEN CLICKING DISCARDED - Typing nothing proceeds with empty bottom log other then signal for status change, as expected. - Take a newly published request, cursor over the Close drop down, click discarded. The discard banner appears, as expected. Typing in a reason for discard proceeds as normal. THE FOLLOWING OCCUR AFTER CURSORING OVER THE CLOSE DROP DOWN AND THEN CLICKING SUBMITTED - Typing nothing proceeds with empty bottom log other then signal for status change, as expected. - Typing only in the description area, the text area expands, takes in input and then detracts as required. The bottom change log adjusts to display the newly typed description under its proper heading. - Typing only in the revision/branch area, the text label switches to edit mode, takes in input and then detracts as required. The bottom change log adjusts to display the newly typed revision/branch under its proper heading. - Typing in all three areas, the text labels switch to edit mode, takes in input and then detracts as required. The bottom change log adjusts to display the newly typed revision/branch/description under their proper headings. - Typing in any of the labels as described previously, but then changing your mind and overwriting to another input. The bottomt change log adjusts to the newest version of text.
Description | From | Last Updated |
---|---|---|
I'm not sure this is the best format to use. The description is by no means restricted to a single … |
SM smacleod | |
I think we should probably use single line input boxes for these (similar to the branch field describing the review … |
SM smacleod | |
It's hard to tell which screenshots are of the current project. If you can remove any that don't represent the … |
chipx86 | |
The "(optional)" is too wordy and inconsistent from the rest of the UI. Every field is optional unless it has … |
chipx86 | |
I meant the labels themselves, not the values. Like on a review request, how "Branch" and "Submitter" and stuff are … |
chipx86 | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 48 W291 trailing whitespace |
reviewbot | |
Col: 24 E711 comparison to None should be 'if cond is not None |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 21 E711 comparison to None should be 'if cond is not None |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 19 E711 comparison to None should be 'if cond is not None |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 53 E711 comparison to None should be 'if cond is not None |
reviewbot | |
Col: 58 W291 trailing whitespace |
reviewbot | |
Col: 50 E711 comparison to None should be 'if cond is not None |
reviewbot | |
Col: 56 W291 trailing whitespace |
reviewbot | |
Col: 48 E711 comparison to None should be 'if cond is not None |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (85 > 79 characters) |
reviewbot | |
Col: 68 W291 trailing whitespace |
reviewbot | |
This max_length is probably too short. |
SM smacleod | |
This max length is definitely too short, sha1s are twice this length. |
SM smacleod | |
Again, probably too short |
SM smacleod | |
I'm thinking we probably don't want to do it this way. It would be nicer to have each of these … |
SM smacleod | |
Trailing whitespace (Review Bot only checks .py files, so you'll have to manually inspect the js, or enable stripping of … |
SM smacleod | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 56 W291 trailing whitespace |
reviewbot | |
Col: 69 W291 trailing whitespace |
reviewbot | |
Col: 61 E272 multiple spaces before keyword |
reviewbot | |
Please alphabetically order these properties, and get rid of the commented out property. |
mike_conley | |
Needs 2 space indentation here, and a space between : and inline-block. |
mike_conley | |
Too much indent here. |
mike_conley | |
Each of these variables need "var" in front of them. Plus, we might as well use "revision", "branch". "desc" is … |
mike_conley | |
var in front of these |
mike_conley | |
Needs var in front of these, and use "revision" and "branch". |
mike_conley | |
I don't know that we need new fields for this. Any additional fields are supposed to lie in fields_changed. |
chipx86 | |
Not sure we need this. We already will be storing the information in the change description, and will be parsing … |
chipx86 | |
So this is completely changing how we handle these fields, and will break every existing review request out there. The … |
chipx86 | |
This is the perfect case of where you want to target a class instead of IDs. |
chipx86 | |
Can you just do: if (options.revision) Or will that not work? |
chipx86 | |
Why is this different from revision? |
chipx86 | |
Remove the magic number 1, and just use Rb.ReviewRequest.CLOSE_DISCARDED. |
mike_conley | |
I've just realized how fragile this is. Is jQuery.closest() not workable here? Same with the other parent().parent().parent() bit. |
mike_conley | |
These are really hairy and scary. You should be able to make use of the ID for the banner. |
chipx86 | |
Same as above. |
chipx86 | |
Too much redundancy with the above. I think really, this entire function should be part of the above function. Any … |
chipx86 | |
We shouldn't do this query more than once. How about: $('#submitted-banner .editable') .reviewCloseCommentEditor(RB.ReviewRequest.CLOSE_SUBMITTED); |
chipx86 | |
Can we rename these IDs to "revision-description" and stuff? Using the "-". I know "changedescription" is there, but for new … |
chipx86 | |
Just submitted. We don't want revision or branch for the discard banner, just submitted. |
chipx86 | |
Should enforce that this only works for submitting. |
chipx86 | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (87 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (84 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (107 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (103 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (87 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (84 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (107 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (103 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (87 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (84 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (107 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (103 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 73 W291 trailing whitespace |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (84 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (107 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (103 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (84 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (107 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (103 > 79 characters) |
reviewbot |
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html
-
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html
-
-
I'm not sure this is the best format to use. The description is by no means restricted to a single line, and this could look really strange with a multi-liner. Also, it'd probably be easier to pick out the branch and revision if they were separate fields.
-
I think we should probably use single line input boxes for these (similar to the branch field describing the review request). I think it would look nicer, more compact, and it's all the functionality we need.
-
-
-
-
I'm thinking we probably don't want to do it this way. It would be nicer to have each of these fields actually stored separately and displayed, instead of generating a message and sticking it in the text where description used to go.
-
Trailing whitespace (Review Bot only checks .py files, so you'll have to manually inspect the js, or enable stripping of trailing whitespace in your editor)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html
- Change Summary:
-
Address a few of the suggestions, specifically a readability improvement of the current description generator.
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html
-
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html
-
-
It's hard to tell which screenshots are of the current project. If you can remove any that don't represent the current state, that would help. In this particular one, I'd rather not try to be smart and turn this into a big sentence. The description should be very distinct from the revision and branch. The revision and branch should be marked up better so that they look like labels in the forms of what we have for every other field. Consistency is important here.
-
-
The "(optional)" is too wordy and inconsistent from the rest of the UI. Every field is optional unless it has an asterisk, so in this case, just remove "(optional)" on these fields. Also, I'd prefer the labels be marked up like they are on the review request fields, so that there's some visual indication.
- Change Summary:
-
Addressed header styling review suggestion. Added a better looking header label set.
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html
- Change Summary:
-
Expanded the ChangeDescription to support revision and branch tracking. Therefore, changes in submission banner will be reflected accordingly. Also, this allows for the change log restyling, and breaking up the text into each section. i.e. Revision, Branch, and a Description. Screencaps reflect these changes.
- Diff:
-
Revision 10 (+130 -7)
- Removed Files:
- Added Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/changedescs/models.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/templates/reviews/review_detail.html reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html reviewboard/static/rb/css/reviews.less
-
-
-
- Change Summary:
-
PEP8 fixes.
- Diff:
-
Revision 11 (+130 -7)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/changedescs/models.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_detail.html
- Change Summary:
-
Addressed remaining issues in tracker, which included CSS styling, javascript format, as well as a javascript fix to allow for proper javascript display of the description label area depending on if its a discarded banner or a submitted banner.
- Diff:
-
Revision 12 (+140 -8)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/changedescs/models.py reviewboard/reviews/models.py Ignored Files: reviewboard/templates/reviews/review_detail.html reviewboard/static/rb/js/reviews.js reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html reviewboard/static/rb/css/reviews.less
- Change Summary:
-
Added testing done.
- Testing Done:
-
+ THE FOLLOWING OCCUR AFTER CURSORING OVER THE CLOSE DROP DOWN AND THEN CLICKING DISCARDED
+ - Typing nothing proceeds with empty bottom log other then signal for status change, as expected. + + - Take a newly published request, cursor over the Close drop down, click discarded. The discard banner appears, as expected. Typing in a reason for discard proceeds as normal.
+ + THE FOLLOWING OCCUR AFTER CURSORING OVER THE CLOSE DROP DOWN AND THEN CLICKING SUBMITTED
+ - Typing nothing proceeds with empty bottom log other then signal for status change, as expected. + + -
Typing only in the description area, the text area expands, takes in input and then detracts as required. The bottom change log adjusts to display the newly typed description under its proper heading.
+ -
Typing only in the revision/branch area, the text label switches to edit mode, takes in input and then detracts as required. The bottom change log adjusts to display the newly typed revision/branch under its proper heading.
+ -
Typing in all three areas, the text labels switch to edit mode, takes in input and then detracts as required. The bottom change log adjusts to display the newly typed revision/branch/description under their proper headings.
+ -
Typing in any of the labels as described previously, but then changing your mind and overwriting to another input. The bottomt change log adjusts to the newest version of text.
- Change Summary:
-
Added a note to the description to address the bugged issue tracker.
- Description:
-
Feature
- This feature adds two additional optional fields to the Submit banner alongside the original "describe your submission"; being "Revision" and Branch". - These new fields are dynamically addressed in the change log found at the bottom of a review request. + + NOTE: This review request is currently bugged, as it is not allowing the removal of the following issues from the tracker:
+ File 17, 18, 33, 34, 38. Consider these issues dealt with.
-
-
I don't know that we need new fields for this. Any additional fields are supposed to lie in fields_changed.
-
Not sure we need this. We already will be storing the information in the change description, and will be parsing it out from there. See my comment below about how we're doing that. (If we did keep this, it'd be extremely important that the submitted_description matches the 'text' field type from ChangeDescription.)
-
So this is completely changing how we handle these fields, and will break every existing review request out there. The new code is saying we're going to set the descriptions from the review request, but that's not where the change description has ever lived. It's always lived in the ChangeDescription. No new review request will have change_description set on the ReviewRequest, so they'll end up with blank descriptions, losing a ton of history. What we should do is not put this data in ReviewRequest, and instead pull from latest_changedesc, like we used to. So, close_description should come from latest_changedesc.text. revision should come from latest_changedesc.fields_changed['submitted_revision']['new'], if that 'submitted_revision' is in there. Likewise, branch should come from there. We should only pull these fields if status == ReviewRequest.SUBMITTED, since a discarded review request shouldn't have these fields. There's also an odd naming here and elsewhere in the change. "branch_description" and "revision_description." "change_description" makes sense, because it's a description of the change, btu these are really more like "submitted_branch" and "submitted_revision."
-
-
-
-
-
-
Too much redundancy with the above. I think really, this entire function should be part of the above function. Any customization can be done within the function. So, one function for any field on the banner, which will simplify the code below that calls into it, as I'll demonstrate below.
-
We shouldn't do this query more than once. How about: $('#submitted-banner .editable') .reviewCloseCommentEditor(RB.ReviewRequest.CLOSE_SUBMITTED);
-
Can we rename these IDs to "revision-description" and stuff? Using the "-". I know "changedescription" is there, but for new ones, we should fix it.
-
-
- Change Summary:
-
This diff addressed the initial CSS issues in the tracker, but most importantly the full transistion from using ReviewRequest model into using the ChangeDescription changefields. Still addressing the issues involving the html scraping/javascript/jquery issues.
- Diff:
-
Revision 13 (+137 -8)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_detail.html
-
-
-
-
-
-
-
-
- Change Summary:
-
Addressed the shaky jquery field pickups by replacing with stronger scraping, as well as fixed reviewCloseCommentEditor function to eliminate redundancies.
- Diff:
-
Revision 14 (+123 -15)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_detail.html
-
-
-
-
-
-
-
-
- Change Summary:
-
Addressed remaining tracker issues involving datastore.js and enforcing the .close function between submitting and discarding.
- Diff:
-
Revision 15 (+128 -16)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_detail.html
-
-
-
-
-
-
-
-
- Change Summary:
-
Addressed all PEP8s that can be fixed.
- Diff:
-
Revision 16 (+130 -16)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_detail.html
-
-
-
-
-
-
-
- Change Summary:
-
addressed white space pep8
- Diff:
-
Revision 17 (+130 -16)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/rb/js/reviews.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/datastore.js reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_detail.html
-
-
-
-
-
-