Skip to content

Implement Designed Import / Export Flow#411

Merged
PauloMFJ merged 6 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/import-and-export-flow
Jul 22, 2026
Merged

Implement Designed Import / Export Flow#411
PauloMFJ merged 6 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/import-and-export-flow

Conversation

@PauloMFJ

@PauloMFJ PauloMFJ commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Changes

  • New import flow inside in_front_of_canvas - a menu with file browse plus drag-and-drop upload (data-is-dragging-over state, blocks canvas gestures leaking through to tldraw) that restores the workspace from an exported JSON file.
  • Update export flow with a full-canvas export radio option (EXPORT_OPTION_CANVAS) that's always offered regardless of selection and pairs with the new import menu.
  • Update serialization with addition of STATE_VERSION and a typed ImportError (malformed | version-mismatch + fileVersion), driving full error-toast messaging when an import fails.
  • Drop legacy DevPanel and its use_dev_mode hook, replaced by the import / export flow.
  • Extract Card component from StatusEmpty - existing component was getting quite large as it was.
  • Add new import icon.
  • Update control-divider token to use existing $surface-muted for consistency.

Screenshots

image image image image

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@PauloMFJ PauloMFJ self-assigned this Jul 21, 2026
@beets

beets commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the developer-only import/export panel with a user-facing import/export interface directly on the canvas controls. It introduces a new Import component with drag-and-drop support, integrates a full-canvas export option into the existing Export menu, and refactors state serialization to support version-mismatch checks and robust error handling. The review feedback suggests improving code robustness and type safety by using optional chaining for drag-and-drop file transfers, simplifying TypeScript type narrowing during JSON parsing, and adding stricter validation for the imported state's latestNodeId property.

Comment thread dataweaver/apps/web/src/store/serialization.ts Outdated
Comment thread dataweaver/apps/web/src/store/serialization.ts

@beets beets left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change - this looks nice! Some suggested changes below but approving early to unblock.

Comment thread dataweaver/apps/web/src/store/serialization.ts Outdated
Comment thread dataweaver/apps/web/src/store/serialization.ts
@PauloMFJ
PauloMFJ merged commit 080075c into datacommonsorg:main Jul 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants