Qiskit / documentation

The documentation content home for https://docs.quantum.ibm.com.
https://docs.quantum.ibm.com
Apache License 2.0
26 stars 45 forks source link

Properly support global variables in API docs (`.. py:data::`) #1401

Open Eric-Arellano opened 1 month ago

Eric-Arellano commented 1 month ago

This builds on top of https://github.com/Qiskit/documentation/issues/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 Screenshot 2024-05-17 at 1 31 41 PM
annotated screenshot Screenshot 2024-05-17 at 1 31 41 PM
offending code https://github.com/Qiskit/documentation/blob/394ca77e604b7c58dd916c7ad8f104b6c1e339ac/docs/api/qiskit/dev/circuit.mdx?plain=1#L883-L893

I propose the design should look the same as our other components: a purple or blue left bar, header inside the component (https://github.com/Qiskit/documentation/issues/1395) with whatever the correct surrounding level would be, and ensure there is a <span id> or that the header has the ID.

jakelishman commented 1 month ago

Oh boy - "A EquivalenceLibrary" haha. No points for English for me.