-
-
docs/manual/webapi/2.0/resources/index.txt (Diff revision 1) Can you put this and the other resource-related doc changes into the resource change instead of this one?
-
-
reviewboard/htdocs/media/rb/css/common.css (Diff revision 1) Why is this commented out? If it's temporary, please document the reason. If it's not needed anymore, please remove the block.
-
reviewboard/htdocs/media/rb/css/common.css (Diff revision 1) Add a line of ****s above the "User page hover" line.
-
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 1) Add a space between // and the text, and capitalize "Only".
-
-
reviewboard/htdocs/media/rb/js/ui.autocomplete.js (Diff revision 1) Space between if and (. Space between the // and comment, capitalize first word.
-
reviewboard/htdocs/media/rb/js/ui.autocomplete.js (Diff revision 1) Space between the // and comment, capitalize first word.
-
reviewboard/webapi/resources.py (Diff revision 1) Isn't this contained in your other review request?
Quick Search
Review Request #2199 — Created March 14, 2011 and submitted
Information | |
---|---|
CrystalLokKoo | |
Review Board | |
Reviewers | |
reviewboard | |
Wrote an autocomplete wrapper in common.js. This quick search searches for users, groups and review requests. The autocomplete widget was modified to accommodate the feature where clicking on a suggestion would open the object's URL in a new window. The compressed version of the autocomplete widget is included. Added the documentation for the search resource as well. I also removed ui.autocomplete in reviews.css to common.css. Added the js scripts that autocomplete needs in base.html and removed duplicate js files from other html templates.
A lot of manual testing with as many different cases I could think of using different group display names & names, user username/first name/last name, and review request ID/summaries. Caught quite a few bugs through this. Not sure if this is all I should be doing. Am I suppose to be writing some tests as well?
CR
-
-
-
-
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 2) The blank line on the comment should go away, and the last line should be "*/" not "* */"
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 2) Indentation should be 4 spaces. This looks like 8 or a tab. Make sure everything's using spaces only.
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 2) Brace should be on the same line as the if statement. Same with the following if statements. Also, you can just do data.username (same with the others)
-
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 2) Do you mean to override s each time? If so, please document each case, and make the ifs else ifs.
-
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 2) eval is too dangerous. I don't think you should need it anyway. My understanding was that data would be a javascript object anyway.
-
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 2) Should be able to do: var objects = ["users", "groups", "review_requests"];
-
-
-
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 2) Space around the != operator. { on the same line as the if.
-
-
-
-
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 2) Trailing , will break things. Also, "api/search/". No need to + things.
-
reviewboard/htdocs/media/rb/js/common.js (Diff revision 2) Not aligned. Make sure they're at the proper indentation level.
-
-
reviewboard/htdocs/media/rb/js/ui.autocomplete.js (Diff revision 2) Indentation is wrong. I don't know that clickURLChange is right now. The makeItem should be registering this. See below for some fixes that need to be made for makeItem though.
-
reviewboard/htdocs/media/rb/js/ui.autocomplete.js (Diff revision 2) { on the same line as the function. At this point I'm not going to point them out. I suggest going through your change and making sure they're all correct. Same with the indentation changes. One important thing: This file should never know how it's going to be used. This handler for makeItem should be overridable through options, just like some of the other functions, and the version for the search field should provide the implementation here. The default implementation should do exactly what the old default implementation did.
-
reviewboard/htdocs/media/rb/js/ui.autocomplete.js (Diff revision 2) data.summary You should go through and fix all remaining occurrences. Also, comment should be in the body.
-
-
-
-
-
-
-
reviewboard/templates/reviews/datagrid.html (Diff revision 2) Delete all this. No point in overriding the block now.
CR
Change Summary:
For the file ui.autocomplete.js, on line 431, I'm not sure why the indentation is wrong there. The first time when I post reviewed, the indentation problem is not there. I took another look at the file, and made some other changes to that file and re-committed it making sure there is no indentation problem. I have no idea why it's like that.
Diff: |
Revision 3 (+180 -147)
|
---|
-
The indentation is because some of it is using tabstops and some is using spaces. Make sure there are no tabstops in the code at all, and that all indentation is done via spaces.
CR
Change Summary:
Fixed an indentation problem with ui.autocomplete.js and made another compressed version of that as well.
Diff: |
Revision 4 (+180 -147)
|
---|
-
-
reviewboard/htdocs/media/rb/js/ui.autocomplete.js (Diff revision 4) Indent this the same as the other functions.
-
reviewboard/htdocs/media/rb/js/ui.autocomplete.js (Diff revision 4) Can you fix the tabstops in this code?
-
reviewboard/htdocs/media/rb/js/ui.autocomplete.js (Diff revision 4) This is no longer indented correctly.
-
reviewboard/templates/base.html (Diff revision 4) Is datagrid.js really needed in the base template?
-
Okay, I just applied the patch to my tree and tried it out, and I have some usability comments: The drop-down text currently has "Review Request Summary (id)" - If the summary is too long on any given review request, the text will overlap the (id) and will be ugly and impossible to read. We should make the drop-down for this box wider and give it a limit on the width of the text (overflow: clipped) so it never overlaps. - There's a "Press tab to auto-complete" item, which works, but fills in the text of the search box with the summary. I'm not sure how useful that really is. - If you hit enter after entering a review request number, even though you saw it in the drop-down, the search results will be empty. The request in bug 1842 (going directly to the review request) seems nice.
CR
Change Summary:
- Implemented bug 1842 where searching a valid review request ID will redirect to the review request - Chopped off long summaries and made drop down box wider - Got rid of "Press tab to autocomplete" although the tab button still works - Removed all the tab spaces in ui.autocomplete
Diff: |
Revision 5 (+920 -890)
|
---|
-
Okay, one last user interaction niggle: When I type in the ID of a review request, the drop-down immediately focuses the single item, which means when I press "enter" on the keyboard, instead of searching for that ID, it fills the entry with the text of the drop-down. I'd prefer it if it didn't focus any items, so that unless I press the down arrow on the keyboard, it won't fill anything into the text box that I didn't type.
CR
Change Summary:
Change quick search so that no item is focused by default. Please let me know if there is anything else I can change. Thanks!
Diff: |
Revision 6 (+921 -890)
|
---|