-
Notifications
You must be signed in to change notification settings - Fork 229
feat(compass-data-modeling): add info banner COMPASS-9773 #7345
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
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.
cc @bsradcliffe |
1f02990
to
1d752a6
Compare
className={dataInfoBannerStyles} | ||
data-testid="data-info-banner" | ||
> | ||
<h4>Worried about your data?</h4> |
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.
Nit
- Based on Julia's comment [here], can we shorten the second sentence (https://www.figma.com/design/w51HGIb2PDdyZqyCOMMypr?node-id=1528-22764#1404509115) "Changes made to the diagram will not impact your data"
- "worried" is making me worried :) How do you feel about rephrasing as "Questions about your data?"
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.
One nit on the copy language based on comments on the figma, but otherwise LGTM!
Description
Info banner shows only the first time (when the diagram is newly created) and can be closed.

Checklist
Motivation and Context
Open Questions
Dependents
Types of changes