Skip to content

Conversation

@mabaasit
Copy link
Collaborator

Add diagram editor side panel. Currently open when an edge is clicked.

Preview
SidePanel.mov

Description

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)

Copilot AI review requested due to automatic review settings July 14, 2025 19:41
@mabaasit mabaasit requested a review from a team as a code owner July 14, 2025 19:41
@github-actions github-actions bot added the feat label Jul 14, 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

Adds a side panel to the diagram editor that opens when an edge is clicked.

  • Introduce Redux state (side-panel.ts) for tracking panel open/closed
  • Wire openSidePanel action into DiagramEditor and display DiagramEditorSidePanel
  • Integrate new component into the main DataModeling view

Reviewed Changes

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

Show a summary per file
File Description
packages/compass-data-modeling/src/store/side-panel.ts New Redux module for side‐panel state, actions, and reducer
packages/compass-data-modeling/src/store/reducer.ts Combined sidePanel slice into root reducer and action types
packages/compass-data-modeling/src/components/diagram-editor.tsx Added onEdgeClick handler dispatching openSidePanel
packages/compass-data-modeling/src/components/diagram-editor-side-panel.tsx New side‐panel component connected to Redux
packages/compass-data-modeling/src/components/data-modeling.tsx Render DiagramEditorSidePanel alongside DiagramEditor
Comments suppressed due to low confidence (2)

packages/compass-data-modeling/src/components/diagram-editor-side-panel.tsx:36

  • Typo in component name: DiagmramEditorSidePanel should be DiagramEditorSidePanel to match the file name and naming conventions.
function DiagmramEditorSidePanel({

packages/compass-data-modeling/src/store/side-panel.ts:27

  • No unit tests were added for sidePanelReducer. Consider adding tests to verify that the open and close actions correctly update isOpen state.
export const sidePanelReducer: Reducer<SidePanelState> = (

return null;
}
return (
<div className={cx(containerStyles, isDarkMode && darkModeContainerStyles)}>
Copy link

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

Consider adding appropriate ARIA attributes (e.g., role="dialog", aria-label) to the panel container so screen readers can properly announce this element.

Suggested change
<div className={cx(containerStyles, isDarkMode && darkModeContainerStyles)}>
<div
className={cx(containerStyles, isDarkMode && darkModeContainerStyles)}
role="dialog"
aria-label="Diagram Editor Side Panel"
>

Copilot uses AI. Check for mistakes.
edges={edges}
nodes={areNodesReady ? nodes : []}
onEdgeClick={() => {
// TODO: we have to open a side panel with edge details
Copy link

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

[nitpick] The TODO comment is now outdated since onOpenSidePanel is implemented. Please update or remove this comment to keep the code clean.

Suggested change
// TODO: we have to open a side panel with edge details

Copilot uses AI. Check for mistakes.
@mabaasit mabaasit added feature flagged PRs labeled with this label will not be included in the release notes of the next release no release notes Fix or feature not for release notes labels Jul 14, 2025
@gribnoysup gribnoysup merged commit 369ef5e into main Jul 15, 2025
62 of 63 checks passed
@gribnoysup gribnoysup deleted the COMPASS-9476-data-modeling-side-panel branch July 15, 2025 09:13
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 no release notes Fix or feature not for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants