Conversation
…outing Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Owner
Author
|
This change is part of the following stack:
Change managed by git-spice. |
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…e errors The layout builder validates required properties during apply_layout; bare <alert />, <label />, <button /> etc. in preview panels failed with MissingProperty. Add generate_preview_element() which emits placeholder values for all required props so the layout builds cleanly. Also replace the silent .ok() on create_runtime with a tracing::error! so failures are visible in logs rather than silently falling back to the project loader. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…abel rows The generated storybook was instantiating all component pages at startup, including one code-editor, one table, and one tabs wrapper per component (53-54 instances each). Code editors are expensive to render due to syntax highlighting and internal scroll state; having 53 of them in the GPUI tree simultaneously caused the UI to be unusable. Replace the per-page table+tabs+code-editor structure with a flat stack of label elements — one per property showing "name: type = default". Remove the now-unused attr_escape, generate_xml_snippet, and generate_property_table_data helpers. Update tests to match. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Add border/margin/rounded to every page panel so component sections are visually distinct from one another - Add padding to the content area stack - Skip live preview rendering for Charts and Data category components; show a placeholder label instead — chart components render "No data" without a data source, and table/list/tree render empty Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…anel Panels wrapped by apply_layout_styles get a div.flex_col.min_h(0) wrapper without flex_1. The inner Stack always renders with flex_1, which collapses to zero height inside an auto-height parent — leaving only the border line visible. Stacks DO get flex_1 added to their apply_layout_styles wrapper, so moving border/margin/rounded from the page <panel> to the inner <stack> fixes the collapse. This matches how the home page panel works (unstyled panel, styled inner stack). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Sidebar scroll:
- Add scroll="true" to sidebar_inner stack so all categories are reachable
Navigation (three parts):
- Add ExtensionManager::load_script_from_source to load Rhai from a string
- Wire up scripts.inline in load_scripts_from_config: inline CDATA scripts
are now loaded as the "handlers" script so call_handler("navigate_to")
finds them
- Fix Rhai function signature to fn navigate_to(component_id, event_data)
matching call_handler's (component_id, event_data) call convention
- Add on-click="navigate_to" to every sidebar nav button
- Set visible="false" on all component page panels so only the home page
shows initially; navigate_to hides home and shows the selected page
Layout previews:
- Add ComponentCategory::Layout to the preview skip list; dock/stack/panel/
tabs render as empty containers with no visible content
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Layout components (stack, panel, tabs, dock) are containers that render empty when childless. Previously they showed "Connect a data source" which was wrong. Now each gets a component-specific preview with placeholder children: - stack: vertical stack with three label children and a visible border - panel: panel with a label child - tabs: two-tab layout with label content in each tab - dock (and any unrecognised Layout): informational label Charts and Data categories still show the data-source placeholder. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
All anonymous elements in the layout share a flat component map keyed by
their auto-generated ID (__anon_1, __anon_2, ...). The counter resets for
each children_to_component_map call, so every component page's preview
element and every sidebar category label independently received __anon_1.
Each successive page overwrote the previous in the flat map, leaving all
pages trying to render the same last-inserted component.
Fix by giving every preview element an explicit id ("{name}_preview_ex")
and every sidebar category label an explicit id ("cat_{name}"), eliminating
all __anon_N collisions.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…iews Charts and Data category components now render with inline sample data instead of "Connect a data source at runtime to preview this component": Data components: - table: 3-row sample with name/score columns - list: three sample string items - tree: root node with two children Chart components (sample data uses field names matching the component's required x_field/y_field/y_fields): - line/bar/column/scatter: x+y series data - area/stacked/clustered variants: x+a+b multi-series data - realtime: x+y series with y_fields array - pie: label+value slice data - candlestick: OHLC data with t/o/h/l/c fields - bubble: x+y+r point data - unrecognised chart types: "Sample data preview not available" label Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- stacked_bar_chart / clustered_bar_chart are horizontal — they use y_field (category axis) + x_fields (value series array), not the column-chart orientation; fix the generated preview accordingly - Add heatmap_chart preview: x_field, y_field, value_field + grid data - Add radar_chart preview: categories array + y_fields + data - Add pyramid_chart / funnel_chart preview: label_field + value_field + data Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #55
Summary
crates/nemo-storybook-generator/src/lib.rscargo test -p nemo-storybook-generatorDepends on #51, #52, #53. Part of epic #9.