typedoc icon indicating copy to clipboard operation
typedoc copied to clipboard

Selective source order sorting

Open aspen-po opened this issue 8 months ago • 1 comments

Search Terms

sort, sorting, sort order, prop, props, properties, method, methods, class, interface

Problem

It's common to define members of classes and interfaces with a rational order applied to the ordering. It would be useful to be able to sort these by source order, similar to what is possible for enums, without having to sort everything by source order.

Suggested Solution

Either adding new sort options similar to enum-member-source-order, or by allowing overriding of sort order by category/group/kind, or by allowing overriding of sort order via an @sortOrder tag per kind that generates a page.

aspen-po avatar Jun 05 '25 16:06 aspen-po

Adding support for @sortOrder seems like a good idea to me, it should be a block tag with whitespace/comma separated sort strategies, e.g. @sortOrder static-first, source-order

Gerrit0 avatar Jun 15 '25 01:06 Gerrit0

👍 glad we agree, you solution sounds good, I might take a crack at it at some point on an evening next week 😄

imaspen avatar Jun 18 '25 13:06 imaspen

While looking at implementing this, I've decided that @sortStrategy would be a more appropriate tag for this, @sortOrder implies just ascending/descending, which isn't what this option is specifying.

Gerrit0 avatar Jun 30 '25 01:06 Gerrit0