-
Notifications
You must be signed in to change notification settings - Fork 85
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
Set up Function component for API docs redesign #1008
Comments
Eric-Arellano
added a commit
that referenced
this issue
Mar 13, 2024
API docs use Markdown components, and are about to use a lot more of them with the new API components like #1008. It's confusing to pretend they're MD files. This PR makes things consistent, which allows us to simplify some of our scripts to only deal with MDX and IPYNB extensions. The API docs were manually changed with this Bash snippet: ```bash for file in docs/api/**/*.md; do if [ -f "$file" ]; then mv "$file" "${file%.md}.mdx" fi done ```
github-merge-queue bot
pushed a commit
that referenced
this issue
Mar 25, 2024
Part of #1008 This PR is a precursor of #1026, and it creates a new script named `generateApiComponents.ts` with some tests. This script will have all the logic to generate the MDX components, but, in the meantime, this PR adds some functions that can be tested independently by just receiving, as parameters, a list of props or HTML code. It also copies over the functions `prepareGitHubLink` and `findByText` from `processHtml.ts`
This was referenced Mar 26, 2024
This was referenced Apr 3, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Apr 3, 2024
Part of #1008 This PR teaches our API generation script to generate MDX components that will define the styling of the classes, properties, attributes, methods, functions, and exceptions. The script will generate custom tags to wrap all the content and store useful information as props. This is an example of git diff for an Attribute: ```diff - ### dtm - Return the system time resolution of output signals :returns: The output signal timestep in seconds. :rtype: dtm + ### dtm + <Attribute id="qiskit_ibm_provider.IBMBackend.dtm" name="dtm"> + Return the system time resolution of output signals :returns: The output signal timestep in seconds. :rtype: dtm + </Attribute> ``` The script continues generating headers for every apiType that needs it, but this will be removed in a follow-up. ### Details The PR adds a new script named `generateMdxComponents.ts` that will generate all the components. The main function is `processMdxComponent` where we prepare the necessary props for each component and then return an open tag and a closed tag ready for its use. To process the new tags, new handlers have been added to `htmlToMd.ts`. --------- Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this issue
Jul 22, 2024
API docs use Markdown components, and are about to use a lot more of them with the new API components like Qiskit#1008. It's confusing to pretend they're MD files. This PR makes things consistent, which allows us to simplify some of our scripts to only deal with MDX and IPYNB extensions. The API docs were manually changed with this Bash snippet: ```bash for file in docs/api/**/*.md; do if [ -f "$file" ]; then mv "$file" "${file%.md}.mdx" fi done ```
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this issue
Jul 22, 2024
Part of Qiskit#1008 This PR is a precursor of Qiskit#1026, and it creates a new script named `generateApiComponents.ts` with some tests. This script will have all the logic to generate the MDX components, but, in the meantime, this PR adds some functions that can be tested independently by just receiving, as parameters, a list of props or HTML code. It also copies over the functions `prepareGitHubLink` and `findByText` from `processHtml.ts`
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this issue
Jul 22, 2024
Part of Qiskit#1008 This PR teaches our API generation script to generate MDX components that will define the styling of the classes, properties, attributes, methods, functions, and exceptions. The script will generate custom tags to wrap all the content and store useful information as props. This is an example of git diff for an Attribute: ```diff - ### dtm - Return the system time resolution of output signals :returns: The output signal timestep in seconds. :rtype: dtm + ### dtm + <Attribute id="qiskit_ibm_provider.IBMBackend.dtm" name="dtm"> + Return the system time resolution of output signals :returns: The output signal timestep in seconds. :rtype: dtm + </Attribute> ``` The script continues generating headers for every apiType that needs it, but this will be removed in a follow-up. ### Details The PR adds a new script named `generateMdxComponents.ts` that will generate all the components. The main function is `processMdxComponent` where we prepare the necessary props for each component and then return an open tag and a closed tag ready for its use. To process the new tags, new handlers have been added to `htmlToMd.ts`. --------- Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this issue
Jul 22, 2024
Part of Qiskit#1008 This PR regenerates qiskit-ibm-runtime API with the design changes introduced in Qiskit#1026
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this issue
Jul 22, 2024
Part of Qiskit#1008 This PR regenerates qiskit-ibm-provider API with the design changes introduced in Qiskit#1026
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this issue
Jul 22, 2024
Part of Qiskit#1008 This PR regenerates qiskit API with the design changes introduced in Qiskit#1026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Part of #479. We're going to start with adding an MDX component for
Function
s before adding the more complex class/method components, since functions don't have to deal as much with nesting. Functions are always top-level.<Function>
span id
for the full path:documentation/docs/api/qiskit/utils.md
Line 25 in 1471791
id
set with the short function name, a copy anchor link button, and the header shows up in the page ToCIt is not yet in scope to worry about indentation, #736. That is lower priority.
Component name
Should it be
<Function>
or<ApiFunction>
?The text was updated successfully, but these errors were encountered: