-
-
Couldn't load subscription status.
- Fork 10.3k
feat(replication): Significantly improve the replication UI behavior #38237
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
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
| const { data: replicationStatusData } = useReplicationPipelineReplicationStatusQuery( | ||
| { projectRef, pipelineId: pipeline?.id }, | ||
| { | ||
| enabled: !!pipeline?.id, |
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.
| } | ||
| ) | ||
| const errorCount = (replicationStatusData?.table_statuses || []).filter( | ||
| (t: any) => t.state?.name === 'error' |
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.
avoid any as much as possible - this one seems unnecessary since table_statuses is typed correctly
I'll push up the fixes btw so no worries - just leaving comments as I review along
| defaultValues, | ||
| }) | ||
|
|
||
| const onSubmit = async (data: z.infer<typeof FormSchema>) => { |
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.
There's quite a bit of duplicated logic between this and apply and run - if we can consolidate a bit
| } | ||
| } | ||
|
|
||
| const onApplyAndRun = () => { |
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.
can't we just call onSubmit from form.handleSubmit? with success handlers
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.
LGTM! Tested on staging preview
- Creating a new pipeline
- Updating an existing pipeline
- Deleting a pipeline
Also tested deleting SQL snippets due to the change in API types for content delete mutation

This PR improves the replication UI with the following improvements:
View Statusbutton.Cancel,ApplyandApply and Restart/Apply and Startbuttons for a much cleaner UX.StartorStopa pipeline which is clearer.Screenshots
New Replication Status Warning
New Buttons in the Panel
Restarting State
Delete Destination Dialog