-
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
🪟 🐛 Fix non-breaking schema changes preference issues #20625
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,6 @@ | |
gap: variables.$spacing-md; | ||
} | ||
|
||
.connectorLabel { | ||
max-width: 328px; | ||
margin-right: variables.$spacing-xl; | ||
vertical-align: top; | ||
} | ||
Comment on lines
-12
to
-16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably copied from the Schedule field. That also needs to be cleaned up but I omitted it here because of the scope of the PR. |
||
|
||
.leftFieldCol { | ||
flex: 1; | ||
max-width: 640px; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,13 @@ import { useConnectionFormService } from "hooks/services/ConnectionForm/Connecti | |
|
||
import styles from "./NonBreakingChangesPreferenceField.module.scss"; | ||
|
||
const SUPPORTED_PREFERENCES = [NonBreakingChangesPreference.ignore, NonBreakingChangesPreference.disable]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may add more options in the future that may not have an i18n string or may need to wait on the backend, so they need to be supported manually. |
||
|
||
export const NonBreakingChangesPreferenceField: React.FC<FieldProps<string>> = ({ field, form }) => { | ||
const { formatMessage } = useIntl(); | ||
|
||
const preferenceOptions = useMemo(() => { | ||
const values = Object.values(NonBreakingChangesPreference); | ||
return values.map((value) => ({ | ||
return SUPPORTED_PREFERENCES.map((value) => ({ | ||
value, | ||
label: formatMessage({ id: `connectionForm.nonBreakingChangesPreference.${value}` }), | ||
testId: `nonBreakingChangesPreference-${value}`, | ||
|
@@ -29,7 +30,6 @@ export const NonBreakingChangesPreferenceField: React.FC<FieldProps<string>> = ( | |
<div className={styles.flexRow}> | ||
<div className={styles.leftFieldCol}> | ||
<ControlLabels | ||
className={styles.connectorLabel} | ||
nextLine | ||
label={formatMessage({ | ||
id: "connectionForm.nonBreakingChangesPreference.label", | ||
|
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.
I made this "Disable connection" instead of "Pause sync" as shown in the design because we don't really have a concept of pausing in the UI and this is what will actually happen - @andyjih thoughts?