-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🪟 🎉 Prevent users from editing existing connection if they have a schema change #20276
🪟 🎉 Prevent users from editing existing connection if they have a schema change #20276
Conversation
/> | ||
{status.editControlsVisible && ( | ||
<EditControls | ||
<SchemaChangeBackdrop |
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.
only change here is wrapping this in the backdrop
...yte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionPageTitle.module.scss
Outdated
Show resolved
Hide resolved
/> | ||
{status.editControlsVisible && ( | ||
<EditControls | ||
<SchemaChangeBackdrop> |
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.
only change here is wrapping the form in the backdrop
@@ -5,3 +5,6 @@ $sidebar: 9999; | |||
$panelSplitter: 0; | |||
$dropdownMenu: 2; | |||
$notification: 20; | |||
$schemaChangesBackdrop: 3; |
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.
explicitly set a higher z-index than the dropdown menu and the switch (1)
@@ -48,7 +48,7 @@ describe("<SchemaChangesDetected />", () => { | |||
|
|||
const { queryByTestId } = renderComponent(); | |||
|
|||
expect(queryByTestId("schemaChagnesDetected")).toBeFalsy(); | |||
expect(queryByTestId("schemaChangesDetected")).toBeFalsy(); |
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.
typo fix
|
||
const { getByTestId } = renderComponent(); | ||
|
||
expect(getByTestId("schemaChangesBackdrop")).toMatchSnapshot(); |
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.
We could test the content directly here for the text, but i don't know a good way to test which .svg is rendered here aside from the snapshot. Open to ideas!
What
closes #20201
How
We would like this to only cover the sync catalog, not the schedule and non-breaking changes preferences dropdown. Because that requires more refactoring of this form, for now we are just blocking the entire form.
Recommended reading order
<SchemaChangeBackdrop/>
and its scss module<ConnectionReplicationTab />
Testing
Have
REACT_APP_AUTO_DETECT_SCHEMA_CHANGES=true
when you start the frontend.Make a breaking change to a connection, then refresh the schema and navigate away to trigger the new flow.
If you navigate back to
Replication
tab, you should see the overlay!When you hit
View Changes
it should disappear.When you resolve the breaking change and submit, you should not see the overlay.