-
Notifications
You must be signed in to change notification settings - Fork 86
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
Properly support global variables in API docs (.. py:data::
)
#1401
Comments
github-merge-queue bot
pushed a commit
that referenced
this issue
May 17, 2024
We will set up redirects in closed source. The new circuit module rewrite suffers from #1401. That's not blocking this release, though.
Oh boy - "A |
Eric-Arellano
changed the title
Properly support
Properly support global variables in API docs (May 17, 2024
.. py:data::
.. py:data::
)
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this issue
Jul 22, 2024
We will set up redirects in closed source. The new circuit module rewrite suffers from Qiskit#1401. That's not blocking this release, though.
github-merge-queue bot
pushed a commit
that referenced
this issue
Sep 6, 2024
Closes #1401 and #935. We reuse `<Attribute>`, which actually works out quite well! It understands how to parse when the data object has a value assigned to it like `= "my_value"`. It can also properly detect `isDedicatedPage`. ![image](https://github.com/user-attachments/assets/dd938c50-3182-4573-a678-74271a3b72cf) There is one weird edge case: Qiskit was improperly using `.. py:data::` inside a table in `utils.mdx`. Naively, it would cause issues with trying to render the component inside the table, which does not work. I fixed it in Qiskit `main`, but it would be too time consuming to fix on 0.35+. So, we now have a line to skip over converting to an `Attribute` Component if the element is inside a table. That means the table will continue to render the same as before on those historical docs - the biggest downside is that anchor links still will be broken for the page. <img width="863" alt="Screenshot 2024-09-06 at 9 40 51 AM" src="https://github.com/user-attachments/assets/f7355c1f-ed50-4293-976d-42f02fdf6013"> A follow up will simplify our linters like checking for orphan pages, since this PR fixes a lot of those problems.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This builds on top of #935, which is about broken cross-references. This issue is to also have a more intentional visual design for
.. py:data::
, such as an MDX component like<GlobalVariable>
(name tbd).unannotated screenshot
annotated screenshot
offending code
documentation/docs/api/qiskit/dev/circuit.mdx
Lines 883 to 893 in 394ca77
I propose the design should look the same as our other components: a purple or blue left bar, header inside the component (#1395) with whatever the correct surrounding level would be, and ensure there is a
<span id>
or that the header has the ID.The text was updated successfully, but these errors were encountered: