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

Add back class modifier in front of class signatures #1287

Closed
Tracked by #479
Eric-Arellano opened this issue May 2, 2024 · 3 comments
Closed
Tracked by #479

Add back class modifier in front of class signatures #1287

Eric-Arellano opened this issue May 2, 2024 · 3 comments

Comments

@Eric-Arellano
Copy link
Collaborator

This is how Sphinx renders https://docs.quantum.ibm.com/api/qiskit/dev/circuit#bits-and-registers

Screenshot 2024-05-02 at 4 05 32 PM

Vs us:

Screenshot 2024-05-02 at 4 05 41 PM

<Class id="qiskit.circuit.Bit" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/bit.py#L21-L94" signature="qiskit.circuit.Bit(register=None, index=None)">

Should we add back the class modifier? Should it only be for inline classes, or also dedicated pages like https://docs.quantum.ibm.com/api/qiskit/dev/qiskit.circuit.AnnotatedOperation?

Screenshot 2024-05-02 at 4 09 32 PM

If so, should it be italicized? If it should be italicized, should we add a new attribute to the component like signaturePrefix?

--

What's interesting is some signatures are preserved, like final class and static. Why is this?

<Class id="qiskit.circuit.classical.expr.Var" github="https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/circuit/classical/expr/expr.py#L109-L168" signature="final class qiskit.circuit.classical.expr.Var(var, type)">

<Function id="qiskit_ibm_runtime.options.Options.validate_options" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.23/qiskit_ibm_runtime/options/options.py#L351-L379" signature="static validate_options(options)">

@Eric-Arellano Eric-Arellano changed the title Add back class modifier in front of class signatures? Add back class modifier in front of class signatures May 3, 2024
@Eric-Arellano
Copy link
Collaborator Author

We decided that we do want to do this. We still need to figure out the design. Devs should create a few examples for us to decide:

  • class in the code section w/o italics
  • class in the code section w/ italics (if possible)
  • class before the code section w/o italics
  • class before the code section w/ italics

We should audit if there are any other modifiers we've been dropping.

@arnaucasau
Copy link
Collaborator

Here are the screenshots with an example of how each design would look like. I added the case where we have the modifier w/ bold in and before the code section.

Inside the code section examples

Option 1. class in the code section

Captura desde 2024-05-07 18-26-34

Option 2. class in the code section w/ italics

Captura desde 2024-05-07 18-29-24

Option 3. class in the code section w/ bold

Captura desde 2024-05-07 18-34-41

Before the code section examples

Option 4. class before the code section

Captura desde 2024-05-07 18-32-42

Option 5. class in the code section w/ italics

Captura desde 2024-05-07 18-31-12

Option 6. class before the code section w/ bold

Captura desde 2024-05-07 18-33-34

github-merge-queue bot pushed a commit that referenced this issue May 13, 2024
Part of  #1287

This PR adds modifiers to the signatures of our API components. We
continue removing the modifiers for attributes and properties given that
we don't show their signature on the website.

This change should be merged after changing the MDX components on IQP to
support the new prop.
github-merge-queue bot pushed a commit that referenced this issue May 13, 2024
Part of  #1287
Follow-up of #1337

This PR regenerates the API docs incorporating the changes of #1337.
This is split into two PRs to help in the review of the changes to the
script and due to the amount of files modified. Here we can find all
versions except qiskit 1.0 which was generated in #1337 to review it
more exhaustively.

This change should be merged after changing the MDX components on IQP to
support the new prop.
@Eric-Arellano Eric-Arellano moved this to In Review in Docs Planning May 13, 2024
@Eric-Arellano
Copy link
Collaborator Author

Closed by @arnaucasau in #1337 🚀

@github-project-automation github-project-automation bot moved this from In Review to Done in Docs Planning May 13, 2024
frankharkins pushed a commit to frankharkins/documentation that referenced this issue Jul 22, 2024
Part of  Qiskit#1287

This PR adds modifiers to the signatures of our API components. We
continue removing the modifiers for attributes and properties given that
we don't show their signature on the website.

This change should be merged after changing the MDX components on IQP to
support the new prop.
frankharkins pushed a commit to frankharkins/documentation that referenced this issue Jul 22, 2024
Part of  Qiskit#1287
Follow-up of Qiskit#1337

This PR regenerates the API docs incorporating the changes of Qiskit#1337.
This is split into two PRs to help in the review of the changes to the
script and due to the amount of files modified. Here we can find all
versions except qiskit 1.0 which was generated in Qiskit#1337 to review it
more exhaustively.

This change should be merged after changing the MDX components on IQP to
support the new prop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants