Uh oh!
There was an error while loading. Please reload this page.
Add default props to all components to prevent collapse in designer - #4
Merged
Merged
Conversation
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
CopilotAI
changed the title
[WIP] Add initial state to all componentsAdd default props to all components to prevent collapse in designerJan 13, 2026
huangyiirene
requested review from
Copilot
and removed request for
huangyiireneJanuary 13, 2026 14:22
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds defaultProps to component registrations to prevent components from collapsing when dragged into the designer. Components now appear with meaningful initial dimensions, content, and configurations.
Changes:
- Added
defaultPropswith initial dimensions, labels, placeholders, and sample content to 40+ component registrations - Added
defaultChildrento container components that require nested elements - Added comprehensive test coverage for default props validation
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/renderer/src/renderers/overlay/tooltip.tsx | Added default trigger button, content text, delay, and side positioning |
| packages/renderer/src/renderers/overlay/sheet.tsx | Added default title, description, trigger button, and sample content |
| packages/renderer/src/renderers/overlay/popover.tsx | Added default trigger button, content, alignment, and side positioning |
| packages/renderer/src/renderers/overlay/hover-card.tsx | Added default trigger button, hover content, and side positioning |
| packages/renderer/src/renderers/overlay/dropdown-menu.tsx | Added default trigger button and sample menu items with separator |
| packages/renderer/src/renderers/overlay/drawer.tsx | Added default title, description, trigger button, and content |
| packages/renderer/src/renderers/overlay/dialog.tsx | Added default title, description, modal flag, trigger button, and content |
| packages/renderer/src/renderers/overlay/context-menu.tsx | Added default menu items with separator and trigger text |
| packages/renderer/src/renderers/overlay/alert-dialog.tsx | Added default title, description, action/cancel text, and trigger button |
| packages/renderer/src/renderers/navigation/sidebar.tsx | Added default props and children structure for sidebar components |
| packages/renderer/src/renderers/navigation/header-bar.tsx | Added default breadcrumb structure |
| packages/renderer/src/renderers/layout/tabs.tsx | Added default tab items with values and content |
| packages/renderer/src/renderers/layout/card.tsx | Added default title, description, and width class |
| packages/renderer/src/renderers/form/toggle.tsx | Added default label, variant, and size for toggle components |
| packages/renderer/src/renderers/form/textarea.tsx | Added default label, placeholder, and ID |
| packages/renderer/src/renderers/form/switch.tsx | Added default label and ID |
| packages/renderer/src/renderers/form/slider.tsx | Added default value, range, and width |
| packages/renderer/src/renderers/form/select.tsx | Added default label, placeholder, and sample options |
| packages/renderer/src/renderers/form/radio-group.tsx | Added default ID and sample radio items |
| packages/renderer/src/renderers/form/input.tsx | Added default label, placeholder, type, and ID |
| packages/renderer/src/renderers/form/input-otp.tsx | Added default max length |
| packages/renderer/src/renderers/form/checkbox.tsx | Added default label and ID |
| packages/renderer/src/renderers/form/calendar.tsx | Added default mode and border styling |
| packages/renderer/src/renderers/form/button.tsx | Added default label, variant, and size |
| packages/renderer/src/renderers/feedback/toaster.tsx | Added default provider type |
| packages/renderer/src/renderers/feedback/skeleton.tsx | Added default width, height, and styling |
| packages/renderer/src/renderers/feedback/progress.tsx | Added default value and width |
| packages/renderer/src/renderers/disclosure/collapsible.tsx | Added default trigger button, content, and width |
| packages/renderer/src/renderers/disclosure/accordion.tsx | Added default accordion items with content |
| packages/renderer/src/renderers/data-display/badge.tsx | Added default label and variant |
| packages/renderer/src/renderers/data-display/avatar.tsx | Added default fallback initials and alt text |
| packages/renderer/src/renderers/data-display/alert.tsx | Added default title, description, and variant |
| packages/renderer/src/renderers/complex/table.tsx | Added default caption, columns, and sample data rows |
| packages/renderer/src/renderers/complex/scroll-area.tsx | Added default dimensions, orientation, and sample content |
| packages/renderer/src/renderers/complex/resizable.tsx | Added default direction, dimensions, and sample panels |
| packages/renderer/src/renderers/complex/carousel.tsx | Added default orientation, arrows, and sample slides |
| packages/renderer/src/renderers/basic/text.tsx | Added default text content |
| packages/renderer/src/renderers/basic/span.tsx | Added default padding and child text |
| packages/renderer/src/renderers/basic/separator.tsx | Added default orientation and margin |
| packages/renderer/src/renderers/basic/div.tsx | Added default padding, border, and minimum height |
| packages/renderer/src/tests/registry.test.tsx | Added tests for defaultProps and defaultChildren support |
| packages/renderer/src/tests/defaultProps.test.tsx | Added comprehensive test suite validating all component defaults |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
✅ All checks passed!
|
huangyiirene
marked this pull request as ready for review
January 13, 2026 14:26
Uh oh!
There was an error while loading. Please reload this page.
17 tasks
CopilotAI
added a commit
that referenced
this pull request
Jan 24, 2026
- Fix handleExportCSV to guard on gridRef.current?.api (issue #1) - Add dedicated onContextMenuAction callback instead of overloading onCellClicked (issue #2) - Remove icon property from customItems to prevent HTML injection (issue #3) - Remove validation claim from README - only basic AG Grid editing (issue #4) - Add test assertions for all new inputs (editable, exportConfig, etc.) (issue #5) - Fix onExport type to only support 'csv' format (issue #6) - Remove unused ColumnConfig properties (autoSize, groupable) (issue #9) - Type schema props with proper interfaces instead of 'any' (issue #10) - Update export description to only mention CSV (issue #11) - Add AG Grid Community vs Enterprise section to docs (issue #8) - Update README and docs with new callback and clarifications All tests pass (8/8), lint clean (0 errors) Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
7 tasks
21 tasks
This was referenced Feb 23, 2026
CopilotAI
added a commit
that referenced
this pull request
Feb 28, 2026
…y chip (#7) - ConfigRow: add label maxWidth (45%), text truncation with title tooltip for both label and value - Toolbar section: add summary chip showing "X of Y enabled" at top of expanded section - Add toolbarEnabledCount i18n key to all 10 locales - Update view-config-schema tests for new _toolbarSummary field Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
This was referenced Feb 28, 2026
os-zhuang added a commit
that referenced
this pull request
Jun 29, 2026
… AI slot (#2060) * feat(console): Studio WYSIWYG design surface dev harness (ADR-0080 slice-1) Additive /dev/studio-design route + DevStudioDesign four-zone shell reusing getMetadataPreview/getMetadataInspector + SchemaRenderer. Touches no existing surface. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * refactor(app-shell): promote Studio design surface + open-core AI slot (ADR-0080) Move the design surface out of the apps/console dev harness into @object-ui/app-shell as StudioDesignSurface. The left AI copilot becomes an injected aiSlot prop — OSS renders three zones (nav/canvas/inspector); the cloud edition injects AI. Repoint /dev/studio-design at the promoted component. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(app-shell): wire Studio design surface to real metadata (ADR-0080 #3/#4) Replace the fixture with the shared MetadataClient: the single-App nav lists real pages, clicking loads that surface into the canvas (real PagePreview + live data), and the toolbar saves drafts / publishes through the real pipeline. Route moves inside ProtectedRoute for the connected client + data adapter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * refactor(app-shell): route Studio as /studio/:packageId/{data,automations,interfaces} Three pillars are now real routes scoped to the package being designed. The shell renders the package + pillar route links; Interfaces drives the real MetadataClient (nav/canvas/inspector + draft/publish), Data/Automations are scaffolded placeholders pending the App-nav + object/flow surface reuse map. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(app-shell): real 3-pillar Studio — App-nav Interfaces + Data + Automations Interfaces: load the real App by package id and render its navigation tree (groups + typed leaves page/object/dashboard/report); clicking loads the bound surface (PagePreview/DashboardPreview/object-grid). Data: object list + record grid (object-grid) + field table. Automations: flow list + FlowPreview graph. All reuse existing renderers — no new editor code. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(app-shell): Data pillar = primary full-height record grid (Airtable parity) Drop the redundant field table — the record grid's columns ARE the fields. Data mode now reads like a spreadsheet (objects on the left, the records directly viewable), matching Airtable's Data tab. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(app-shell): object surface = object-view (our list-view model, not raw grid) Per design direction, the Data pillar (and Interfaces object items) render an object via object-view — its named list views + ViewSwitcher + record actions, falling back to a grid — instead of the raw object-grid. Matches our view model. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(app-shell): scope Data/Automations lists to the current package (#9) Pass packageId into DataPillar/AutomationsPillar and use client.list(type, { packageId }) (=> ?package=) so each pillar lists only the current package's objects/flows, not all env metadata. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(app-shell): render flow preview via createElement (satisfy react-hooks/static-components) AutomationsPillar assigned `const Preview = getMetadataPreview(...)` and rendered it as JSX, which react-hooks/static-components flags as a component created during render. Render via React.createElement instead, and derive the type from the selected flow (current.type) to mirror InterfacesPillar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 13, 2026
os-zhuang added a commit
that referenced
this pull request
Jul 14, 2026
…h (ADR-0057 UX, #2477) (#2480) - #4: transition the rail width (200ms ease) on Live Canvas auto-maximize/tuck instead of snapping; suppressed during a manual resize drag (width tracks the pointer 1:1). - #6: parameterize the width storage key (persistWidthKey); the Studio dock uses its own so a wide console chat no longer squeezes the design canvas. Refs #2477 (ADR-0057 UX follow-ups) Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Aug 8, 2026
Merged
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 freeto 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.
Components collapsed into invisible heaps when dragged into the designer due to missing initial dimensions and content.
Changes
Added
defaultPropsto 40+ component registrations across:Example before/after:
The Canvas component already spreads
defaultPropswhen creating nodes (lines 67-71), so no designer changes needed.Tests added to verify all components have defaults and maintain proper structure.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.