Skip to content

Commit c3568cf

Browse files
committed
Add View Explorer Docs
1 parent 1036581 commit c3568cf

File tree

6 files changed

+121
-16
lines changed

6 files changed

+121
-16
lines changed

docs/workspace/imgs/component.avif

32.6 KB
Binary file not shown.

docs/workspace/imgs/explorer.avif

178 KB
Binary file not shown.

docs/workspace/imgs/full-app.avif

42.4 KB
Binary file not shown.

docs/workspace/modules-panel/modules-panel.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Modules Panel enabled from the left side of the builder interface, provides
1212

1313
## Available Modules
1414

15-
- **[Widget Tree Module](../modules-panel/widget-panel.md)**: The default module that provides navigation and management of your app's widget hierarchy, allowing you to browse, select, and organize UI components.
15+
- **[View Explorer Module](../modules-panel/widget-panel.md)**: Provides isolated previews of your full application, individual pages, and components, enabling you to test UI states with sample data, inspect variations quickly, and jump directly to any screen without navigating through the app flow.
1616

1717
- **[Theme Module](../modules-panel/theme.md)**: Manages app theming and styling by providing tools to customize colors, fonts, typography, and design tokens that are accessible across your application.
1818

@@ -22,3 +22,4 @@ The Modules Panel enabled from the left side of the builder interface, provides
2222

2323
- **[Supabase Module](../../integrations/supabase.md)**: Sets up Supabase backend integration for database management, authentication, and real-time subscriptions to power your app's backend functionality.
2424

25+
- **[Git Module](../../integrations/git.md)**: Connects your Dreamflow project to a Git repository.

docs/workspace/modules-panel/widget-panel.md

Lines changed: 112 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,111 @@
11
---
2-
slug: /workspace/widget-tree
3-
title: Widget Tree
4-
description: Learn about the Widget Tree panel in Dreamflow, a powerful hierarchical view that displays and helps you manage your Flutter app's widget structure
5-
tags: [widgets, ui, widget-tree, flutter, dreamflow, components]
6-
keywords: [widget tree, flutter widgets, ui components, widget hierarchy, widget management, widget structure, dreamflow interface, widget navigation, widget properties, widget selection]
2+
slug: /workspace/view-explorer
3+
title: View Explorer
4+
description: Learn about Dreamflow’s View Explorer and Widget Tree panels — powerful tools for previewing your full app, inspecting individual pages and components, and managing your app widget hierarchy.
5+
tags: [view-explorer, widget-tree, previews, components]
6+
keywords: [view explorer, widget tree, ui previews, flutter pages, component previews,
7+
isolated ui testing, widget hierarchy, dreamflow interface, preview app,
8+
page preview, component preview, ui states, widget structure, widget navigation]
79
sidebar_position: 1
8-
910
---
1011

