-
Notifications
You must be signed in to change notification settings - Fork 4.5k
🪟 🎉 new streams table edit modal namespace and stream #19713
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
🪟 🎉 new streams table edit modal namespace and stream #19713
Conversation
5070c42
to
2309880
Compare
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.
Code LGTM 👍
Also tested locally - have not found any issues.
Left some not significant comments, except Formik
onChange
behavior.
But need also another review
@matter-q could you please create an issue on missed doc link for "Learn more" and mention it in this PR to keep it trackable. Thanks!
@edmundito could you please remind whom should we ping regarding doc links?
airbyte-webapp/src/components/connection/CatalogTree/next/DestinationNamespaceModal.module.scss
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/components/connection/CatalogTree/next/DestinationNamespaceModal.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/components/connection/CatalogTree/next/DestinationStreamNamesModal.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/components/connection/CatalogTree/next/DestinationStreamNamesModal.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/components/connection/CatalogTree/next/DestinationNamespaceModal.tsx
Outdated
Show resolved
Hide resolved
@matter-q Could you please extract the structure of the tables to separate files? |
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.
Tested. Verified that the tooltips still look good in other areas.
One thing I'd like see is move the modals out of the connection/CatalogTree
folder and instead provide their own folders (connection/DestinationNamespaceModal/
and connection/DestinationStreamNamesModal/
) This would allow the files more easier to maintain since the CatalogTree
has too many files.
<Button type="button" variant="secondary" onClick={onCloseModal}> | ||
<FormattedMessage id="connectionForm.modal.destinationNamespace.action.cancel" /> | ||
</Button> | ||
<Button type="submit" disabled={!dirty || !!errors.prefix}> |
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.
interface DestinationNamespaceModalProps { | ||
initialValues: Pick<FormikConnectionFormValues, "namespaceDefinition" | "namespaceFormat">; | ||
onCloseModal: () => void; | ||
onChange: (values: DestinationNamespaceFormValueType) => void; |
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.
Might be better to call this onSubmit
. onChange
implies that it changes on every input change
} | ||
}; | ||
|
||
const getExampleTableData = (namespaceDefinition: NamespaceDefinitionType): ExampleSettingsTableProps => { |
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 could be extracted out of the component function and into its own, same for getInfo
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.
But I have a dependency with formatMessage
for those functions 😟
data: Array<Record<string, string>>; | ||
} | ||
|
||
const ExampleSettingsTable: React.FC<ExampleSettingsTableProps> = ({ columns, 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.
This should be extracted to its own file along with the example table data generation. It would make this file easier to maintain
One more thing I could not figure out from the review: When I open the namespace modal, I see a loading indicator in the catalog tree table. Would you know why that is happening? |
Also, some tests are failing, it looks like the snapshots need to be updated. |
a2ceba5
to
40fe270
Compare
I found the problem with this behavior. Buttons in the header that open new modals trigger submit an event for the parent form (saveConnection). Fixed by attribute |
3e9d2fe
to
dbce2ce
Compare
a82c6ec
to
e933749
Compare
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.
Did another review after @edmundito 's comments, seems like all mentioned issues are fixed.
But some questions still are opened: #19713 (comment)
Let's wait for reply.
airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.tsx
Outdated
Show resolved
Hide resolved
fb755cd
to
665ce78
Compare
…th modals - Added modal components `Namespace` and `Stream name`
…th modals - Added modal components `Namespace` and `Stream name` - Fixed bug with Tooltip (block-level element inside inline element)
2fb3fe2
to
7ef7000
Compare
What
Closes #17831
How
Loom
https://www.loom.com/share/61713527a7334a61af9c05a067ae9114