Skip to content

Add ER diagram position persistence and layout configuration#629

Open
luis100 wants to merge 1 commit into
developmentfrom
feature/erdiagram-position-persistence
Open

Add ER diagram position persistence and layout configuration#629
luis100 wants to merge 1 commit into
developmentfrom
feature/erdiagram-position-persistence

Conversation

@luis100

@luis100 luis100 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Position persistence: Node positions are saved automatically to localStorage after each drag and restored on page load — the layout survives refresh and browser restarts. Physics is disabled immediately when all positions are available; when new tables are added, previously positioned nodes are pinned while physics settles the new ones, then the full layout is saved.
  • Configuration dropdown: A "Configuration ▾" button in the Schema card header opens a popup menu with three layout actions: Upload layout, Download layout (erdiagram-layout.json), and Reset layout. The download/upload format is identical to the localStorage format ({tableId: {x, y}}), making it ready for future server-side sharing.
  • Dev mode fixes: <collapse-all-properties/> commented out in Server.gwt.xml (fixes per-file compilation error in the GWT code server); solr-solrj-jetty excluded from the codeserver classpath (fixes Jetty version conflict on startup).

Test plan

  • Open ER diagram, drag nodes around — positions should persist after page refresh
  • Open ER diagram with no saved layout — physics runs and stabilises normally; first drag saves the layout
  • Download layout, reset, then upload the downloaded file — diagram should restore the saved positions
  • Reset layout — physics reruns from scratch, localStorage entry is cleared
  • Run mvn -f dev/codeserver gwt:codeserver -Pdebug-server -DprojectPath=$(pwd) — should start without errors

🤖 Generated with Claude Code

Node positions are now saved automatically to localStorage after each
drag and restored on page load, so the layout survives refresh. Physics
is skipped entirely when all positions are available; newly added tables
settle via physics around the fixed known nodes, then the full layout is
persisted. A "Configuration" dropdown in the card header provides upload,
download (erdiagram-layout.json), and reset layout actions.

Also comments out <collapse-all-properties/> in Server.gwt.xml and
excludes solr-solrj-jetty from the codeserver classpath to fix dev-mode
startup errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. type: feature labels Jun 30, 2026
@luis100

luis100 commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

The CI test failures are pre-existing on the development branch and are not introduced by this PR.

Confirmed locally: running DefaultJobContextTest and ConfigurationIntegrityValidatorTest against a clean checkout of development (before our changes) produces the same 4 failures:

  • ConfigurationIntegrityValidatorTest.testBlockDeletionOfVirtualTableUsedByDenormalization
  • ConfigurationIntegrityValidatorTest.testBlockDeletionOfVirtualColumnUsedByVirtualFK
  • ConfigurationIntegrityValidatorTest.testBlockModificationOfVirtualColumnUsedByVirtualFK
  • DefaultJobContextTest.testConstructorThrowsBatchJobExceptionWhenDenormalizationConfigFailsToLoad

All four are in server-side batch/validation logic. This PR only touches client-side GWT UI, CSS, the GWT module descriptor, and the dev codeserver pom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. type: feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants