Skip to content

Commit 107e9b1

Browse files
tweaks
1 parent 05bb396 commit 107e9b1

2 files changed

Lines changed: 92 additions & 68 deletions

File tree

docs/guides/faq.mdx

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,23 @@ One other common gotcha: Devvit projects use `vite build --watch` rather than a
8787

8888
</details>
8989

90-
<span id="how-do-i-update-the-devvit-cli-and-app-version"></span>
90+
<span id="how-do-i-update-the-devvit-cli"></span>
9191
<details>
92-
<summary>How do I update the Devvit CLI and app version?</summary>
92+
<summary>How do I update the Devvit CLI?</summary>
9393

9494
Prefer updating the project-local CLI dependency instead of relying on a global install. The current docs recommend updating `devvit` in your project, then running `npx devvit update app` so your `@devvit` packages match the CLI.
9595

9696
For the current commands and workflow, see [Devvit CLI](./tools/devvit_cli.mdx), [Optimizing performance](../capabilities/blocks/optimize_performance.md), and the update notes in [Changelog](../changelog.md).
9797

9898
</details>
9999

100-
<span id="how-do-i-handle-scrolling-and-touch-gestures-in-inline-vs-expanded-mode"></span>
100+
<span id="how-do-i-update-my-app-version"></span>
101101
<details>
102-
<summary>How do I handle scrolling and touch gestures in inline vs expanded mode?</summary>
102+
<summary>How do I update my app version?</summary>
103103

104-
Treat inline and expanded mode differently. Inline should avoid scroll traps and heavy gesture hijacking so users can still scroll past the post, while expanded is the right place for richer touch interaction and more space.
104+
Updating the CLI and publishing a new app version are separate steps. Your app version changes when you publish: `npx devvit publish` creates the next launch version, and you can control that with `--bump` or `--version` as described in [Launch your app](./launch/launch-guide.md).
105105

