-
Notifications
You must be signed in to change notification settings - Fork 179
fix: Disable redeploy button when sourceSize
is 0
#2136
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
base: main
Are you sure you want to change the base?
fix: Disable redeploy button when sourceSize
is 0
#2136
Conversation
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-07-21 11:26:07 CET |
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-07-21 11:26:07 CET |
@@ -98,7 +98,7 @@ | |||
</Button> | |||
<svelte:fragment slot="menu" let:toggle> | |||
<ActionMenu.Root> | |||
{#if $canWriteFunctions} | |||
{#if $canWriteFunctions && activeDeployment.sourceSize !== 0} |
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.
Hiding it all-together is considered bad UX, as it doesn't explain why it's sometimes disappearing. Also can cause trouble to feature discoverability.
Instead, let's just set it disabled: https://github.com/appwrite/console/blob/8381af6982a1eff132b1e40cccf6bc2ba3d508d4/src/routes/(console)/project-[region]-[project]/functions/function-[function]/(components)/downloadActionMenuItem.svelte#L26-L33
Also, let's add tooltip to explain why it's disabled, It could say something like Source is empty
.
Please also add tooltip to download button I linked above, it seems to be missing it too.
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 agree disabling is much better than hiding. Since the existing pattern hid the button, I extended the same.
I'll make the change to disable all the instances.
sourceSize
is 0sourceSize
is 0
What does this PR do?
Following the pattern established in DeploymentActionMenu, this PR hides the
Redeploy
action/button in other places whensourceSize
is 0.Test Plan
Manual QA: verified
Redeploy
button is hidden when deploymentsourceSize
is 0.Related PRs and Issues
#1894 where
Redeploy
item was first hidden inDeploymentActionMenu
.