Edgewall Software

Opened 4 years ago

Last modified 4 years ago

#13281 closed defect

Admin panel categories reordered — at Version 4

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 Ryan J Ollos)

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.

Change History (6)

by Ryan J Ollos, 4 years ago

by Ryan J Ollos, 4 years ago

comment:1 by Ryan J Ollos, 4 years ago

Description: modified (diff)

comment:2 by Ryan J Ollos, 4 years ago

Issue doesn't occur after converting Full Blog plugin's admin template to Jinja2.

comment:3 by Ryan J Ollos, 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 Ryan J Ollos, 4 years ago

Owner: set to Ryan J Ollos
Release Notes: modified (diff)
Status: newassigned
Note: See TracTickets for help on using tickets.