Skip to content
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

Historical API docs inlining: place methods in Methods section #1388

Open
Tracked by #479 ...
Eric-Arellano opened this issue May 15, 2024 · 4 comments
Open
Tracked by #479 ...

Historical API docs inlining: place methods in Methods section #1388

Eric-Arellano opened this issue May 15, 2024 · 4 comments

Comments

@Eric-Arellano
Copy link
Collaborator

See https://docs.quantum.ibm.com/api/qiskit/0.24/qiskit.aqua.QuantumInstance. Note how we have the Methods table, then Methods table, then a list of all the inline methods/attributes at the very end, looking like it's under Attributes. That's confusing. Instead, the methods should go under Methods.

I suspect this is an issue with our inlining code.

@arnaucasau
Copy link
Collaborator

I checked the Box artifact for qiskit 0.24, and, at least in that case, the HTML has all the methods and attributes together sorted alphabetically as well after the two sections with the tables of contents.

What do you think about adding a new header in between the last table of contents and the list of all members like in this example:

Captura desde 2024-05-16 19-06-30

I'm open to ideas for other names for the new section if we decide that's a good solution. I think that fixes the problem with the right ToC without adding extra complexity to the script

Captura desde 2024-05-16 19-06-38

@Eric-Arellano
Copy link
Collaborator Author

That's a good proposal. That would imply we don't remove the summary table in #1389, which I'm okay with.

If these were modern API docs, then I think it'd be worth the code complexity to remove the summary tables and place the members in the correct sections. But because it only impacts old docs, let's go with your proposal.

@Eric-Arellano
Copy link
Collaborator Author

@arnaucasau we want to call this "Member implementations" rather than "Members list", or we could consider a better name. We don't like "list" because these are all lists.

@arnaucasau
Copy link
Collaborator

This PR has an implementation of a fix consisting of searching in the page if there exists a table with an immediate header called "Methods" or "Attributes". In that case, we need to add a new section header after the last table that will serve as a section for all the methods and attributes sorted alphabetically.

This header has to be removed in the case where we substitute the tables afterward inlining the methods/attributes, and this could be done by searching inside the unified plugin of mergeClassMembers.ts.

Todo:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants