-
Notifications
You must be signed in to change notification settings - Fork 875
fix: template permissions page never loads #5014
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
@@ -152,65 +140,59 @@ export const TemplateLayout: FC<PropsWithChildren> = ({ children }) => { | |||
} | |||
> | |||
<Stack direction="row" spacing={3} className={styles.pageTitle}> | |||
{!isLoading && ( |
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'm not sure why we were wrapping all these blocks in isLoading
- seems like we just need to make sure the template is there (and we do on line 114).
@@ -26,14 +25,11 @@ export const TemplatePermissionsPage: FC< | |||
context: { templateId: template?.id }, | |||
}) | |||
const { templateACL, userToBeUpdated, groupToBeUpdated } = state.context | |||
if (!template || !permissions) { | |||
return <Loader /> | |||
} |
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.
We shouldn't need another loader here, right? We already have the Suspense
in the parent component with a fallback loader. Also, at this point, we can be certain template is loaded.
Thanks for those changes! I QA it and it is working as expected. |
(hopefully) resolves #4953
Previously, on the Template Permissions page, we always showed a loader if a user did not have permissions to update the template.
We don't anymore; we just disable the dropdowns on the page:
In addition, I made an effort to clean up loading on this page overall. @BrunoQuaresma could you please review carefully? I think you were the last person to touch this code.