-
Notifications
You must be signed in to change notification settings - Fork 195
fix(functions): align deployment action menu icon placement to match sites and solve error page issue #2532
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(functions): align deployment action menu icon placement to match sites and solve error page issue #2532
Conversation
…sites and solve error page issue
ConsoleProject ID: Tip Cursor pagination performs better than offset pagination when loading further pages. |
WalkthroughThe PR adjusts UI icon placements (many ActionMenu items from Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/routes/(console)/project-[region]-[project]/functions/function-[function]/(components)/downloadActionMenuItem.svelte(2 hunks)src/routes/(console)/project-[region]-[project]/functions/function-[function]/(modals)/deleteModal.svelte(2 hunks)src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.svelte(2 hunks)src/routes/(console)/project-[region]-[project]/functions/function-[function]/delete.svelte(2 hunks)src/routes/(console)/project-[region]-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte(3 hunks)src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/deleteDeploymentModal.svelte(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-13T05:13:54.542Z
Learnt from: ItzNotABug
PR: appwrite/console#2413
File: src/routes/(console)/project-[region]-[project]/databases/table.svelte:33-39
Timestamp: 2025-10-13T05:13:54.542Z
Learning: In Svelte 5, `import { page } from '$app/state'` provides a reactive state proxy that can be accessed directly (e.g., `page.params`), unlike the older `import { page } from '$app/stores'` which returns a readable store requiring the `$page` syntax for auto-subscription in components.
Applied to files:
src/routes/(console)/project-[region]-[project]/functions/function-[function]/(components)/downloadActionMenuItem.svelte
📚 Learning: 2025-10-05T09:41:40.439Z
Learnt from: ItzNotABug
PR: appwrite/console#2398
File: src/routes/(console)/verify-email/+page.svelte:48-51
Timestamp: 2025-10-05T09:41:40.439Z
Learning: In SvelteKit 5, `page` imported from `$app/state` is a reactive state object (using runes), not a store. It should be accessed as `page.data` without the `$` prefix, unlike the store-based `$page` from `$app/stores` in earlier versions.
Applied to files:
src/routes/(console)/project-[region]-[project]/functions/function-[function]/(components)/downloadActionMenuItem.svelte
📚 Learning: 2025-10-26T10:20:29.792Z
Learnt from: ItzNotABug
PR: appwrite/console#2509
File: src/routes/(console)/project-[region]-[project]/auth/teams/+page.svelte:47-61
Timestamp: 2025-10-26T10:20:29.792Z
Learning: When deleting teams in the Appwrite Console codebase, only `Dependencies.TEAMS` needs to be invalidated. Additional invalidations for `Dependencies.TEAM` (detail route) and `Dependencies.MEMBERSHIPS` are not necessary because the deleted teams and their memberships no longer exist.
Applied to files:
src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/deleteDeploymentModal.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: e2e
- GitHub Check: build
🔇 Additional comments (10)
src/routes/(console)/project-[region]-[project]/functions/function-[function]/delete.svelte (1)
2-3: LGTM!The imports are necessary for the new redirect logic after deployment deletion.
src/routes/(console)/project-[region]-[project]/functions/function-[function]/(components)/downloadActionMenuItem.svelte (2)
5-5: LGTM!The
IconChevronRightimport is necessary for the new trailing icon that indicates the submenu.
16-17: LGTM!The icon placement change improves UI consistency by moving the primary action icon (Download) to the leading position and adding a chevron to indicate the submenu. This aligns with the broader icon placement standardization across the codebase as described in the PR objectives.
src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/deleteDeploymentModal.svelte (1)
31-34: Good use of Promise.all for parallel invalidation.Wrapping the invalidate calls in
Promise.allimproves performance when both dependencies need to be refreshed.src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.svelte (2)
116-116: LGTM!The icon placement change aligns the Redeploy button with the broader icon standardization across the UI, moving the primary action icon to the leading position.
137-137: LGTM!The icon placement change aligns the Build logs link with the broader icon standardization across the UI, moving the primary action icon to the leading position.
src/routes/(console)/project-[region]-[project]/functions/function-[function]/(modals)/deleteModal.svelte (1)
2-3: LGTM!The imports are necessary for the new redirect logic after deployment deletion.
src/routes/(console)/project-[region]-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte (3)
29-29: LGTM!The
IconTrashimport is necessary for the new Delete action button.
107-107: LGTM!The icon placement change aligns the Redeploy button with the broader icon standardization across the UI.
124-135: LGTM!The Delete action implementation is well-designed:
- Properly gated by
$canWriteFunctionsfor permission checks- Correctly disabled during active deployment states ('building', 'processing', 'waiting')
- Uses
status="danger"to indicate the destructive nature of the action- Follows consistent icon placement patterns with
leadingIcon={IconTrash}
...onsole)/project-[region]-[project]/functions/function-[function]/(modals)/deleteModal.svelte
Outdated
Show resolved
Hide resolved
src/routes/(console)/project-[region]-[project]/functions/function-[function]/delete.svelte
Outdated
Show resolved
Hide resolved
...nsole)/project-[region]-[project]/sites/site-[site]/deployments/deleteDeploymentModal.svelte
Show resolved
Hide resolved
| functionId: selectedDeployment.resourceId, | ||
| deploymentId: selectedDeployment.$id | ||
| }); | ||
| if (page.url.href.includes(`deployment-${selectedDeployment.$id}`)) { |
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.
lets just use the route.id and check for deployment-[deployment].
| {#if !!data.deployment?.sourceSize || !!data.deployment?.sourceSize} | ||
| <DownloadActionMenuItem deployment={data.deployment} {toggle} /> | ||
| {/if} | ||
| {#if $canWriteFunctions && data.deployment.status !== 'building' && data.deployment.status !== 'processing' && data.deployment?.status !== 'waiting'} |
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 can check if $canWriteFunctions && data.deployment.status === 'available' instead of all inverted checks.
| invalidate(Dependencies.DEPLOYMENTS), | ||
| invalidate(Dependencies.SITE) | ||
| ]); | ||
| if (page.url.href.includes(`deployment-${selectedDeployment.$id}`)) { |
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.
here as well.
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.
this seems to be a duplicate of deleteModal.svelte, I don't see any difference.
…
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Summary by CodeRabbit
New Features
Improvements