106-
There is no single canonical viewport size for all devices. Design responsively, test in [UI Simulator](./tools/ui_simulator.mdx), and use the current launch-mode docs for inline vs expanded behavior in [View modes and entry points](../capabilities/server/launch_screen_and_entry_points/view_modes_entry_points.md) and [Launch screen customization](../capabilities/server/launch_screen_and_entry_points/launch_screen_customization.md).
106+
After that, the subreddit still needs to be on the version you want installed. In other words, publishing a new version is not the same as updating every subreddit automatically. Use [`devvit install`](./tools/devvit_cli.mdx#devvit-install) or the normal app install/update flow for that subreddit to move it to the desired version.
107107

108108
</details>
109109

@@ -117,6 +117,16 @@ For command syntax, see [Devvit CLI](./tools/devvit_cli.mdx). For the review and
117117

118118
</details>
119119

120+
<span id="what-should-i-do-after-playtest-when-i-am-ready-to-launch"></span>
121+
<details>
122+
<summary>What should I do after playtest when I am ready to launch?</summary>
123+
124+
Before launch, make sure the app is stable across mobile and web, test with multiple accounts, and add an installer-friendly `README.md`. Then follow the publish flow in [Launch your app](./launch/launch-guide.md).
125+
126+
If you are just ending a playtest session, remember that the latest playtest install remains in place until you change installs. [Playtest](./tools/playtest.md) and [`devvit install`](./tools/devvit_cli.mdx#devvit-install) cover that handoff.
127+
128+
</details>
129+
120130
<span id="how-do-i-install-my-app-on-another-subreddit"></span>
121131
<details>
122132
<summary>How do I install my app on another subreddit?</summary>
@@ -133,15 +143,7 @@ If the goal is broader distribution, follow [Launch your app](./launch/launch-gu
133143

134144
Published apps are unlisted by default. That is usually the right fit for games and single-community tools. If you want your app to appear in the App Directory so any moderator can install it, use `npx devvit publish --public` and follow the listing guidance in [Launch your app](./launch/launch-guide.md).
135145

136-
</details>
137-
138-
<span id="what-should-i-do-after-playtest-when-i-am-ready-to-launch"></span>
139-
<details>
140-
<summary>What should I do after playtest when I am ready to launch?</summary>
141-
142-
Before launch, make sure the app is stable across mobile and web, test with multiple accounts, and add an installer-friendly `README.md`. Then follow the publish flow in [Launch your app](./launch/launch-guide.md).
143-
144-
If you are just ending a playtest session, remember that the latest playtest install remains in place until you change installs. [Playtest](./tools/playtest.md) and [`devvit install`](./tools/devvit_cli.mdx#devvit-install) cover that handoff.
146+
Public apps should look launch-ready: the launch docs call for a detailed installer-facing `README.md`, and game launch guidance expects a custom launch or first screen rather than a rough default experience.
145147

146148
</details>
147149

@@ -211,6 +213,16 @@ Prefer HTML launch entry points for new work. The older `splash` parameter is st
211213

212214
</details>
213215

216+
<span id="how-do-i-handle-scrolling-and-touch-gestures-in-inline-vs-expanded-mode"></span>
217+
<details>
218+
<summary>How do I handle scrolling and touch gestures in inline vs expanded mode?</summary>
219+
220+
Treat inline and expanded mode differently. Inline should avoid scroll traps and heavy gesture hijacking so users can still scroll past the post, while expanded is the right place for richer touch interaction and more space.
221+
222+
There is no single canonical viewport size for all devices. Design responsively, test in [UI Simulator](./tools/ui_simulator.mdx), and use the current launch-mode docs for inline vs expanded behavior in [View modes and entry points](../capabilities/server/launch_screen_and_entry_points/view_modes_entry_points.md) and [Launch screen customization](../capabilities/server/launch_screen_and_entry_points/launch_screen_customization.md).
223+
224+
</details>
225+
214226
<span id="how-do-i-add-images-that-ship-with-my-app"></span>
215227
<details>
216228
<summary>How do I add images that ship with my app?</summary>
@@ -253,19 +265,21 @@ Set `postData` when creating the post, then read it from `context.postData` on e
253265

254266
</details>
255267

256-
<span id="how-do-i-post-or-comment-as-the-user-instead-of-the-app"></span>
268+
<span id="how-do-i-build-a-leaderboard-with-redis"></span>
257269
<details>
258-
<summary>How do I post or comment as the user instead of the app?</summary>
270+
<summary>How do I build a leaderboard with Redis?</summary>
259271

260-
Add the required `permissions.reddit.asUser` entries in `devvit.json`, then call the supported Reddit APIs with `runAs: 'USER'`. The main doc for this is [User Actions](../capabilities/server/userActions.mdx), which also explains the review requirements, explicit opt-in rules, and `userGeneratedContent` expectations.
272+
The standard Devvit pattern is to build leaderboards with Redis sorted sets. Use [Redis](../capabilities/server/redis.mdx) for score storage and ranking, use [Scheduler](../capabilities/server/scheduler.mdx) for daily or periodic resets, and prefer realtime updates over constant polling when you need a live leaderboard.
273+
274+
Keep the FAQ answer short: Redis is the right storage layer, but the exact schema depends on whether you need daily, weekly, or all-time rankings. The best starting points are [Redis](../capabilities/server/redis.mdx) and the leaderboard/performance guidance in [Optimizing performance](../capabilities/blocks/optimize_performance.md).
261275

262276
</details>
263277

264-
<span id="why-does-runas-user-still-post-as-the-app-during-playtest"></span>
278+
<span id="can-a-menu-action-create-a-new-post"></span>
265279
<details>
266-
<summary>Why does <code>runAs: 'USER'</code> still post as the app during playtest?</summary>
280+
<summary>Can a menu action create a new post?</summary>
267281

268-
Before the app version is approved, user actions are not enabled for everyone. During playtest or other unapproved versions, `runAs: 'USER'` falls back to the app account for most users, while actions taken by the app owner are attributed to the owner's username. After publishing and approval, it operates on behalf of the user for all users. See [User Actions](../capabilities/server/userActions.mdx).
282+
Yes. Define the menu item in `devvit.json`, implement the server endpoint it calls, and create the post from that route. The pattern is documented across [Menu actions](../capabilities/client/menu-actions.mdx) and [Interactive posts overview](../capabilities/interactive-posts/interactive_posts_overview.mdx).
269283

270284
</details>
271285

@@ -277,11 +291,19 @@ Use [Scheduler](../capabilities/server/scheduler.mdx) for cron-style recurring j
277291

278292
</details>
279293

280-
<span id="can-a-menu-action-create-a-new-post"></span>
294+
<span id="how-do-i-post-or-comment-as-the-user-instead-of-the-app"></span>
281295
<details>
282-
<summary>Can a menu action create a new post?</summary>
296+
<summary>How do I post or comment as the user instead of the app?</summary>
283297

284-
Yes. Define the menu item in `devvit.json`, implement the server endpoint it calls, and create the post from that route. The pattern is documented across [Menu actions](../capabilities/client/menu-actions.mdx) and [Interactive posts overview](../capabilities/interactive-posts/interactive_posts_overview.mdx).
298+
Add the required `permissions.reddit.asUser` entries in `devvit.json`, then call the supported Reddit APIs with `runAs: 'USER'`. The main doc for this is [User Actions](../capabilities/server/userActions.mdx), which also explains the review requirements, explicit opt-in rules, and `userGeneratedContent` expectations.
299+
300+
</details>
301+
302+
<span id="why-does-runas-user-still-post-as-the-app-during-playtest"></span>
303+
<details>
304+
<summary>Why does <code>runAs: 'USER'</code> still post as the app during playtest?</summary>
305+
306+
Before the app version is approved, user actions are not enabled for everyone. During playtest or other unapproved versions, `runAs: 'USER'` falls back to the app account for most users, while actions taken by the app owner are attributed to the owner's username. After publishing and approval, it operates on behalf of the user for all users. See [User Actions](../capabilities/server/userActions.mdx).
285307

286308
</details>
287309

@@ -315,16 +337,6 @@ If you are building with Devvit Blocks, the API also exposes an [`avatar`](../ap
315337

316338
</details>
317339

318-
<span id="how-do-i-build-a-leaderboard-with-redis"></span>
319-
<details>
320-
<summary>How do I build a leaderboard with Redis?</summary>
321-
322-
The standard Devvit pattern is to build leaderboards with Redis sorted sets. Use [Redis](../capabilities/server/redis.mdx) for score storage and ranking, use [Scheduler](../capabilities/server/scheduler.mdx) for daily or periodic resets, and prefer realtime updates over constant polling when you need a live leaderboard.
323-
324-
Keep the FAQ answer short: Redis is the right storage layer, but the exact schema depends on whether you need daily, weekly, or all-time rankings. The best starting points are [Redis](../capabilities/server/redis.mdx) and the leaderboard/performance guidance in [Optimizing performance](../capabilities/blocks/optimize_performance.md).
325-
326-
</details>
327-
328340
<span id="how-do-i-handle-external-links-in-devvit"></span>
329341
<details>
330342
<summary>How do I handle external links in Devvit?</summary>

0 commit comments

Comments
 (0)