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
Duplicate and restore project #9816
base: develop
Are you sure you want to change the base?
Conversation
@somebody1234 can you fix the conflicts? I will QA this later today and would be great to merge |
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 except a few improvents in UX
backend={backend} | ||
latestVersion={latestVersion} | ||
dispatchAssetListEvent={dispatchAssetListEvent} | ||
doRestore={() => { | ||
restoreMutation.mutate({ |
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 we use mutateAsync
here? If we pass a function that returns a promise to a button, button will automatically set loading state and remove it once promise resolves
await versionsQuery.refetch() | ||
}, | ||
onError: (error: unknown) => { | ||
toastAndLog('restoreProjectError', error, item.item.title) |
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 sure it's a good idea to toast the error, because it will frustrate users - errors happen, but the user can't do anything with the error. Maybe we can show additional actions in Toast? Or maybe display the error inline?
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 don't know about additional actions in toast tbh. inline sounds fine but not sure what's the best way to send the error info back to the button that was responsible for the error
backend={backend} | ||
latestVersion={latestVersion} | ||
dispatchAssetListEvent={dispatchAssetListEvent} |
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.
Also I think it worth to add "restore" and "duplicate" button right in "Compare" dialog , either in top bar above the editor or in the footer below.
Pull Request Description
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
The documentation has been updated, if necessary.Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
Unit tests have been written where possible.If GUI codebase was changed, the GUI was tested when built using./run ide build
.