11-
# Widget Tree
12+
# View Explorer
13+
14+
The **View Explorer** lets you run your **full application** or preview individual **pages/components** with sample data. It helps you understand your project structure, test pages, and components under different conditions, and quickly jump around your app without navigating through full application flows.
15+
16+
![explorer.avif](../imgs/explorer.avif)
17+
18+
## Preview App
19+
20+
When you select **Full Application** (under the **App** view), Dreamflow will run your entire app. This allows you to explore it exactly as a user would. You can navigate through screens, interact with buttons and inputs, and test end-to-end behavior in real time.
21+
22+
Running the full app is useful for testing flows that span multiple pages (like a multi-step onboarding or navigation sequence) or any functionality that requires the complete app context (such as user login flows or global state management). If you encounter an issue while testing, you can edit the app on the fly and continue interacting, which greatly speeds up development time.
23+
24+
![full-app.avif](../imgs/full-app.avif)
25+
26+
## Preview Pages and Components
27+
28+
You can preview individual **pages** or **components** in complete isolation. The Explore panel lists all your app’s pages and UI components, and you can select any one of them to render it. This means you **do not need to navigate through the app** or fulfill any prerequisites to view a particular screen or widget; it opens instantly, showing a realistic preview of that UI.
29+
30+
Isolated previews let you focus on a specific screen or widget and test it with **custom static data**. This makes it easier to simulate different UI states without modifying your live database or app logic.
31+
32+
Each page or component that accepts input parameters can have one or more [Views](#views), each configured with sample values (like text strings, toggled states, or image URLs) to visualize how the UI responds in various scenarios.
33+
34+
![component.avif](../imgs/component.avif)
35+
36+
Here are some examples of how previewing pages and components independently can help:
37+
38+
**Example 1: Skip Multi-Step Navigation Flows**
39+
40+
If you’re designing an onboarding screen that normally appears only for new users, you can preview that page directly in the Explore tab, no need to register a new user or log out/in every time just to view the screen.
41+
42+
**Example 2: Test UI Under Different Conditions**
43+
44+
You might have a profile page or card component that needs to display user-provided text. You can create a special preview where a **very long name or string** is pre-filled, allowing you to observe how the layout responds (whether the text wraps, overflows, or requires design tweaks).
45+
46+
:::warning
47+
48+
Navigation actions are not supported inside an isolated page or component preview. If your page’s buttons attempt to navigate to another screen, nothing will happen. The preview is confined to the selected view. To test navigation between pages, use the [**Full Application**](#preview-app) preview mode.
49+
50+
:::
51+
52+
:::info[**Pricing and Availability**]
53+
Users on the **Free** and **Hobby** plans can only preview **1 page and 1 component**. To unlock **unlimited page/component** previews, you’ll need to be on the **Pro** plan.
54+
:::
55+
56+
### Views
57+
58+
A **View** is a particular configuration of a page or component for preview purposes. In the Explore panel, each listed item may have one or multiple Views. Each view is defined with a set of static input parameters that feed into the page or component, so you can test the UI under different conditions (e.g., different text content lengths, empty vs. filled states, various image URLs, etc.).
59+
60+
For instance, a component might have a default view and another view with specific inputs adjusted to simulate a loading state or an error message.
61+
62+
Behind the scenes, **views are defined in code.** Dreamflow uses a `@preview` annotation in the generated Flutter code to mark preview configurations. These preview definitions live in a special **`previews/` folder** in your project’s codebase. When you export the Flutter project, you will find the preview classes/files in the `previews` directory (one for each view). This structure is purely for development convenience and **does not interfere with your app’s runtime behavior**.
63+
64+
The preview code is isolated from your production code logic; it won’t run in your published app and doesn’t increase your app’s bundle size in any significant way. Its purpose is only to provide data and state for the Dreamflow editor’s preview mode.
65+
66+
67+
To create a View:
68+
69+
1. In the **Explore** panel, select the page or component, then click the **(+)** button next to it.
70+
2. Choose whether to create the View **manually** or generate with AI.
71+
3. Give your new View a **name** to help identify it later.
72+
4. Double-click the newly created View to open its **details panel**.
73+
5. Under **View Configuration**, provide test data for the page or component’s input parameters—this allows you to simulate different UI states (e.g., long names, empty lists, different toggle values) and instantly preview the result.
74+
6. Use the **Views** dropdown to switch between different configurations and quickly compare how the UI behaves under various conditions.
75+
76+
77+
<div style={{
78+
position: 'relative',
79+
paddingBottom: 'calc(52.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
80+
height: 0,
81+
width: '100%'}}>
82+
<iframe
83+
src="https://demo.arcade.software/RDN88Ab7g79PNqPgz4hF?embed&show_copy_link=true"
84+
title=""
85+
style={{
86+
position: 'absolute',
87+
top: 0,
88+
left: 0,
89+
width: '100%',
90+
height: '100%',
91+
colorScheme: 'light'
92+
}}
93+
frameborder="0"
94+
loading="lazy"
95+
webkitAllowFullScreen
96+
mozAllowFullScreen
97+
allowFullScreen
98+
allow="clipboard-write">
99+
</iframe>
100+
</div>
101+
<p></p>
102+
103+
:::info
104+
- The AI agent **cannot** modify or troubleshoot view configurations.
105+
- Under the hood, Dreamflow actually runs two Flutter app instances – one for the Full Application view and one for isolated page/component views – to make switching previews instantaneous.
106+
:::
107+
108+
## Widget Tree
12109

13110
The Widget Tree panel is a hierarchical view that displays the structure of your app's interface. It's located in the left hand side panel, and can be opened by clicking the "Widget Tree" button from the left side rail.
14111

@@ -30,7 +127,7 @@ The widget tree in Dreamflow allows you to view the widgets that are currently r
30127
**Real-Time Synchronization**: The tree automatically updates in real-time as you make changes to your code, reflecting the current state of your running Flutter app.
31128

32129

33-
## Nodes (Widgets)
130+
### Nodes (Widgets)
34131

35132
![Widget Tree Panel](../imgs/widget-tree.avif)
36133

@@ -62,7 +159,7 @@ You can change the *view* of the Widget Tree to be either Consolidated or Detail
62159
:::
63160

64161

65-
## Widget Management
162+
### Widget Management
66163

67164
Right-click on any widget to access a comprehensive context menu with options for:
68165
- [Adding new widgets] (to widgets that take other widgets as children or have properties that take a widget)
@@ -79,7 +176,7 @@ Right-click on any widget to access a comprehensive context menu with options fo
79176
Sometimes you need to quickly take stock of the different pages and components in your application. You can use the Expand / Collapse button at the top of the Widget Tree panel to quickly expand or collapse all widgets within the tree.
80177
:::
81178

82-
### Add Widget
179+
#### Add Widget
83180
Insert new widgets into your tree by selecting a parent widget, clicking the plus (add) button, and choosing from a categorized catalog of available widgets (Framework, Project, Dependencies). For structural widgets like Scaffold, you will see a list of property-specific widgets that can be added as children.
84181

85182
- **Framework widgets** are widgets imported directly from the Flutter framework, or the Material and Cupertino Flutter Libraries
@@ -148,12 +245,12 @@ Here’s a quick demo showing how you can add a widget to a Column:
148245
For quick access to widget options, right-click on any existing widget to open the context menu. This provides an alternative way to add new widgets to your layout.
149246
:::
150247

151-
### Dragging and Dropping Widgets
248+
#### Dragging and Dropping Widgets
152249
You can drag and drop widgets within the Widget Tree to change the order of widgets in the tree and within your screen. Simply select a widget and drag it into a new place in the Widget Tree.
153250

154251
<!-- TO DO: add arcade -->
155252

156-
### Wrap Widget
253+
#### Wrap Widget
157254
Wrap existing widgets with containers, padding, or other layout widgets to modify their behavior without changing their core functionality.
158255

159256
To wrap a widget, right click and select "Wrap Widget." Then select a widget to wrap with.
@@ -184,15 +281,15 @@ To wrap a widget, right click and select "Wrap Widget." Then select a widget to
184281
</div>
185282
<p></p>
186283

187-
### Jumping to Component Definitions and References
284+
#### Jumping to Component Definitions and References
188285
When building your application, you may want to see where custom components are defined or referenced. For example, you can right click instances of components (denoted using the component icon) and click "See Definition" to jump to the definition of that component in the Widget Tree.
189286

190287
To see references, or usages, of a component, right click on the component and select "See References." This allows you to step through each of the references within the Widget Tree.
191288

192289
<!-- TO DO: add arcade -->
193290

194291

195-
### Clipboard Operations
292+
#### Clipboard Operations
196293
Right clicking on a widget in the Widget Tree also provides standard clipboard operations (cut, copy, paste) that allow you to move and duplicate widgets across your layout tree. You can use either the context menu options or familiar keyboard shortcuts:
197294

198295
- **Cut**: Ctrl/Cmd + X
@@ -201,7 +298,7 @@ Right clicking on a widget in the Widget Tree also provides standard clipboard o
201298

202299
These operations enable efficient widget reuse and layout restructuring without having to recreate widgets from scratch.
203300

204-
### Go to Code
301+
#### Go to Code
205302
The "Go to Code" features provide quick navigation from the Widget Tree to the underlying [code implementation](../content-panel.md#code-editor). You can access these features by hovering over a widget in the tree and right-clicking on the widget and selecting "Go to Code".
206303

207304

firebase.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
"source": "**",
1212
"destination": "/index.html"
1313
}
14+
],
15+
"redirects": [
16+
{
17+
"source": "/workspace/widget-tree",
18+
"destination": "/workspace/view-explorer",
19+
"type": 301
20+
}
1421
]
1522
}
1623
}

0 commit comments

Comments
 (0)