Edgewall Software
Modify

#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 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.

Attachments (2)

Screen Shot 2020-04-30 at 21.50.45.jpg (9.4 KB ) - added by Ryan J Ollos 19 months ago.
Screen Shot 2020-04-30 at 21.50.59.jpg (14.2 KB ) - added by Ryan J Ollos 19 months ago.

Download all attachments as: .zip

Change History (8)

by Ryan J Ollos, 19 months ago

by Ryan J Ollos, 19 months ago

comment:1 by Ryan J Ollos, 19 months ago

Description: modified (diff)

comment:2 by Ryan J Ollos, 19 months ago

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

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

Owner: set to Ryan J Ollos
Release Notes: modified (diff)
Status: newassigned

in reply to:  3 comment:5 by Ryan J Ollos, 19 months 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 Ryan J Ollos, 19 months ago

Resolution: fixed
Status: assignedclosed

Committed to 1.4-stable in r17340, merged to trunk in r17341.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.