doc icon indicating copy to clipboard operation
doc copied to clipboard

Sort Table of Contents

Open zoffixznet opened this issue 9 years ago • 15 comments

As reported in https://github.com/perl6/user-experience/issues/10, the method names in the table of contents are in no coherent order, which makes it hard to spot the one you want to read about. I'd suggest them to be sorted alphabetically.

untitled

zoffixznet avatar Feb 11 '16 00:02 zoffixznet

Are you saying that 「combinations」 and 「permutations」 should be far away from each other? I don't think so. In fact, I always loved how it was more or less sorted in “what I need is usually on top” order.

AlexDaniel avatar Feb 11 '16 02:02 AlexDaniel

Then maybe there ought to be clear category subparts under which such things could be grouped. Closing this without more discussion isn't helpful IMHO.

tbrowder avatar Feb 11 '16 12:02 tbrowder

Yep. For me an example of a good documentation is Qt. it's alphabetical order but methods that do thing related thing are mentioned in each other.

2016-02-11 13:49 GMT+01:00 Tom Browder [email protected]:

Then maybe there ought to be clear category subparts under which such things could be grouped. Closing this without more discussion isn't helpful IMHO.

— Reply to this email directly or view it on GitHub https://github.com/perl6/doc/issues/392#issuecomment-182848899.

Sylvain "Skarsnik" Colinet

Victory was near but the power of the ring couldn't be undone

Skarsnik avatar Feb 11 '16 13:02 Skarsnik

@tbrowder would you have any examples of how such a category layout would look like?

In the screenshot above, I see keys, values, and kv as one group, pairs is somewhat similar to kv, but doesn't really fit into that group entirely. To me classify more tightly fits into a group with sort, but you can equally argue the grep group is appropriate too.

There is some intelligence with the current grouping; trying to break it up into more refined subcategories would result in a lot of bikeshed IMO, especially since many methods are inherited from other classes.

Also, does anyone know how the current sorting is made up? It is all just hand-ordered?

zoffixznet avatar Feb 11 '16 13:02 zoffixznet

On Thursday, February 11, 2016, Skarsnik [email protected] wrote:

Yep. For me an example of a good documentation is Qt. it's alphabetical order but methods that do thing related thing are mentioned in each other.

Sounds like a good solution to me (maybe a bit of pain for doc writers, but only for a brief while).

-Tom

tbrowder avatar Feb 11 '16 14:02 tbrowder

Yeah, closing this is not helpful. If somebody feels uncomfortable with the current layout then we should do something.

There are other interesting ways to tackle this. For example, we can add a javascript _A-Z_ button that will sort the list alphabetically.

AlexDaniel avatar Feb 11 '16 15:02 AlexDaniel

Managing a category layout is more work that we're not going to be doing yet. For now, the best solution is a case insensitive sort, IMO. The existing order has no obvious meaning, let's at least provide something that lets people find what they're looking for more easily.

coke avatar Jun 10 '16 13:06 coke

If anyone disagrees with my Jun 10th comment, please ping this ticket in the next week or so; otherwise we'll go with that for now.

coke avatar Dec 08 '16 01:12 coke

I'm pinging this ticket now. What happened to it? Do we have a proper order? If that's the case and there are problems somewhere else like having categories, I suggest to open a separate discussion for that.

JJ avatar Jan 27 '18 19:01 JJ

I'm not so sure about this. Right now they are in the same order as in the original document, which I guess has some merit to it, because it's how it was intended by its author(s). You can still search within the page using Ctrl-F and the website search. As @AlexDaniel has commented, we would need a major refactoring of htmlify.p6 to add JS code that sorts this. I don't see how that effort would have a good return on investment by offering an arrangement of contents that would be arguably better. There's a point in the rearrangement of documentation, however... But once again, it escapes the boundaries of this particular issue.

JJ avatar Feb 10 '18 12:02 JJ

This work was never done. This work still needs to be done.

coke avatar Feb 10 '18 17:02 coke

One thing that could be done is similar to the mod I made to htmlify.p6 at 3f9f9aac4e569fd5524c868b32b77e3040846257

tbrowder avatar Feb 10 '18 18:02 tbrowder

If you feel it helps, do it by all means...

JJ avatar Feb 10 '18 19:02 JJ

oops, that was for files, not parts inside a file!

tbrowder avatar Feb 10 '18 19:02 tbrowder

Since tables are now sortable, maybe we could throw this inside a table and just make it sortable by default?

JJ avatar Apr 18 '18 08:04 JJ