-
Notifications
You must be signed in to change notification settings - Fork 229
feat(data-modeling): add side panel COMPASS-9476 #7111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 intoDiagramEditor
and displayDiagramEditorSidePanel
- 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 beDiagramEditorSidePanel
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 updateisOpen
state.
export const sidePanelReducer: Reducer<SidePanelState> = (
return null; | ||
} | ||
return ( | ||
<div className={cx(containerStyles, isDarkMode && darkModeContainerStyles)}> |
There was a problem hiding this comment.
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.
<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.
@@ -332,6 +335,10 @@ const DiagramEditor: React.FunctionComponent<{ | |||
title={diagramLabel} | |||
edges={edges} | |||
nodes={areNodesReady ? nodes : []} | |||
onEdgeClick={() => { | |||
// TODO: we have to open a side panel with edge details |
There was a problem hiding this comment.
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.
// TODO: we have to open a side panel with edge details |
Copilot uses AI. Check for mistakes.
Add diagram editor side panel. Currently open when an edge is clicked.
Preview
SidePanel.mov
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes