Skip to content

Conversation

paula-stacho
Copy link
Collaborator

Description

Info banner shows only the first time (when the diagram is newly created) and can be closed.
Screenshot 2025-09-19 at 11 11 30

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 requested a review from a team as a code owner September 19, 2025 09:12
@github-actions github-actions bot added the feat label Sep 19, 2025
Copy link
Contributor

@Copilot 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 adds an informational banner that displays when a new diagram is created, explaining that the diagram is based on a sample of documents and won't affect actual data. The banner appears only for newly created diagrams and can be dismissed by the user.

  • Adds isNewlyCreated flag to track when a diagram is newly generated
  • Implements dismissible info banner with data safety message
  • Updates component props to include database name and newly created status

Reviewed Changes

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

File Description
packages/compass-data-modeling/src/store/diagram.ts Adds isNewlyCreated boolean flag to diagram state and sets appropriate values during diagram operations
packages/compass-data-modeling/src/components/diagram-editor.tsx Implements the info banner component with dismissible functionality and connects it to diagram state
packages/compass-data-modeling/src/components/diagram-editor.spec.tsx Adds comprehensive tests for both existing and new diagram scenarios, including banner visibility and dismissal behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@paula-stacho
Copy link
Collaborator Author

cc @bsradcliffe

@paula-stacho paula-stacho added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label Sep 19, 2025
className={dataInfoBannerStyles}
data-testid="data-info-banner"
>
<h4>Worried about your data?</h4>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit

Copy link
Collaborator

@johnjackweir johnjackweir left a comment

Choose a reason for hiding this comment

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

One nit on the copy language based on comments on the figma, but otherwise LGTM!

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.

2 participants