Skip to content

Comments

#397: Highlight States#413

Open
ethanluc7 wants to merge 46 commits intomainfrom
397-highlight-states
Open

#397: Highlight States#413
ethanluc7 wants to merge 46 commits intomainfrom
397-highlight-states

Conversation

@ethanluc7
Copy link
Contributor

@ethanluc7 ethanluc7 commented Feb 19, 2026

Related to issue: #397

Summary

Adds interactive highlight states to the Entity Relationship Diagram, allowing users to click on schema nodes to activate/deactivate edges and hover over rows and edges. Also includes a comprehensive set of dictionaries (single schema, linear chains, fan-out, cyclical, compound keys, etc.) for testing various ERD topologies.

Description of Changes

  • ActiveRelationshipContext.tsx (new) — React context and provider for tracking which relationships/edges are currently active or highlighted
    • EntityRelationshipDiagram.tsx — Integrated the active relationship provider and wired up click/hover interactions on nodes and edges
    • SchemaNode.tsx — Updated schema nodes to support active/inactive visual states and trigger edge highlighting on click
    • diagramUtils.ts — Added utility functions for building relationship maps, determining schema chains, and computing edge highlight states
    • schemaNodeStyles.ts — Added CSS styles for highlighted, dimmed, and hover states on schema nodes
    • OneCardinalityMarker.tsx — Updated cardinality marker to support active/inactive color states
    • DiagramSubtitle.tsx (new) — Component that renders the selected schema chain as a subtitle in the diagram modal
    • DiagramViewButton.tsx — Integrated the subtitle and relationship provider into the diagram modal flow
    • Modal.tsx — Extended to accept a ReactNode as the subtitle prop
    • index.ts — Updated exports to include new utilities and context
    • Storybook fixtures (new) — Added 11 JSON fixture dictionaries covering single schema, two isolated schemas, linear chains, fan-out, cyclical, compound keys, mixed relations, multi-FK, non-unique FK, and a simplified clinical example
    • EntityRelationshipDiagram.stories.tsx — Added stories for each new fixture

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
    • Autmated 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 changed the base branch from dependabot/npm_and_yarn/ajv-8.18.0 to main February 19, 2026 15:41
@ethanluc7 ethanluc7 changed the title 397 highlight states #397: Highlight States Feb 19, 2026
@joneubank joneubank mentioned this pull request Feb 19, 2026
5 tasks
@ethanluc7 ethanluc7 requested a review from joneubank February 20, 2026 17:06
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