RFR: 8361366: Allow sorting of member details in lexicographical order [v2]
Nizar Benalla
nbenalla at openjdk.org
Tue Sep 9 09:26:00 UTC 2025
On Thu, 17 Jul 2025 09:19:21 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
>> This looks good, but there's some room for improvement.
>>
>> My biggest gripe is that it only reorders the members in the table of contents, but not the member details in the page. Thus, when scrolling through the page, the selection in the TOC jumps around randomly. The idea of the scroll-following TOC is that it mirrors the order of page contents, so both TOC and page contents should be reordered IMO.
>>
>> I think the icon is not very good at hinting at its function. Some variant of [A-Z sort icon ](https://www.flaticon.com/free-icons/sort-alphabetically) might work better. There should probably be a different icon for non-lexicographic source order, but I'm not sure what that should be. I can help with creating the icons.
>>
>> Is there a reason for putting the functionality in a new JavaScript file? I agree `script.js` is a bit overloaded and unorderly, but I would prefer cleaning up that existing file instead of adding a new one.
>
>> both TOC and page contents should be reordered IMO
>
> Thinking about it some more, I think it should be enough to reorder member details in the main section, and then rebuild the TOC to let it do its thing.
@hns I have moved the functionality to `script.js` and updated the logic to sort the member details in the page.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26322#issuecomment-3269712854
More information about the javadoc-dev
mailing list