diff --git a/docs/workspace/imgs/component.avif b/docs/workspace/imgs/component.avif new file mode 100644 index 0000000..f7eff83 Binary files /dev/null and b/docs/workspace/imgs/component.avif differ diff --git a/docs/workspace/imgs/explorer.avif b/docs/workspace/imgs/explorer.avif new file mode 100644 index 0000000..c3378b5 Binary files /dev/null and b/docs/workspace/imgs/explorer.avif differ diff --git a/docs/workspace/imgs/full-app.avif b/docs/workspace/imgs/full-app.avif new file mode 100644 index 0000000..151b6d0 Binary files /dev/null and b/docs/workspace/imgs/full-app.avif differ diff --git a/docs/workspace/modules-panel/modules-panel.md b/docs/workspace/modules-panel/modules-panel.md index c00aee9..2d21136 100644 --- a/docs/workspace/modules-panel/modules-panel.md +++ b/docs/workspace/modules-panel/modules-panel.md @@ -12,7 +12,7 @@ The Modules Panel enabled from the left side of the builder interface, provides ## Available Modules -- **[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. +- **[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. - **[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. @@ -22,3 +22,4 @@ The Modules Panel enabled from the left side of the builder interface, provides - **[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. +- **[Git Module](../../integrations/git.md)**: Connects your Dreamflow project to a Git repository. diff --git a/docs/workspace/modules-panel/widget-panel.md b/docs/workspace/modules-panel/widget-panel.md index 6a63a62..4202473 100644 --- a/docs/workspace/modules-panel/widget-panel.md +++ b/docs/workspace/modules-panel/widget-panel.md @@ -1,14 +1,111 @@ --- -slug: /workspace/widget-tree -title: Widget Tree -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 -tags: [widgets, ui, widget-tree, flutter, dreamflow, components] -keywords: [widget tree, flutter widgets, ui components, widget hierarchy, widget management, widget structure, dreamflow interface, widget navigation, widget properties, widget selection] +slug: /workspace/view-explorer +title: View Explorer +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. +tags: [view-explorer, widget-tree, previews, components] +keywords: [view explorer, widget tree, ui previews, flutter pages, component previews, + isolated ui testing, widget hierarchy, dreamflow interface, preview app, + page preview, component preview, ui states, widget structure, widget navigation] sidebar_position: 1 - --- -# Widget Tree +# View Explorer + +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. + + + +## Preview App + +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. + +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. + + + +## Preview Pages and Components + +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. + +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. + +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. + + + +Here are some examples of how previewing pages and components independently can help: + +**Example 1: Skip Multi-Step Navigation Flows** + +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. + +**Example 2: Test UI Under Different Conditions** + +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). + +:::warning + +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. + +::: + +:::info[**Pricing and Availability**] +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. +::: + +### Views + +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.). + +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. + +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**. + +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. + + +To create a View: + +1. In the **Explore** panel, select the page or component, then click the **(+)** button next to it. +2. Choose whether to create the View **manually** or generate with AI. +3. Give your new View a **name** to help identify it later. +4. Double-click the newly created View to open its **details panel**. +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. +6. Use the **Views** dropdown to switch between different configurations and quickly compare how the UI behaves under various conditions. + + +