Merge lp:~adeuring/launchpad/bug-903359 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Abel Deuring |
Approved revision: | no longer in the source branch. |
Merged at revision: | 14549 |
Proposed branch: | lp:~adeuring/launchpad/bug-903359 |
Merge into: | lp:launchpad |
Diff against target: |
309 lines (+112/-65) 5 files modified
lib/lp/app/javascript/ordering/ordering.js (+33/-28) lib/lp/app/javascript/ordering/tests/test_orderby_widget.js (+43/-15) lib/lp/bugs/browser/bugtask.py (+21/-21) lib/lp/bugs/browser/tests/test_bugtask.py (+15/-0) lib/lp/bugs/javascript/buglisting_utils.js (+0/-1) |
To merge this branch: | bzr merge lp:~adeuring/launchpad/bug-903359 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Deryck Hodge (community) | Approve | ||
Review via email: mp+86244@code.launchpad.net |
Commit message
[r=deryck][bug=903359] configure ascending or descending default sort order for each OrderByBar sort option separately.
Description of the change
fault sort direction for each of the
sort options of a OrderByBar separately (bug 903359).
The implementation is simple: The constructor of the sort widget
has the parameter sort_keys, which was a sequences uf tuples
(name, title); I extended this to the tuple (name, title, direction).
The new field "direction" must have either the value "asc" or the value
"desc". (I considered to use a bool flag instead, but this would have
required more changes to the current implementation of OrderByBar,
which already uses these string -- and I wanted to finish this branch
today...)
I added the method OrderByWidget.
code in OrderByWidget.
And I updated the constant SORT_KEYS in lp.bugs.
the sort buttons to include the sort order.
Some choices of "asc" or "desc" in SORT_KEYS are candidates for
bikeshedding, especially: Should the default status sor direction
really be "asc", i.e. should the status "new" come first?
I don't want to discuss this here -- changing the default order for
each sort option requires only a one line change...
tests:
./bin/test app -vvt test_orderby_widget
./bin/test bugs -vvt lp.bugs.
no lint