Skip to content

Update: cleanups, improvements #1966

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

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open

Update: cleanups, improvements #1966

wants to merge 49 commits into from

Conversation

ItzNotABug
Copy link
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

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.)

@ItzNotABug ItzNotABug self-assigned this Jun 2, 2025
@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Jun 2, 2025

The preview deployment failed. 🔴

Open Build Logs

Last updated at: 2025-06-14 09:41:24 CET

@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Jun 2, 2025

The preview deployment failed. 🔴

Open Build Logs

Last updated at: 2025-06-14 09:41:24 CET

<svelte:fragment slot="header" let:root>
<Table.Header.Cell column="dueDate" {root}>Due date</Table.Header.Cell>
<Table.Header.Cell column="status" {root}>Status</Table.Header.Cell>
<Table.Header.Cell column="amount" {root}>Amount due</Table.Header.Cell>
<Table.Header.Cell column="action" {root} />
</svelte:fragment>

{#if isLoadingInvoices}
{#each Array.from({ length: 2 }) as _}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because svelte 5 actually wants us to have keys for each. also a _ is not that clean :P

we would need to do:

Suggested change
{#each Array.from({ length: 2 }) as _}
{#each Array.from({ length: 2 }).keys() as index (index)}

to have it clean ;-)

0
)
}
];

onMount(async () => (usageProjects = await data.projectsPromise));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why dont we pass the promise and await where we actually need it? 👀

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its used on multiple ProjectBreakdown components based on the type of service. So it makes sense to load all of them here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it adds a bit of redundant logic to maintain a promise and a resolved var with value under ProjectBreakdown. Doesn't feel like the component's responsibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants