-
Notifications
You must be signed in to change notification settings - Fork 574
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
only load critical alerts modal once devops store is set #5034
Conversation
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.
❌ Changes requested. Reviewed everything up to ec11c00 in 31 seconds
More details
- Looked at
14
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_UU6EBPR8UbXED4tZ
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -289,7 +289,8 @@ | |||
setContext('openSearchWithPrefilledText', openSearchModal) | |||
|
|||
$: { | |||
if ($enterpriseLicense && $workspaceStore && $userStore && ($devopsRole || $userStore.is_admin)) { | |||
if ($enterpriseLicense && $workspaceStore && $userStore && $devopsRole !== undefined && ($devopsRole || $userStore.is_admin)) { | |||
console.log('mountModal', $devopsRole, $userStore.is_admin) |
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.
Remove the console.log statement to keep the production code clean.
console.log('mountModal', $devopsRole, $userStore.is_admin) | |
// console.log('mountModal', $devopsRole, $userStore.is_admin) |
Deploying windmill with Cloudflare Pages
|
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.
👍 Looks good to me! Incremental review on 7837519 in 9 seconds
More details
- Looked at
12
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/routes/(root)/(logged)/+layout.svelte:292
- Draft comment:
Removing theconsole.log
statement is a good practice for production code as it avoids unnecessary logging. - Reason this comment was not posted:
Confidence changes required:0%
The PR removes a console.log statement which is not necessary for production code. This is a good practice as it cleans up the code and avoids unnecessary logging.
Workflow ID: wflow_xQkh5uYvjGhf3IBp
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Modal was loading in too early before
$devopsRole
was set.The initial load of the modal would show the user to not have devops but workspace admin role and hence display unacknowledged critical alerts for that workspace. Since the badge is updated every 30s or when changing context (to workspace), it would refresh the badge.
Fix: we're only loading the modal once
$devopsRole !== undefined
Important
Ensure critical alerts modal in
+layout.svelte
loads only when$devopsRole
is defined.+layout.svelte
, the critical alerts modal now loads only when$devopsRole
is defined and either$devopsRole
is true or$userStore.is_admin
is true.This description was created by for 7837519. It will automatically update as commits are pushed.