Opened 5 years ago
Closed 4 years ago
#13281 closed defect (fixed)
Admin panel categories reordered
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.2 |
Component: | admin/web | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fixed incorrect ordering of admin panels. |
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Noticed the behavior with FullBlogPlugin installed. The panels reorder depending on which item is selected. The order is correct with Blog: Setting selected, but alphabetical otherwise. It should be alphabetical with General category at the top.
Attachments (2)
Change History (8)
by , 5 years ago
Attachment: | Screen Shot 2020-04-30 at 21.50.45.jpg added |
---|
by , 5 years ago
Attachment: | Screen Shot 2020-04-30 at 21.50.59.jpg added |
---|
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 4 years ago
follow-up: 5 comment:3 by , 4 years ago
Turns out the sort order when rendering a Genshi template is correct, but it's wrong when rendering a Jinja2 template. Jinja2 itertools says:
Unlike Python’s groupby, the values are sorted first so only one group is returned for each unique value.
But we sort before passing the values to the template: tags/trac-1.4.1/trac/admin/web_ui.py@:84-87#L79.
Proposed changes in [6630aa06a/rjollos.git]. On trunk with Genshi support dropped, we might be able to sort in the template after groupby
.
comment:4 by , 4 years ago
Owner: | set to |
---|---|
Release Notes: | modified (diff) |
Status: | new → assigned |
comment:5 by , 4 years ago
Replying to Ryan J Ollos:
On trunk with Genshi support dropped, we might be able to sort in the template after
groupby
.
Jinja2 sort doesn't allow a sorting function.
comment:6 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Issue doesn't occur after converting Full Blog plugin's admin template to Jinja2.