-
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
Switch order of namespaces and make Destination Default is the defaul… #21047
Conversation
Your frontend tests are failing for the right reasons! the order of the options in the form has changed. You can re-record those snapshots with |
4e27089
to
d9938f4
Compare
Thanks! |
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.
Looks good! Pulled and tested locally, works as expected. I made one optional suggestion for reordering some radio inputs.
@@ -19,7 +19,7 @@ import { ExampleSettingsTable } from "./ExampleSettingsTable"; | |||
const destinationNamespaceValidationSchema = yup.object().shape({ | |||
namespaceDefinition: yup | |||
.string() | |||
.oneOf([NamespaceDefinitionType.source, NamespaceDefinitionType.destination, NamespaceDefinitionType.customformat]) | |||
.oneOf([NamespaceDefinitionType.destination, NamespaceDefinitionType.source, NamespaceDefinitionType.customformat]) |
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.
Not strictly necessary to change the order here, since this just enforces that at least one of these options is selected. But it also doesn't hurt 👍
@@ -48,7 +48,7 @@ export const DestinationNamespaceModal: React.FC<DestinationNamespaceModalProps> | |||
return ( | |||
<Formik | |||
initialValues={{ | |||
namespaceDefinition: initialValues?.namespaceDefinition ?? NamespaceDefinitionType.source, | |||
namespaceDefinition: initialValues?.namespaceDefinition ?? NamespaceDefinitionType.destination, |
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.
This will correctly set NamespaceDefinitionType.destination
as the default, but it still appears as the second option in the list due to the order in the HTML below:
To make it the first option, you could move the destination <Field>
component (lines 83-98) before the source component (lines 67-82).
Note: this is only visible in the upcoming stream table redesign, so you need to set REACT_APP_NEW_STREAMS_TABLE=true
in airbyte-webapp/.env.development
before spinning up the server with npm run start
or npm run start:cloud
to see this new modal UI.
NamespaceDefinitionType.destination, | ||
NamespaceDefinitionType.source, | ||
NamespaceDefinitionType.customformat, |
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.
Same here, not strictly necessary to change the order for the validation schema, but doesn't hurt.
4a810b4
to
8ab1049
Compare
Fixes #21030
What