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 25 commits into
base: main
Choose a base branch
from
Open

Update: cleanups, improvements #1966

wants to merge 25 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-03 07:26:31 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-03 07:26:30 CET

@ItzNotABug
Copy link
Member Author

TODO: load region based console variable early rather than per project.

for (const project of projects) {
project.region ??= 'default';
}
sdk.forConsole.console.variables().then((vars) => consoleVariables.set(vars));
Copy link
Contributor

Choose a reason for hiding this comment

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

using stores in +layout doesnt work that well 👍🏻

Comment on lines +26 to +30
fetch(`${endpoint}/health/version`, {
headers: { 'X-Appwrite-Project': project }
})
.then((res) => res.json().catch(() => null))
.then((data) => version.set(data?.version));
Copy link
Contributor

Choose a reason for hiding this comment

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

same here we stores

Copy link
Contributor

Choose a reason for hiding this comment

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

if we wanna put async data into stores, it should happen with the store, in the load functions 👍🏻

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

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.

2 participants