[checklist] Improve checklist extension and user interface
Review Request #6969 — Created Feb. 22, 2015 and submitted
This change aims to polish up the existing checklist UI as well as its code base.
On the UI:
- Shifted the UI to be fixed at the bottom (better than in the middle of nowhere)
- Uses existing Reviewboard icons as buttons (versus textual buttons)
- Reworked toggling of the interface (using CSS animation)
- Editing an item selects/highlights the entire text (like renaming files)
- Ability to cancel edit via Esc key or button
- Word wrapping of long item descriptions
- Now escapes special characters in the item descriptions
- Trims the string before adding or editing, avoids empty descriptions
In the front end:
- Removed delete checklist functionality (since new checklist is generated upon refresh)
- Moved remove item method from collection view to item view
- So that item ids do not have to be stored in DOM
- Fixed a bug where editing multiple items only picks the value of the first item being edited
- Enforce hyphens for ids and classes, and single quotes for strings
Glass box front end testing on Chrome 40.0.2214. Quick tests for UI on Safari 8.0.2.
- Toggling size works
- Marking an item as done or undone works
- Deleting an item works
- Editing an item works
- Cancelling item editing works
- Adding an item works
- Long text is wrapped
- Special characters are escaped
- Can edit multiple items without conflict
- Whitespace in description is trimmed
Description | From | Last Updated |
---|---|---|
Instead of adding a new class for this, we should just put everything under the #checklist rule. |
david | |
Wrap this to 80 columns. |
david | |
Maybe define constants somewhere for Enter & Esc? |
david | |
Can this be wrapped to 80 columns? |
david | |
Else should go on the same line as the closing } from the previous block. |
david | |
Only one blank line here. |
david | |
This is only used once. Maybe skip the variable definition and just call .remove(this.model)? |
david | |
It looks like removeItemDB is only called from here? How would you feel about inlining the code? |
david | |
"size" is not a valid attribute on a <div>. |
david | |
Can we use <span> instead of <i>? |
david | |
This doesn't seem right. It should be: if (event.keyCode === $.ui.keyCode.ENTER || event.keyCode === 13) { |
david | |
Same here. |
david | |
And here. |
david |
- Change Summary:
-
Finalize changes and ready for review.
- Summary:
-
[WIP] Improve checklist user interfaceImprove checklist extension and user interface
- Description:
-
~ Touched up a bit of code on the back end, including calling parent shutdown method, and improving returned HTTP status code.
~ This change aims to polish up the existing checklist UI as well as its code base.
~ On the front end
~ In the back end:
~ - removed delete checklist functionality (useless since a new checklist generates upon refresh)
~ - shifted the UI to be fixed at the bottom (better than floating in the middle of nowhere)
~ - Extension now calls parent shutdown method
~ - Improved returned HTTP status codes (200 and 201)
- - reworked minimizing of the interface (with sweet CSS!)
~ What's currently missing or to be done:
~ On the UI:
~ - Ensure new checklist item input to be aligned to the bottom
~ - Eliminate as many UI issues stated in the hackpad
~ - Shifted the UI to be fixed at the bottom (better than in the middle of nowhere)
~ - Uses existing Reviewboard icons as buttons (versus textual buttons)
+ - Reworked toggling of the interface (using CSS animation)
+ - Editing an item selects/highlights the entire text (like renaming files)
+ - Ability to cancel edit via Esc key or button
+ - Word wrapping of long item descriptions
+ - Now escapes special characters in the item descriptions
+ - Trims the string before adding or editing, avoids empty descriptions
+ + In the front end:
+ + - Removed delete checklist functionality (since new checklist is generated upon refresh)
+ - Moved remove item method from collection view to item view
+ - So that item ids do not have to be stored in DOM
+ - Fixed a bug where editing multiple items only picks the value of the first item being edited
+ - Enforce hyphens for ids and classes, and single quotes for strings
- Testing Done:
-
~ Front end testing on Chrome 40.0.2214.
~ Glass box front end testing on Chrome 40.0.2214. Quick tests for UI on Safari 8.0.2.
+ + - Toggling size works
+ - Marking an item as done or undone works
+ - Deleting an item works
+ - Editing an item works
+ - Cancelling item editing works
+ - Adding an item works
+ - Long text is wrapped
+ - Special characters are escaped
+ - Can edit multiple items without conflict
+ - Whitespace in description is trimmed
- Commit:
-
e575a100e14815fcc7c8c8365aac371cd6f943dda04d09d13773be57304050b577733943cca1f5e9
- Diff:
-
Revision 2 (+215 -192)
- Added Files:
-
Tool: PEP8 Style Checker Processed Files: checklist/checklist/extension.py checklist/checklist/resources.py Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html Tool: Pyflakes Processed Files: checklist/checklist/extension.py checklist/checklist/resources.py Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html
- Change Summary:
-
Forgot to push string trim code, and removed extra screenshot.
- Commit:
-
a04d09d13773be57304050b577733943cca1f5e995c396d2f3b586122caeb7227482f1b788b5e54c
- Diff:
-
Revision 3 (+221 -193)
- Removed Files:
-
Tool: PEP8 Style Checker Processed Files: checklist/checklist/extension.py checklist/checklist/resources.py Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html Tool: Pyflakes Processed Files: checklist/checklist/extension.py checklist/checklist/resources.py Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html
- Change Summary:
-
Wrap lines to 80 and add keycode constants.
- Commit:
-
95c396d2f3b586122caeb7227482f1b788b5e54c71f8d689da69f0de8e314fcbf71de3942d203ef5
- Diff:
-
Revision 4 (+231 -202)
-
Tool: PEP8 Style Checker Processed Files: checklist/checklist/extension.py checklist/checklist/resources.py Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html Tool: Pyflakes Processed Files: checklist/checklist/extension.py checklist/checklist/resources.py Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html
- Change Summary:
-
Removed backend changes and update comment style.
- Description:
-
This change aims to polish up the existing checklist UI as well as its code base.
- In the back end:
- - - Extension now calls parent shutdown method
- - Improved returned HTTP status codes (200 and 201)
- On the UI:
- Shifted the UI to be fixed at the bottom (better than in the middle of nowhere)
- Uses existing Reviewboard icons as buttons (versus textual buttons)
- Reworked toggling of the interface (using CSS animation)
- Editing an item selects/highlights the entire text (like renaming files)
- Ability to cancel edit via Esc key or button
- Word wrapping of long item descriptions
- Now escapes special characters in the item descriptions
- Trims the string before adding or editing, avoids empty descriptions
In the front end:
- Removed delete checklist functionality (since new checklist is generated upon refresh)
- Moved remove item method from collection view to item view
- So that item ids do not have to be stored in DOM
- Fixed a bug where editing multiple items only picks the value of the first item being edited
- Enforce hyphens for ids and classes, and single quotes for strings
- Commit:
-
71f8d689da69f0de8e314fcbf71de3942d203ef515566137f517c809e6b7c0485a5ab7abc6a4a5d4
-
Tool: Pyflakes Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html Tool: PEP8 Style Checker Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html
- Change Summary:
-
Labelled as [checklist].
Fixed Backbone template indentation to be one space.
Fixed edit item not working.
Removed redundant code.
Improved CSS properties with constants. - Summary:
-
Improve checklist extension and user interface[checklist] Improve checklist extension and user interface
- Commit:
-
15566137f517c809e6b7c0485a5ab7abc6a4a5d4d18a3f292bd5b954356bdeb8d01909ee22113b57
-
Tool: PEP8 Style Checker Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html Tool: Pyflakes Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html
- Change Summary:
-
Use
defs.less
and addbox-shadow
! :D - Commit:
-
d18a3f292bd5b954356bdeb8d01909ee22113b570dd8c14bf7bbde1b2614b9d61b518998429f9501
-
Tool: PEP8 Style Checker Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html Tool: Pyflakes Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html
- Change Summary:
-
Added a missing semi-colon.
- Commit:
-
0dd8c14bf7bbde1b2614b9d61b518998429f95018989a1147c74bf85fb7e8e70de65d9b57e0f6ac2
-
Tool: PEP8 Style Checker Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html Tool: Pyflakes Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html
-
Tool: Pyflakes Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html Tool: PEP8 Style Checker Ignored Files: checklist/checklist/static/js/views/checklistView.js checklist/checklist/static/js/models/checklistAPI.js checklist/checklist/static/css/style.less checklist/checklist/templates/checklist/template.html