Ticket #3839 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

Grouping of entries

Reported by: izzy Assigned to: gotoh
Priority: normal Component: TracWikiNegotiatorPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

In 0.11, there were options added to the [[TitleIndex]] macro, such as [[TitleIndex(format=group,min=4)]] to group pages with the same prefix if there are at least 4 entries with the same prefix (e.g. all Wiki* pages are grouped this way). I would love to see that in MultiLangTitleIndex? as well - since it significantly improves navigation in long lists.

This should not just break at CamelCase indicators, but hierarchical divisors (such as "/" or ":") should also be considered.

Thanx in advance!

Attachments

mtoc-grouping.png (34.0 kB) - added by izzy on 12/08/08 12:20:50.
System pages not ordered alphabetically, grouping messy
mtoc-grouping1.png (31.1 kB) - added by izzy on 12/08/08 12:25:49.
Multiple levels with hierarchical wikis may be a bit confusing
macros.syssort.patch (0.7 kB) - added by izzy on 12/08/08 12:57:54.
Ordering system pages alphabetically again (and remove the obsolete "Bonus Wild TIPS" at the end of the file)
negotiator.patch (1.2 kB) - added by izzy on 12/08/08 13:01:08.
Just some typo fixes ;)

Change History

12/04/08 18:12:06 changed by izzy

  • type changed from defect to enhancement.

I don't want to offend - but do you accept this RFE? Especially with a wiki grown quite large, this would help a lot to improve orientation in the index.

12/08/08 05:44:02 changed by gotoh

  • status changed from new to closed.
  • resolution set to fixed.

I've implemented it and hope to work correctly. Please try recent version (r4974).

12/08/08 12:14:45 changed by izzy

  • status changed from closed to reopened.
  • resolution deleted.

Thanx for the update! Unfortunately it causes just a mess here: The System-Pages are no longer ordered alphabetically, which causes multiple groups for the same prefix to appear (see attached screenshot "mtoc-grouping"). Moreover, it seems to have trouble with hierarchical wikis (see attached screenshot "mtoc-grouping1"). Screenshots have been made at r4977.

12/08/08 12:20:50 changed by izzy

  • attachment mtoc-grouping.png added.

System pages not ordered alphabetically, grouping messy

(follow-up: ↓ 7 ) 12/08/08 12:25:03 changed by izzy

Please forget the "hierarchical" problem - it was just a bit confusing. Looking at it a few minutes more, it absolutely makes sense. Still, I'll attach the screenshot - maybe there should be a switch for "how many levels deep" the grouping should go? If you refuse that, I guess it's just something to get used to.

12/08/08 12:25:49 changed by izzy

  • attachment mtoc-grouping1.png added.

Multiple levels with hierarchical wikis may be a bit confusing

12/08/08 12:57:54 changed by izzy

  • attachment macros.syssort.patch added.

Ordering system pages alphabetically again (and remove the obsolete "Bonus Wild TIPS" at the end of the file)

(follow-up: ↓ 8 ) 12/08/08 12:59:23 changed by izzy

Luckily I figured out how to get the system pages sorted again. Feel free to use the attached patch (which also removes the probably obsolete commented TOC override, which is already enabled in the section before the comment).

12/08/08 13:01:08 changed by izzy

  • attachment negotiator.patch added.

Just some typo fixes ;)

(follow-up: ↓ 9 ) 12/08/08 13:23:08 changed by izzy

Another comment: system_pages have no language extension - but this does not necessarily mean they are using the "default language". Instead, they are usually in English - regardless of what the current "default language" is.

Above is at least valid for the system_pages gathered from the wiki-default directory. If a user declares other pages as system_pages, this may be different (though it usually is not). So I'd suggest, as long as there is no additional language variant for any of the system files, to ommit the "language version" here completely.

Moreover, I'd appreciate to not see "default" there, but what is configured as default. Sure, I as the admin now what is "default" - but it is not that obvious to visitors of the site. Since this is probably a subjective decision ("default" could also indicate this is probably the "original" variant), I'd suggest to make this a switch for the trac.ini file, e.g. "lang_default = default" for the current state, or "lang_default = system" to use the default_lang defined in the wiki segment of the trac.ini.

(in reply to: ↑ 4 ; follow-up: ↓ 10 ) 12/08/08 14:58:41 changed by gotoh

Replying to izzy:

Still, I'll attach the screenshot - maybe there should be a switch for "how many levels deep" the grouping should go? If you refuse that, I guess it's just something to get used to.

depth argument is not enough? Is it differ from differ from Trac 0.11? Because I've almost copied the code and logic from trac, I expect the behaviour is same.

(in reply to: ↑ 5 ) 12/08/08 15:08:59 changed by gotoh

Replying to izzy:

Luckily I figured out how to get the system pages sorted again. Feel free to use the attached patch

Thanks, applied both patches in r4979.

(in reply to: ↑ 6 ) 12/08/08 15:22:33 changed by gotoh

  • status changed from reopened to closed.
  • resolution set to fixed.

Replying to izzy:

Another comment: system_pages have no language extension - but this does not necessarily mean they are using the "default language". Instead, they are usually in English - regardless of what the current "default language" is. Above is at least valid for the system_pages gathered from the wiki-default directory. If a user declares other pages as system_pages, this may be different (though it usually is not). So I'd suggest, as long as there is no additional language variant for any of the system files, to ommit the "language version" here completely.

Yeah, it is difficult issue because naming of the pages are not controlled. It may not be true when we use localized version of trac distribution. In fact, Japanese localized version of trac 0.10.x contains only translated wiki pages.

The 'default' means the 'non-suffixed'. And displayed in index because we should have link to non-suffixed pages. (Once I remove it, but resumed by request)

Anyway, this is another issue. Please open new ticket if to continue.

(in reply to: ↑ 7 ) 12/08/08 15:34:03 changed by izzy

Replying to gotoh:

depth argument is not enough? Is it differ from differ from Trac 0.11? Because I've almost copied the code and logic from trac, I expect the behaviour is same.

What depth argument? I tried with "(format=group,min=4)" - which means: Group if at least 4 elements can be grouped together. I tried adding "min=x" with x=1 and 2, no effect.

OTOH: As you can see on one of the screenshots, you group e.g. "GraphvizExamples/InvokingCirco?" like:

Maybe it looks less confusing without the complete Path mentioned for the document? For sure it would require less space on the screen then ;)


Add/Change #3839 (Grouping of entries)




Change Properties
Action