Skip to content

Commit fa365e7

Browse files
Docs backlog (#49)
1 parent 5e97fbb commit fa365e7

File tree

64 files changed

+252
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+252
-175
lines changed

docs/capabilities/blocks/app_image_assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Adding Images
1+
# Adding images
22

33
Add images to your interactive post.
44

docs/capabilities/blocks/blocks_payments.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Adding Payments
1+
# Adding payments
22

33
You can use the payments template to build your app or add payment functionality to an existing app.
44

@@ -42,7 +42,7 @@ Each product in the products field has the following attributes:
4242
| `sku` | A product identifier that can be used to group orders or organize your products. Each sku must be unique for each product in your app. |
4343
| `displayName` | The official name of the product that is displayed in purchase confirmation screens. The name must be fewer than 50 characters, including spaces. |
4444
| `description` | A text string that describes the product and is displayed in purchase confirmation screens. The description must be fewer than 150 characters, including spaces. |
45-
| `price` | An predefined integer that sets the product price in Reddit gold. See details below. |
45+
| `price` | An predefined integer that sets the product price in Reddit Gold. See details below. |
4646
| `image.icon` | **(optional)** The path to the icon that represents your product in your assets folder. |
4747
| `metadata` | **(optional)** An optional object that contains additional attributes you want to use to group and filter products. Keys and values must be alphanumeric (a - Z, 0 - 9, and - ) and contain 30 characters or less. You can add up to 10 metadata keys. Metadata keys cannot start with "devvit-". |
4848
| `accountingType` | Categories for how buyers consume your products. Possible values are: <ul><li>`INSTANT` for purchased items that are used immediately and disappear.</li><li>`DURABLE` for purchased items that are permanently applied to the account and can be used any number of times</li><li>`CONSUMABLE` for items that can be used at a later date but are removed once they are used.</li><li>`VALID_FOR_` values indicate a product can be used throughout a period of time after it is purchased.</li></ul> |
@@ -74,7 +74,7 @@ You’ll need to clearly identify paid products or services. Here are some best
7474
- Use a short name, description, and image for each product.
7575
- Don’t overwhelm users with too many items.
7676
- Try to keep purchases in a consistent location or use a consistent visual pattern.
77-
- Only use the gold icon to indicate purchases for Reddit gold.
77+
- Only use the gold icon to indicate purchases for Reddit Gold.
7878

7979
### Product image
8080

docs/capabilities/client/forms.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ A form lets your app ask users to input and submit data. Forms can be defined wi
152152
</TabItem>
153153
</Tabs>
154154

155-
## Menu Response Forms
155+
## Menu response forms
156156

157157
For forms that open from a menu item, you can use menu responses. This is useful since you do not have access to the `@devvit/web/client` library from a menu item endpoint.
158158

docs/capabilities/client/menu-actions.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import Tabs from "@theme/Tabs";
22
import TabItem from "@theme/TabItem";
33

4-
# Menu Actions
4+
# Menu actions
55

66
Add an item to the three dot menu for posts, comments, or subreddits. Menu actions can perform immediate client effects or trigger server processing followed by client effects.
77

88
![Subreddit menu actions](../../assets/capabilities/menu-actions/menu-actions-subreddit.png)
99

10-
## Basic Menu Actions
10+
## Basic menu actions
1111

1212
**For most menu actions, use direct client effects.** These provide immediate responses and are perfect for simple actions that don't require server processing.
1313

@@ -121,7 +121,7 @@ context.ui.showForm(surveyForm);
121121
</TabItem>
122122
</Tabs>
123123

124-
## Supported Contexts
124+
## Supported contexts
125125

126126
You can decide where the menu action shows up by specifying the location property.
127127

docs/capabilities/client/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Tabs from '@theme/Tabs';
22
import TabItem from '@theme/TabItem';
33

4-
# Overview
4+
# Client Overview
55

66
Client-side effects enable your Devvit app to provide interactive feedback and navigation to users. These effects include showing toasts, displaying forms, navigating to different pages, and more.
77

docs/capabilities/devvit-web/devvit_web_configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Configure Your App
1+
# Configure your app
22

33
The devvit.json file serves as your app's configuration file. Use it to specify entry points, configure features like [event triggers](../server/triggers) and [scheduled actions](../server/scheduler.mdx), and enable app functionality such as [image uploads](../server/media-uploads.mdx). This page covers all available devvit.json configuration options. A complete devvit.json example file is provided [here](#complete-example).
44

docs/capabilities/devvit-web/devvit_web_overview.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ As with most experimental features, there are some caveats.
3434

3535
| Limitation | What it means |
3636
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
37-
| Serverless endpoints | The node server will run just long enough to execute your endpoint function and return a response, which means you cant use packages that require long-running connections like streaming. |
37+
| Serverless endpoints | The node server will run just long enough to execute your endpoint function and return a response, which means you can't use packages that require long-running connections like streaming. |
3838
| Package limitations | Developers cannot use `fs` or external native packages. For now, we recommend using external services over the native dependencies, such as [StreamPot](https://streampot.io/) (instead of ffmpeg) and [OpenAI](https://platform.openai.com/docs/guides/embeddings) (instead of @xenova/transformers) . |
39-
| Single request and single response handling only | Streaming or chunked responses and websockets are not supported. Long-polling is supported if it’s under the max request time. |
40-
| No external requests from your client | You can’t have any external requests other than the app's webview domain. All backend responses are locked down to the webview domain via CSP. (Your backend can make external fetch requests though.) |
39+
| Single request and single response handling only | Streaming or chunked responses and websockets are not supported. Long-polling is supported if it's under the max request time. |
40+
| No external requests from your client | You can't have any external requests other than the app's webview domain. All backend responses are locked down to the webview domain via CSP. (Your backend can make external fetch requests though.) |
41+
| localStorage clears on app updates | The iframe URL changes with each app version, so `localStorage` data is lost when you publish an update. Use [Redis](../server/redis.mdx) for data that needs to persist across app versions. |
4142

4243
Devvit Web still has the same technical requirements:
4344

docs/capabilities/server/cache-helper.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Tabs from '@theme/Tabs';
22
import TabItem from '@theme/TabItem';
33

4-
# Cache Helper
4+
# Cache helper
55

66
Cache helper lets you build a more performant app by reducing the number of server side calls for the same data. You can create a short-term cache that stores JSON objects in your Devvit app for a limited amount of time. This is valuable when you have many clients trying to get the same data, for example a stock ticker value or a sports score.
77

docs/capabilities/server/launch_screen_and_entry_points/launch_overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Overview
1+
# View Modes, Launch Screens, and Entry Points
22

33
Devvit’s interactive framework gives you powerful ways to shape how users experience apps, from launch screen to expanded screen viewing. With view modes, HTML-based launch screens, and multiple entry points, you can design apps that feel native and respond to how users interact across the Reddit platform.
44

docs/capabilities/server/launch_screen_and_entry_points/view_modes_entry_points.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Setting up View Modes and Entry Points
1+
# Setting up view modes and entry points
22

3-
## View Modes
3+
## View modes
44

55
Devvit apps support two view modes:
66

@@ -18,7 +18,7 @@ Devvit apps support two view modes:
1818
- **Use case**: Full games, longer load times, detailed interfaces, or any content that needs more space or full gesture support
1919
- **Trigger**: User-initiated only (button click, gesture, etc.)
2020

21-
## Multiple Entry Points
21+
## Multiple entry points
2222

2323
Multiple entry points let the user start the game from different contexts or states. For example, you can have a button that launches into a leaderboard view and another for a specific game mode, each of these would be configured as an entry point for your app. Define multiple entry points in your `devvit.json`. If you use the [Devvit Vite plugin](../../../guides/tools/vite), it automatically infers the client build inputs from these entrypoints, so you don't need to maintain a custom Rollup `input` list.
2424

@@ -78,7 +78,7 @@ your-app/
7878

7979
The `dir` property specifies where your built client files are located. With the Devvit Vite plugin, the `entry` values point at your source HTML files (for example `src/client/preview.html`), and the plugin outputs the matching files into `dist/client` during `vite build`.
8080

81-
### Creating Posts with Specific Entry Points
81+
### Creating posts with specific entry points
8282

8383
Use the `entry` parameter when creating posts to specify which entry point from your `devvit.json` configuration to use. The entry value must match one of the keys defined in `post.entrypoints`.
8484

@@ -118,7 +118,7 @@ async function createGamePost(context: any) {
118118
- Each entry point can have its own HTML file and height setting.
119119
- Invalid entry point names will cause an error.
120120

121-
### Switching Between View Modes
121+
### Switching between view modes
122122

123123
You can transition from inline mode to expanded mode with a different entry point, like this:
124124

@@ -135,7 +135,7 @@ const handleStartGame = async (event: React.MouseEvent) => {
135135
};
136136
```
137137

138-
## Inline Mode Requirements
138+
## Inline mode requirements
139139

140140
All Devvit web view apps load in inline mode by default. Your app loads directly in the post unit without requiring users to click to expand.
141141

0 commit comments

Comments
 (0)