Merge lp:~kfogel/launchpad/515584-fix-DRY-violation into lp:launchpad/db-devel
| Status: | Merged |
|---|---|
| Approved by: | Eleanor Berger on 2010-02-24 |
| Approved revision: | not available |
| Merged at revision: | not available |
| Proposed branch: | lp:~kfogel/launchpad/515584-fix-DRY-violation |
| Merge into: | lp:launchpad/db-devel |
| Diff against target: |
88 lines (+30/-34) 2 files modified
lib/lp/bugs/browser/bugtarget.py (+24/-6) lib/lp/bugs/templates/bugtarget-patches.pt (+6/-28) |
| To merge this branch: | bzr merge lp:~kfogel/launchpad/515584-fix-DRY-violation |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Eleanor Berger (community) | code ui | 2010-02-23 | Approve on 2010-02-24 |
|
Review via email:
|
|||
Commit Message
Fix a DRY violation between the +patches template and view. Note that although some of the commits say they're about using a Zope form, we went with a different solution instead. See the bug for details.
| Karl Fogel (kfogel) wrote : | # |
| Eleanor Berger (intellectronica) wrote : | # |
Hi Karl,
All-in-all this branch looks nice. I have one code-related comment: the property patchTaskOrderings should be called patch_task_
As for the UI, I think there are two issues:
1. You're now capitalizing the sort orderings, which is different from the normal search sort order. I think that both should have the same capitalization, so I would prefer not to capitalize for now.
2. Where previously you displayed the target name (package, project) you now display 'Target', but I don't think this is a good idea, because nowhere else do we use the word target to mean what we mean here, and it will probably not be obvious to users what it means. So I think it's better to continue using targetName.
| Karl Fogel (kfogel) wrote : | # |
Thanks for the review, Tom. I've done as you suggest (except I used "target name" rather than "targetName", to avoid inconsistent camelCase). The change is undergoing EC2 testing. Let me know how the code looks now.
| Eleanor Berger (intellectronica) wrote : | # |
Wasn't the use of targetName (camel cased, for FWIW) in the previous version, a call to a function that returns a string with the type of target? Something like 'project' or 'package'?
| Karl Fogel (kfogel) wrote : | # |
Duh. Yes. Please see rev 9028.

Fix a DRY violation between the +patches template and view. Note that although the original plan was to use a Zope form, we ended up using a different solution instead. See the comments at bug #515584 for why.
Note there is a very trivial UI change here: the sort orderings have slightly different user-visible names (e.g., "Patch age" instead of "patch age"). I'm not sure if that needs UI review or not.