Skip to content

8361366: Allow sorting of member details in lexicographical order #26322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nizarbenalla
Copy link
Member

@nizarbenalla nizarbenalla commented Jul 15, 2025

Please review this patch to add a toggle to order the member details in the table of contents in lexical order. The selected choice is stored and preserved.

Here is a preview of the new toggle.

Toggle.mov

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8361366: Allow sorting of member details in lexicographical order (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26322/head:pull/26322
$ git checkout pull/26322

Update a local copy of the PR:
$ git checkout pull/26322
$ git pull https://git.openjdk.org/jdk.git pull/26322/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26322

View PR using the GUI difftool:
$ git pr show -t 26322

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26322.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 15, 2025

👋 Welcome back nbenalla! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jul 15, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 15, 2025
@openjdk
Copy link

openjdk bot commented Jul 15, 2025

@nizarbenalla The following label will be automatically applied to this pull request:

  • javadoc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@mlbridge
Copy link

mlbridge bot commented Jul 15, 2025

Webrevs

@hns
Copy link
Member

hns commented Jul 17, 2025

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 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.

@hns
Copy link
Member

hns commented Jul 17, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javadoc [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants