Skip to content

Add missing TypeScript version to Admin Panel API code example#2372

Merged
pwizla merged 6 commits into
strapi:mainfrom
oktapodia:patch-1
Feb 6, 2025
Merged

Add missing TypeScript version to Admin Panel API code example#2372
pwizla merged 6 commits into
strapi:mainfrom
oktapodia:patch-1

Conversation

@oktapodia

Copy link
Copy Markdown
Contributor

Adding related type

What does it do?

Adding the missing typescript type to the documentation

Why is it needed?

Avoid taking a couple of minutes to find the right type across strapi code

Related issue(s)/PR(s)

Adding related type
@oktapodia oktapodia requested a review from pwizla as a code owner February 3, 2025 08:38
@vercel

vercel Bot commented Feb 3, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
documentation ❌ Failed (Inspect) Feb 6, 2025 10:14am

@strapi-cla

strapi-cla commented Feb 3, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@pwizla pwizla added the temp - port to docs-next (Temporary label) The content of this PR should be ported to docs-next.strapi.io label Feb 4, 2025

@pwizla pwizla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @oktapodia!

Ideally, we should have JavaScript and TypeScript tabs anywhere in the docs, and indeed it seems this page does not have it yet.

  • Would you mind updating your PR with this in mind?

Here's how JS/TS tabs should be handled in our Docusaurus instance:

<Tabs groupId="js-ts">
<TabItem value="js" label="JavaScript">
JS code block goes here
</TabItem>

<TabItem value="ts" label="TypeScript">
TS code block goes here
</TabItem>
<Tabs>

The groupId and value properties should be left as in my example so Docusaurus will remember the user's choice and tabs will stay in sync across all pages.

  • Additionnally, would you mind going the extra mile and adding JS/TS tabs for all examples on this page? It would be greatly appreciated 🙏 but if too much work for you I'll add it to my backlog.

@pwizla pwizla self-assigned this Feb 4, 2025
@pwizla pwizla added source: Dev Docs PRs/issues targeting the Developer Docs pr: chore labels Feb 4, 2025

@pwizla pwizla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.
Missed codeblocks quotes, I fixed them for you

Comment thread docusaurus/docs/dev-docs/plugins/admin-panel-api.md Outdated
Comment thread docusaurus/docs/dev-docs/plugins/admin-panel-api.md Outdated
Comment thread docusaurus/docs/dev-docs/plugins/admin-panel-api.md Outdated
Comment thread docusaurus/docs/dev-docs/plugins/admin-panel-api.md
@pwizla pwizla changed the title Update admin-panel-api.md Add missing TypeScript version to Admin Panel API code example Feb 6, 2025
@pwizla pwizla added this to the 5.6.0 milestone Feb 6, 2025
@pwizla pwizla merged commit a16093f into strapi:main Feb 6, 2025
pwizla added a commit that referenced this pull request Feb 6, 2025
@pwizla pwizla removed the temp - port to docs-next (Temporary label) The content of this PR should be ported to docs-next.strapi.io label Feb 6, 2025
@oktapodia

Copy link
Copy Markdown
Contributor Author

@pwizla

pwizla commented Feb 13, 2025

Copy link
Copy Markdown
Collaborator

Thanks for following up, @oktapodia. I fixed it on the main branch directly, was easier/faster for me 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: chore source: Dev Docs PRs/issues targeting the Developer Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants