Sort functions in doc index frames #543
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The list of functions per module in the left-hand frame in the HTML docs (e.g., http://www.erlang.org/doc/man/string.html) have been sorted by their order within the associated XML doc file, which is not always alphabetically. This makes quickly finding a function within a module's function index list slower than it would be if sorted, as a full visual scan of the functions needs to be done to attempt to locate any specific function. Or, if the viewer doesn't realize that the list is not sorted, possibly missing a function that does appear in the list.
In some cases the reason for the misordering is that related functions are grouped together in the XML doc (e.g., string:chr/2 and string:rchr/2), as that makes sense when reading the body of the documentation. In other cases, there's no clear reason for the misordering.
Regardless, an index list of functions, such as this, which is sorted for most modules, but not always, is confusing. This change sorts the function index list per module alphabetically, while leaving alone the body of the page. In cases where module callbacks are included in the documentation (e.g., http://www.erlang.org/doc/man/application.html), those functions (e.g., Module:start/2) still remain at the bottom of the index list.