docs: change notes across docs based on redesign (#8662)

Change the prerequisites / soon / other notes based on latest redesign

Depends on #8661
This commit is contained in:
Shahed Nasser
2024-08-23 07:59:48 +00:00
committed by GitHub
parent 320b01f45d
commit b23f0f8188
41 changed files with 291 additions and 220 deletions
@@ -5,9 +5,3 @@ export const metadata = {
# {metadata.title}
In the next chapters, you'll learn more about creating data models, including property types, relationships, and more.
<Note type="soon" title="Important">
Data models are in active development and may change.
</Note>
@@ -1,26 +1,22 @@
import { BetaBadge } from "docs-ui"
export const metadata = {
title: `${pageNumber} Data Model Relationships`,
}
# {metadata.title}
# {metadata.title} <BetaBadge text="Beta" tooltipText="Data model relationships are in active development and may change." />
In this chapter, youll learn how to define relationships between data models in your module.
<Note type="soon" title="Important">
Data model relationships are in active development and may change.
</Note>
<Note title="Use data model relationships when" type="success">
- You want to create a relation between data models in the same module.
You want to create a relation between data models in the same module.
</Note>
<Note title="Don't use data model relationships if" type="error">
- You want to create a relationship between data models in different modules. Use module links instead.
You want to create a relationship between data models in different modules. Use module links instead.
</Note>
@@ -1,17 +1,13 @@
import { BetaBadge } from "docs-ui"
export const metadata = {
title: `${pageNumber} Module Link`,
}
# {metadata.title}
# {metadata.title} <BetaBadge text="Beta" tooltipText="Module links are in active development." />
In this chapter, youll learn what a module link is.
<Note type="soon" title="In Development">
Module links are in active development.
</Note>
## What is a Module Link?
A module link forms an association between two data models of different modules, while maintaining module isolation.
@@ -20,13 +16,13 @@ You can then retrieve data across the linked modules, and manage their linked re
<Note title="Use module links when" type="success">
- You want to create a relation between data models from different modules.
You want to create a relation between data models from different modules.
</Note>
<Note title="Don't use module links if" type="error">
- You want to create a relationship between data models in the same module. Use data model relationships instead.
You want to create a relationship between data models in the same module. Use data model relationships instead.
</Note>
@@ -1,17 +1,13 @@
import { BetaBadge } from "docs-ui"
export const metadata = {
title: `${pageNumber} Remote Link`,
}
# {metadata.title}
# {metadata.title} <BetaBadge text="Beta" tooltipText="Remote Links are in active development." />
In this chapter, youll learn what the remote link is and how to use it to manage links.
<Note type="soon" title="In Development">
Remote Links are in active development.
</Note>
## What is the Remote Link?
The remote link is a class with utility methods to manage links between data models. Its registered in the Medusa container under the `remoteLink` registration name.
@@ -16,7 +16,7 @@ The service factory generates data management methods for your data models, so y
<Note title="Extend the service factory when" type="success">
- Your service provides data-management functionalities of your data models.
Your service provides data-management functionalities of your data models.
</Note>
@@ -8,13 +8,13 @@ In this chapter, you'll learn how to expose a hook in your workflow.
<Note title="Expose workflow hooks when" type="success">
- Your workflow is reusable in other applications, and you allow performing an external action at some point in your workflow.
Your workflow is reusable in other applications, and you allow performing an external action at some point in your workflow.
</Note>
<Note title="Don't expose workflow hooks if" type="error">
- Your workflow isn't reusable by other applications. Use a step that performs what a hook handler would instead.
Your workflow isn't reusable by other applications. Use a step that performs what a hook handler would instead.
</Note>
@@ -14,7 +14,7 @@ Medusa exposes hooks in many of its workflows that are used in its API routes. Y
<Note title="Consume workflow hooks when" type="success">
- You want to perform a custom action during a workflow's execution, such as when a product is created.
You want to perform a custom action during a workflow's execution, such as when a product is created.
</Note>
+1 -1
View File
@@ -58,6 +58,6 @@ curl http://localhost:9000/store/hello-world
<Note title="Use API routes when" type="success">
- You're exposing custom functionality to be used by a storefront, admin dashboard, or any external application.
You're exposing custom functionality to be used by a storefront, admin dashboard, or any external application.
</Note>
@@ -92,12 +92,12 @@ If ran successfully, the `my_custom` table will be created in the database.
<Note title="Use data models when" type="success">
- You want to store data related to your customization in the database.
You want to store data related to your customization in the database.
</Note>
<Note title="Don't use data models if" type="error">
- You want to store simple key-value pairs related to an existing data model. Instead, use the `metadata` field that most existing models have, which is an object of custom key-value pairs.
You want to store simple key-value pairs related to an existing data model. Instead, use the `metadata` field that most existing models have, which is an object of custom key-value pairs.
</Note>
@@ -68,7 +68,7 @@ The first message indicates that the `product.created` event was emitted, and th
<Note title="Use subscribers when" type="success">
- You want to perform an action everytime a specific event is emitted in the Medusa application.
You want to perform an action everytime a specific event is emitted in the Medusa application.
</Note>
+1 -1
View File
@@ -71,6 +71,6 @@ Among the messages logged in the terminal, youll see the following message:
<Note title="Don't use loaders if" type="error">
- You want to perform an action continuously or at a set time pattern in the application. Use scheduled jobs instead, which is explained in an upcoming chapter.
You want to perform an action continuously or at a set time pattern in the application. Use scheduled jobs instead, which is explained in an upcoming chapter.
</Note>
@@ -1,25 +1,24 @@
import { Prerequisites, BetaBadge } from "docs-ui"
export const metadata = {
title: `${pageNumber} Next.js Starter`,
}
# {metadata.title}
# {metadata.title} <BetaBadge text="Beta" tooltipText="The Next.js Starter is currently in development to fully support Medusa v2." />
In this chapter, youll learn how to install and use the Next.js Starter storefront.
<Note type="soon">
The Next.js Starter is currently in development to fully support Medusa v2.
</Note>
## Install Next.js Starter
<Note type="check">
- [Node v18+](https://nodejs.org/en/)
- At least one region in the Medusa application.
</Note>
<Prerequisites items={[
{
text: "Node.js v20+",
link: "https://nodejs.org/en/download"
},
{
text: "At least one region in the Medusa application.",
},
]} />
1. Clone the `v2` branch of the [Next.js Starter](https://github.com/medusajs/nextjs-starter-medusa/tree/v2):