Skip to content

#398: Table View Interactions#426

Open
ethanluc7 wants to merge 18 commits intomainfrom
398-table-view-interactions
Open

#398: Table View Interactions#426
ethanluc7 wants to merge 18 commits intomainfrom
398-table-view-interactions

Conversation

@ethanluc7
Copy link
Contributor

@ethanluc7 ethanluc7 commented Mar 4, 2026

Related to issue: #398

Summary

Enhances the table view to display visual key indicators (PK/FK) in the Attribute column and enable navigation from FK relationships to the ERD diagram modal with highlighted relationships.

Description of Changes

  • Replaced the layout with two separate algorithms instead of just one:
    • Sugiyama — used for the full ERD view, respects FK relationships to produce a DAG-ordered layout
    • Grid — used for the focused FK chain, compactly arranges only the schemas in the selected relationship chain
  • Added getLayoutedDiagram and getLayoutedElements to drive both layouts
  • Introduced DiagramViewContext to manage modal open state and an optional focusField (schema + field name).
  • RelationshipDiagramContent now accepts a focusField prop: when set, it traces the FK chain for that field, filters to only the relevant schemas/edges, and renders the compact grid layout with the relationship pre-highlighted. When unset, it renders the full ERD.
  • Added two new utility functions (isFieldForeignKey, isFieldUniqueKey) to detect FK and unique key fields.

Readiness Checklist

  • Self Review
    • I have performed a self review of code
    • I have run the application locally and manually tested the feature
    • I have checked all updates to correct typos and misspellings
  • Formatting
    • Code follows the project style guide
    • Automated code formatters (ie. Prettier) have been run
  • Local Testing
    • Successfully built all packages locally
    • Successfully ran all test suites, all unit and integration tests pass
  • Updated Tests
    • Unit and integration tests have been added that describe the bug that was fixed or the features that were added
  • Documentation
    • All new environment variables added to .env.schema file and documented in the README
    • All changes to server HTTP endpoints have open-api documentation
    • All new functions exported from their module have TSDoc comment documentation

@ethanluc7 ethanluc7 requested a review from JamesTLopez March 6, 2026 14:31
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.

1 participant