Modify

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#3839 closed enhancement (fixed)

Grouping of entries

Reported by: izzy Owned by: Shun-ichi Goto
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 (4)

mtoc-grouping.png (34.0 KB) - added by izzy 8 years ago.
System pages not ordered alphabetically, grouping messy
mtoc-grouping1.png (31.1 KB) - added by izzy 8 years ago.
Multiple levels with hierarchical wikis may be a bit confusing
macros.syssort.patch (761 bytes) - added by izzy 8 years ago.
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 8 years ago.
Just some typo fixes ;)

Download all attachments as: .zip

Change History (14)

comment:1 Changed 8 years ago by izzy

Type: defectenhancement

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.

comment:2 Changed 8 years ago by Shun-ichi Goto

Resolution: fixed
Status: newclosed

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

comment:3 Changed 8 years ago by izzy

Resolution: fixed
Status: closedreopened

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.

Changed 8 years ago by izzy

Attachment: mtoc-grouping.png added

System pages not ordered alphabetically, grouping messy

comment:4 Changed 8 years ago 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.

Changed 8 years ago by izzy

Attachment: mtoc-grouping1.png added

Multiple levels with hierarchical wikis may be a bit confusing

Changed 8 years ago 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)

comment:5 Changed 8 years ago 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).

Changed 8 years ago by izzy

Attachment: negotiator.patch added

Just some typo fixes ;)

comment:6 Changed 8 years ago 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.

comment:7 in reply to:  4 ; Changed 8 years ago by Shun-ichi Goto

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.

comment:8 in reply to:  5 Changed 8 years ago by Shun-ichi Goto

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.

comment:9 in reply to:  6 Changed 8 years ago by Shun-ichi Goto

Resolution: fixed
Status: reopenedclosed

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.

comment:10 in reply to:  7 Changed 8 years ago 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:

  • Graphviz
    • Examples/
      • Invoking
        • GraphvizExamples/InvokingCirco

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Shun-ichi Goto.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.