Skip to content

Conversation

@paula-stacho
Copy link
Collaborator

@paula-stacho paula-stacho commented Jul 23, 2025

Description

  • match the content of the drawer to designs (includes new field - name)
  • adds telemetry
  • adds highlighting of relationship fields (ignoring incomplete relationships for simplicity)
Screenshot 2025-07-23 at 17 55 23

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
  • 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 added wip feature flagged PRs labeled with this label will not be included in the release notes of the next release and removed wip labels Jul 23, 2025
@paula-stacho paula-stacho marked this pull request as ready for review July 23, 2025 15:55
Copilot AI review requested due to automatic review settings July 23, 2025 15:55
@paula-stacho paula-stacho requested a review from a team as a code owner July 23, 2025 15:55
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 improves the relationship editing functionality in the data modeling diagram by adding a name field, implementing telemetry tracking, and highlighting relationship fields in the UI to match design specifications.

  • Adds telemetry events for relationship operations (add, edit, delete) with relationship count tracking
  • Updates the relationship drawer UI with new name field and improved layout using accordions
  • Implements field highlighting to visually indicate relationship connections in the diagram

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/compass-telemetry/src/telemetry-events.ts Adds three new telemetry event types for relationship operations
packages/compass-data-modeling/src/store/diagram.ts Adds telemetry tracking to relationship actions and helper function for counting relationships
packages/compass-data-modeling/src/services/data-model-storage.ts Adds optional name field to relationship schema
packages/compass-data-modeling/src/components/relationship-drawer-content.tsx Major UI redesign with accordion layout, name field, and improved styling
packages/compass-data-modeling/src/components/diagram-editor.tsx Implements field highlighting for selected relationships
packages/compass-components/src/components/accordion.tsx Adds defaultOpen and textClassName props to Accordion component
Test files Updates test fixtures and test cases to accommodate new features
Comments suppressed due to low confidence (1)

packages/compass-telemetry/src/telemetry-events.ts:2922

  • The event name 'Data Modeling Relationship Form Opened' doesn't match the type name 'DataModelingDiagramRelationshipEdited'. Consider renaming the event to 'Data Modeling Relationship Edited' for consistency.
  name: 'Data Modeling Relationship Form Opened';

@paula-stacho
Copy link
Collaborator Author

@bsradcliffe for an early review. disclaimer - the drawer is still a placeholder, focus is on the content (form) and highlighting the relationship in the diagram.

Copy link
Collaborator

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

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

One comment I would like to hear your opinion on, otherwise looks very good!


expect(screen.getByTestId('my-test-id')).to.exist;
const button = screen.getByText('Accordion Test');
fireEvent.click(button);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for cleaning-up!

@paula-stacho paula-stacho merged commit ffcfe3b into main Jul 24, 2025
26 of 27 checks passed
@paula-stacho paula-stacho deleted the COMPASS-9478 branch July 24, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat feature flagged PRs labeled with this label will not be included in the release notes of the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants