Skip to content

Commit

Permalink
Update form field labels in connection form to match design
Browse files Browse the repository at this point in the history
- Replaced ControlLabels message property with infoTooltipContent
- Replaced property "flex-start" to "center" for FlexContainer (New Connection)
  • Loading branch information
Mark Berger committed Jan 10, 2023
1 parent 71081f9 commit 410cafe
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ export const CreateConnectionNameField = () => {
<Section title={<FormattedMessage id="connection.title" />}>
<Field name="name">
{({ field, meta }: FieldProps<string>) => (
<FlexContainer alignItems="flex-start">
<FlexContainer alignItems="center">
<div className={styles.leftFieldCol}>
<ControlLabels
nextLine
error={!!meta.error && meta.touched}
label={<FormattedMessage id="form.connectionName" />}
message={formatMessage({
infoTooltipContent={formatMessage({
id: "form.connectionName.message",
})}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export const DataResidency: React.FC<DataResidencyProps> = ({ name = "geography"
<Section title={formatMessage({ id: "connection.geographyTitle" })}>
<Field name={name}>
{({ field, form }: FieldProps<Geography>) => (
<FlexContainer alignItems="flex-start">
<FlexContainer alignItems="center">
<div className={styles.leftFieldCol}>
<ControlLabels
nextLine
label={<FormattedMessage id="connection.geographyTitle" />}
message={
infoTooltipContent={
<FormattedMessage
id="connection.geographyDescription"
values={{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "../../scss/colors";
@use "../../scss/variables";
@use "scss/colors";
@use "scss/variables";

.controlContainer {
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ export const ConnectionFormFields: React.FC<ConnectionFormFieldsProps> = ({ valu
{values.namespaceDefinition === NamespaceDefinitionType.customformat && (
<Field name="namespaceFormat">
{({ field, meta }: FieldProps<string>) => (
<FlexContainer alignItems="flex-start">
<FlexContainer alignItems="center">
<div className={styles.leftFieldCol}>
<ControlLabels
className={styles.namespaceFormatLabel}
nextLine
error={!!meta.error}
label={<FormattedMessage id="connectionForm.namespaceFormat.title" />}
message={<FormattedMessage id="connectionForm.namespaceFormat.subtitle" />}
infoTooltipContent={<FormattedMessage id="connectionForm.namespaceFormat.subtitle" />}
/>
</div>
<div className={classNames(styles.rightFieldCol, readonlyClass)}>
Expand All @@ -97,14 +97,14 @@ export const ConnectionFormFields: React.FC<ConnectionFormFieldsProps> = ({ valu
)}
<Field name="prefix">
{({ field }: FieldProps<string>) => (
<FlexContainer alignItems="flex-start">
<FlexContainer alignItems="center">
<div className={styles.leftFieldCol}>
<ControlLabels
nextLine
label={formatMessage({
id: "form.prefix",
})}
message={formatMessage({
infoTooltipContent={formatMessage({
id: "form.prefix.message",
})}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const ScheduleField: React.FC = () => {
<Field name="scheduleData">
{({ field, meta, form }: FieldProps<ConnectionScheduleData>) => (
<>
<FlexContainer alignItems="flex-start">
<FlexContainer alignItems="center">
<div className={styles.leftFieldCol}>
<ControlLabels
className={styles.connectorLabel}
Expand All @@ -161,7 +161,7 @@ export const ScheduleField: React.FC = () => {
</div>
</FlexContainer>
{isCron(form) && (
<FlexContainer alignItems="flex-start">
<FlexContainer alignItems="center">
<div className={styles.leftFieldCol}>
<ControlLabels
className={styles.connectorLabel}
Expand All @@ -170,7 +170,7 @@ export const ScheduleField: React.FC = () => {
label={formatMessage({
id: "form.cronExpression",
})}
message={formatMessage(
infoTooltipContent={formatMessage(
{
id: "form.cronExpression.message",
},
Expand All @@ -186,7 +186,7 @@ export const ScheduleField: React.FC = () => {
</div>

<div className={styles.rightFieldCol} style={{ pointerEvents: mode === "readonly" ? "none" : "auto" }}>
<FlexContainer alignItems="flex-start">
<FlexContainer alignItems="center">
<Input
disabled={mode === "readonly"}
error={!!meta.error}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ export const NamespaceDefinitionField: React.FC<FieldProps<string>> = ({ field,
const [, meta] = useField(field.name);

return (
<FlexContainer alignItems="flex-start">
<FlexContainer alignItems="center">
<div className={styles.leftFieldCol}>
<ControlLabels
nextLine
error={!!meta.error && meta.touched}
label={<FormattedMessage id="connectionForm.namespaceDefinition.title" />}
message={<FormattedMessage id="connectionForm.namespaceDefinition.subtitle" />}
infoTooltipContent={<FormattedMessage id="connectionForm.namespaceDefinition.subtitle" />}
/>
</div>
<div className={styles.rightFieldCol}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const NonBreakingChangesPreferenceField: React.FC<FieldProps<string>> = (
const { mode } = useConnectionFormService();

return (
<FlexContainer alignItems="flex-start">
<FlexContainer alignItems="center">
<div className={styles.leftFieldCol}>
<ControlLabels
nextLine
Expand Down

0 comments on commit 410cafe

Please sign in to comment.