-
Notifications
You must be signed in to change notification settings - Fork 356
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
fix: Model delete redirect only needed if inside the model [WEB-1867] #8512
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
const listPath = useMemo( | ||
() => | ||
model.workspaceId ? paths.workspaceDetails(model.workspaceId, 'models') : paths.modelList(), | ||
[model.workspaceId], | ||
); | ||
|
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.
nit: given that the model is already being passed into the modal component, and the path is only used when the modal is confirmed, can we move this into the deleteModelModal component?
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.
That makes sense; with the new commit I've changed the prop to redirectOnDelete
and did the redirect path in the modal code
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!
Description
Bug: deleting a model from a Workspace's Model Registry tab redirects us to the wrong place (general
/det/models
page)Solution: a redirect is only needed if the user is requesting delete from the Model Details page, where I will pass a
listPath
prop. Actions on the model registry tables will no longer trigger a redirect.Note: we don't use the store in models, so the registry takes a few seconds to update
Alternatives: I considered always passing a workspace to the delete modal, and redirecting by default. The issue was that ModelActionDropdown is wrapped by InteractiveTable/ContextMenu and cannot pass new props
Test Plan
Checklist
docs/release-notes/
.See Release Note for details.