Skip to content

Conversation

@paula-stacho
Copy link
Collaborator

@paula-stacho paula-stacho commented Dec 11, 2025

Description

Bumping the diagramming package - this includes a change in the way the edge fields are passed which actually simplifies the code here.

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@paula-stacho paula-stacho requested a review from a team as a code owner December 11, 2025 13:46
@github-actions github-actions bot added the fix label Dec 11, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the @mongodb-js/diagramming package from version 2.2.1 to 2.3.0, which changes how edge field information is passed to the diagramming library. The update simplifies the codebase by removing the need to calculate field indices and instead directly passing field IDs.

  • Removed helper functions for finding nodes and field indices that are no longer needed
  • Updated relationshipToDiagramEdge to pass field IDs directly instead of calculated indices
  • Simplified function signatures and dependency arrays by removing the nodes parameter

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/compass-data-modeling/src/utils/nodes-and-edges.ts Removed helper functions and updated relationshipToDiagramEdge to use field IDs instead of indices
packages/compass-data-modeling/src/utils/nodes-and-edges.spec.ts Updated tests to match new function signature and verify field ID mapping
packages/compass-data-modeling/src/store/analysis-process.ts Removed nodes parameter from relationshipToDiagramEdge call
packages/compass-data-modeling/src/components/diagram-editor.tsx Removed nodes parameter and dependency from relationshipToDiagramEdge usage
packages/compass-components/package.json Bumped @mongodb-js/diagramming to version 2.3.0

@paula-stacho paula-stacho added the no release notes Fix or feature not for release notes label Dec 11, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@paula-stacho
Copy link
Collaborator Author

paula-stacho commented Dec 12, 2025

I messed up the callbacks and due to lack of tests in the diagramming lib I only noticed it here 🙈
Need to merge the fix here first: mongodb-js/diagramming#168

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

Labels

fix no release notes Fix or feature not for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants