Merge lp:~sinzui/launchpad/bug-tags-edit-0 into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | j.c.sackett on 2012-06-21 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 15466 | ||||
| Proposed branch: | lp:~sinzui/launchpad/bug-tags-edit-0 | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
302 lines (+171/-28) 3 files modified
lib/lp/bugs/javascript/bug_tags_entry.js (+31/-24) lib/lp/bugs/javascript/tests/test_bug_tags_entry.html (+44/-4) lib/lp/bugs/javascript/tests/test_bug_tags_entry.js (+96/-0) |
||||
| To merge this branch: | bzr merge lp:~sinzui/launchpad/bug-tags-edit-0 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| j.c.sackett (community) | 2012-06-21 | Approve on 2012-06-21 | |
|
Review via email:
|
|||
Commit Message
Change classes, not styles so that action-icons do not show text.
Description of the Change
Graphical browsers show the edit icon next to the bug tags, after an
edit is performed, the edit action is redisplayed, except the text
"Edit" is now shown with the icon.
This is caused by the bug tag edit widget (well widget is a bit
presumptuous, more like a collective of behaviour embedded in a page)
which directly manipulates the anchors style instead of changing
classes. The code changes the anchors display from non to inline
(wrong). Instead the code should add or remove the hidden class.
-------
RULES
Pre-
* Update the code to add/remove the hidden class instead of changing
styles.
* setStyle() is called on several nodes. Maybe all calls to setStyle()
should instead be add/removeClass().
QA
* Visit https:/
* Edit the bug tags
* Verify the edit icon is restored...there is no green "Edit" text
after it.
LINT
lib/
lib/
lib/
TEST
./bin/test -vvc -t test_bug_tags_entry lp.bugs.
IMPLEMENTATION
I first removed lint from the module, and changed save_tag() so that it
could be instrumented by mockio. I added a YUI test for the setStyle()
behaviour. I then changed the module to add and remove the .hidden class.
I discovered that when there is a failure, the ok/cancel buttons are not
visible so you cannot resubmit. I fix this issue.
lib/
lib/
lib/

Thanks, this looks good.