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 API Reference and Guides for TypeScript in docs #2266

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

Convly
Copy link
Member

@Convly Convly commented Oct 18, 2024

What does it do?

Add the first version for the first typescript guide in the documentation

Why is it needed?

Part of our effort to ease the adoption of TypeScript in Strapi

Created new markdown files for API Reference and Guides under TypeScript development. Updated sidebar configuration to include these new sections and added corresponding links and placeholders.
This guide covers prerequisites, type imports, and usage examples for working with Strapi documents and components using TypeScript. It includes detailed sections on generic and known entities, advanced use-cases, and type argument inference to enhance type safety and development efficiency.
Updated the tags in the TypeScript development documentation to include 'api reference' and 'guides' for better categorization and easier navigation. This helps users find relevant information more efficiently.
@Convly Convly added source: Dev Docs PRs/issues targeting the Developer Docs internal PRs created by the Strapi core team pr: new content PRs for new product features or new documentation sections labels Oct 18, 2024
Copy link

vercel bot commented Oct 18, 2024

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

Name Status Preview Comments Updated (UTC)
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 4:12pm

Copy link
Collaborator

@pwizla pwizla left a comment

Choose a reason for hiding this comment

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

Thank you, JS! Super useful changes.

I left lots of purely technical writing-oriented comments.
Happy to discuss things with you if you want, or just apply most of them, depending on what you prefer 🤗

- reference
---

# API Reference
Copy link
Collaborator

@pwizla pwizla Oct 21, 2024

Choose a reason for hiding this comment

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

Until this page has some more content, I'd suggest we don't link to it from the sidebar and the TypeScript intro. page.

If you want to inform users that an API reference is in the works, I'd suggest you use the special :::strapi callout in the TypeScript development intro. page.

See my comment in the TypeScript development file :)

docusaurus/docs/dev-docs/typescript/development.md Outdated Show resolved Hide resolved

---

import NotV5 from '/docs/snippets/_not-updated-to-v5.md'

# TypeScript Development with Strapi
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should always introduce the page to readers, so they know what it is about (obvious with the title, I know), what the 'feature' or topic is about, but also what they can expect to find on the page, and who will find this page useful.

What do you think we could add here?

- guides
---

# TypeScript Guides
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment about having at least a short introduction. We could link to other pages for context, for instance. At a minimum, we could have something like this:

Suggested change
# TypeScript Guides
# TypeScript guides
This page includes a curated list of common examples useful to use types while [developing a Strapi TypeScript application](/dev-docs/typescript/development).

- entries
---

# Manipulating documents and entries
Copy link
Collaborator

@pwizla pwizla Oct 21, 2024

Choose a reason for hiding this comment

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

It would also be nice to have a small introduction for this page, too 🙏

@pwizla pwizla self-assigned this Oct 21, 2024
@pwizla pwizla added this to the 5.1.4 milestone Oct 23, 2024
Copy link
Collaborator

@innerdvations innerdvations left a comment

Choose a reason for hiding this comment

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

Looks good so far, just had some of the same comments as Piwi had

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal PRs created by the Strapi core team pr: new content PRs for new product features or new documentation sections source: Dev Docs PRs/issues targeting the Developer Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants