Skip to content

Commit db1a774

Browse files
Flow builder
New flow builder docs --------- Co-authored-by: eandreeva-twr <eandreeva@adapty.io>
1 parent 0844aba commit db1a774

1,439 files changed

Lines changed: 35456 additions & 28048 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,4 @@ yarn-error.log*
230230
/versioned_docs/version-3.0/sdk-installation-capacitor.md
231231

232232
.worktrees/
233-
_temp/
233+
_temp/

CLAUDE.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ customSlug: "override-url" # Optional URL override
3737
3838
Sidebars are defined per platform in `src/data/sidebars/*.json` (ios, android, react-native, flutter, unity, kmp, capacitor, tutorial, api). Each entry references an article by its filename-based `id`. To add an article to navigation, add its id to the appropriate sidebar JSON.
3939

40+
**Always use sidebar JSON files as the source of truth** for discovering which articles exist in a section. Do not glob MDX files — the sidebar defines what is published and how it is organized. Match the feature area to the correct sidebar file first, then read the relevant entries.
41+
4042
### Images
4143

42-
- Article-specific: `src/assets/{article-name}/image.png`
43-
- Shared: `src/assets/shared/image.png`
44+
**In practice, almost all screenshots live in `src/assets/shared/img/`** (including subdirectories like `flow-builder/`). When looking for new screenshots, check here first.
45+
46+
- Article-specific: `src/assets/{article-name}/image.png` (rarely used)
47+
- Shared: `src/assets/shared/img/image.png`
4448
- Use `<ZoomImage id="image.png" width="700px" alt="desc" />` (preferred)
4549
- Legacy `<Zoom><img src={require(...)}/></Zoom>` still works
4650

@@ -57,7 +61,7 @@ Translated versions of articles live in `src/locales/{locale}/` (e.g., `src/loca
5761

5862
| Component | Import required? | Usage |
5963
|-----------|-----------------|-------|
60-
| `ZoomImage` | Yes | `<ZoomImage id="file.png" width="700px" alt="..." />` |
64+
| `ZoomImage` | Yes | `<ZoomImage id="file.png" width="700px" alt="..." />` — add `float="right"` or `float="left"` to float image beside text |
6165
| `Tabs`/`TabItem` | Yes | `<Tabs groupId="platform"><TabItem value="ios" label="iOS">...</TabItem></Tabs>` |
6266
| `Details` | Yes | `<Details summary="Title">content</Details>` |
6367
| `InlineTooltip` | Yes | `<InlineTooltip tooltip="hover text">[link](page.md)</InlineTooltip>` |
@@ -81,6 +85,10 @@ Import path pattern: `import Component from '@site/src/components/Component.astr
8185
- `remark-strip-imports` — removes imports during markdown export
8286
- `remark-strip-highlight-comments` — cleans highlight syntax
8387

88+
## Markdown conventions
89+
90+
- Use `-` for unordered lists, not `*`.
91+
8492
## Code blocks
8593

8694
````markdown

TECH_WRITERS_README.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ description: "Brief description for SEO"
3535
metadataTitle: "SEO Title | Adapty Docs"
3636
keywords: ['keyword1', 'keyword2']
3737
rank: 100 (default — 50)
38+
draft: true (optional — excludes article from build, navigation, and LLM exports)
3839
---
3940

4041
import ZoomImage from '@site/src/components/ZoomImage.astro';
@@ -99,6 +100,8 @@ src/
99100
image1.png
100101
shared/ # Shared images
101102
common-image.png
103+
icons/ # Inline SVG icons
104+
pencil.svg
102105
components/ # Reusable components
103106
reusable/ # Reusable content snippets
104107
```
@@ -135,6 +138,47 @@ The component automatically finds images in this order:
135138
2. `src/assets/shared/image.png` (shared folder)
136139
3. Legacy locations (for backward compatibility)
137140

141+
### 1a. ZoomImage float mode - Image that floats beside text
142+
143+
Add the `float` prop to ZoomImage to display a narrow image to one side with body text flowing beside it. The image retains zoom functionality.
144+
145+
**Additional prop:**
146+
- `float` (optional): `"left"`, `"right"`, or `"none"` (default: `"none"`)
147+
148+
**Usage:**
149+
150+
```mdx
151+
<ZoomImage id="settings-panel.webp" width="300px" float="right" alt="Settings panel" />
152+
153+
This text flows beside the image. You can use paragraphs,
154+
bullet lists, and other content here.
155+
156+
* Setting one
157+
* Setting two
158+
* Setting three
159+
160+
### This subsection heading does NOT clear the float
161+
162+
More text still flows beside the image.
163+
164+
## Next same-level heading (clears the float automatically)
165+
```
166+
167+
**Float clearing rules:**
168+
169+
The float is automatically cleared (text stops flowing beside the image) before:
170+
171+
1. **A heading at the same or higher level** as the heading that precedes the float. For example, if the float follows an `##` heading, only the next `##` or `#` heading clears it. Any `###` subheadings within the section continue to flow beside the image.
172+
2. **A subsection that contains an image or a table.** If a `###` subsection after the float contains a `ZoomImage` (floating or not) or a markdown table, the float clears before that subsection heading, because these elements need full width.
173+
3. **A standalone image or table** that appears directly after the float (not inside a subsection).
174+
175+
**Guidelines:**
176+
- Use for narrow images (300-400px) with enough adjacent text (at least 4-6 lines) to fill the space beside the image
177+
- Avoid for wide screenshots
178+
- Avoid when there is very little text before the next heading, as it creates awkward whitespace
179+
- On mobile (<768px), the image automatically stacks vertically at full width
180+
- Callouts (`:::note`, `:::tip`, etc.) inside a float section shrink to fit the available space beside the image instead of wrapping around it
181+
138182
### 2. Tabs - Tabbed content
139183

140184
Create tabbed interfaces to organize platform-specific or alternative content.
@@ -460,6 +504,97 @@ import { CompoundCalculator } from '../../../components/CompoundCalculator';
460504
/>
461505
```
462506

507+
### 9. SDKv4 / SDKv3 — SDK version tabs
508+
509+
Use these wrappers to show different content to SDK v4+ and SDK v3 users on the same page. When both are present, a tab bar is automatically injected below the article title — no extra setup needed.
510+
511+
**Auto-registered**: no import required.
512+
513+
**Usage:**
514+
515+
```mdx
516+
<SDKv4>
517+
518+
Everything in here is shown when the reader selects the **SDK v4+** tab.
519+
Intro text, code samples, callouts — all content goes inside.
520+
521+
</SDKv4>
522+
523+
<SDKv3>
524+
525+
Everything in here is shown when the reader selects the **SDK v3** tab.
526+
Duplicate the content and adjust for the legacy API.
527+
528+
</SDKv3>
529+
```
530+
531+
**Features:**
532+
- The tab bar appears automatically whenever both `<SDKv4>` and `<SDKv3>` blocks exist on a page. Pages without them are unaffected.
533+
- The **SDK v3** tab always shows a **Legacy** badge — no extra markup needed.
534+
- The reader's tab choice is persisted in `localStorage` across pages.
535+
- **Markdown & LLM export**: `<SDKv4>` content is kept (wrapper stripped). `<SDKv3>` content is replaced with an explicit LLM instruction block that tells AI assistants to use the legacy API only for migration or troubleshooting — never for new integrations.
536+
537+
---
538+
539+
### 9. MethodPromo — Method feature highlight
540+
541+
A visual card that highlights a unified SDK method and what it covers. Designed for use at the top of SDK v4+ sections to help readers immediately understand scope before they dive into code.
542+
543+
**Auto-registered**: no import required.
544+
545+
**Basic usage (all defaults):**
546+
547+
```mdx
548+
<MethodPromo method="getFlow" />
549+
```
550+
551+
This renders a card titled **"What `getFlow` retrieves"** with three default columns (Flows, Paywall Builder paywalls, Onboardings) and a footer link to the manual integration guide for the current platform. The footer link resolves automatically — no props needed.
552+
553+
**Custom label:**
554+
555+
```mdx
556+
<MethodPromo method="presentPaywall" label="How presentPaywall renders your paywall" />
557+
```
558+
559+
The method name is always highlighted as code inside the label, wherever it appears in the string.
560+
561+
**Custom columns:**
562+
563+
```mdx
564+
<MethodPromo
565+
method="getFlow"
566+
items={[
567+
{ title: 'Flows', desc: 'Built in Flow builder — renders natively' },
568+
{ title: 'Paywall Builder paywalls', desc: 'All existing Paywall Builder content' },
569+
{ title: 'Onboardings', desc: 'All existing onboarding builder content' },
570+
]}
571+
/>
572+
```
573+
574+
**Custom footer:**
575+
576+
```mdx
577+
<MethodPromo
578+
method="getFlow"
579+
note="Not using the Flow builder?"
580+
noteHref="fetch-paywalls-and-products"
581+
noteLinkText="See the remote config guide instead."
582+
/>
583+
```
584+
585+
Pass `note=""` to hide the footer entirely.
586+
587+
**All props:**
588+
589+
| Prop | Required | Default | Description |
590+
|------|----------|---------|-------------|
591+
| `method` | yes || The method name. Appears as `<code>` in the label. |
592+
| `label` | no | `What {method} retrieves` | Header label. Include the method name as plain text to get code styling. |
593+
| `items` | no | Flows / PB paywalls / Onboardings | Array of `{ title, desc }` objects for the three-column grid. |
594+
| `note` | no | `Building a custom paywall?` | Footer note text. |
595+
| `noteHref` | no | `{platform}-quickstart-manual` | Footer link target. Resolved automatically from the current platform sidebar. |
596+
| `noteLinkText` | no | `See the manual integration guide.` | Footer link label. |
597+
463598
## Markdown features
464599

465600
### Callout boxes

src/content/docs/version-3.0/add-offer-to-paywall.mdx renamed to _old/add-offer-to-paywall.mdx

File renamed without changes.

_old/builder-pop-ups.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Pop-ups"
3+
description: "Create and configure pop-up overlays in your flows."
4+
metadataTitle: "Pop-ups | Flow Builder | Adapty Docs"
5+
---
6+
7+
## Pop-ups
8+
9+
No design ATM.
10+
11+
## System dialogs
12+
13+
Actions -> Alerts

_old/builder-sdk-data-input.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "SDK data input"
3+
description: "Pass data from your app to the Flow Builder via the SDK."
4+
metadataTitle: "SDK data input | Flow Builder | Adapty Docs"
5+
draft: true
6+
---

src/content/docs/version-3.0/customize-onboardings-with-remote-config.mdx renamed to _old/customize-onboardings-with-remote-config.mdx

File renamed without changes.

src/content/docs/version-3.0/get-paid-in-onboardings.mdx renamed to _old/get-paid-in-onboardings.mdx

File renamed without changes.

src/content/docs/version-3.0/local-fallback-onboarding.mdx renamed to _old/local-fallback-onboarding.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Follow the instructions below to download the file and add it to your applicatio
1818

1919
:::important
2020
Fallback onboardings **require an internet connection**, since onboarding content is always stored online. The fallback file only stores the onboardings' configuration.
21-
22-
Read the [onboarding offline mode](onboarding-offline) article to understand what happens when the application cannot load the onboarding.
2321
:::
2422

2523
<details>

src/content/docs/version-3.0/localize-onboardings.mdx renamed to _old/localize-onboardings.mdx

File renamed without changes.

0 commit comments

Comments
 (0)