Skip to content

Commit

Permalink
Merge pull request #676 from appwrite/fix-project-usage-collapsible
Browse files Browse the repository at this point in the history
fix: project usage dropdown
  • Loading branch information
eldadfux authored Dec 21, 2023
2 parents 207b68b + 0b3f30d commit 9fc2d5c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/cardGrid.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="grid-1-2-col-1 u-flex u-flex-vertical u-gap-16">
<slot />
</div>
<div class="grid-1-2-col-2 u-flex u-flex-vertical u-gap-16">
<div class="grid-1-2-col-2 u-flex u-flex-vertical u-gap-16 u-min-width-0">
<slot name="aside" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/collapsibleItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<details class="collapsible-wrapper" {open}>
<!-- svelte-ignore a11y-no-redundant-roles -->
<summary
class="collapsible-button"
class="collapsible-button u-position-relative"
on:keyup={clickOnEnter}
on:click
role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import { Collapsible, CollapsibleItem } from '$lib/components';
import {
TableBody,
TableCell,
TableCellLink,
TableCellHead,
TableHeader,
TableRow,
Table
TableScroll,
TableCellText
} from '$lib/elements/table';
import { abbreviateNumber } from '$lib/helpers/numbers';
import { humanFileSize } from '$lib/helpers/sizeConvertion';
Expand Down Expand Up @@ -55,29 +55,27 @@
<Collapsible>
<CollapsibleItem>
<svelte:fragment slot="title">Project breakdown</svelte:fragment>
<div class="table-wrapper" data-sveltekit-preload-data="off">
<Table noMargin noStyles>
<TableHeader>
<TableCellHead width={285}>Project</TableCellHead>
<TableCellHead>Usage</TableCellHead>
<TableCellHead width={140} />
</TableHeader>
<TableBody>
{#each groupByProject(metric).sort((a, b) => b.usage - a.usage) as project}
<TableRow>
<TableCell title="Project">
{getProjectName(project.projectId)}
</TableCell>
<TableCell title="Usage">{format(project.usage)}</TableCell>
<TableCellLink
title="Go to project usage"
href={getProjectUsageLink(project.projectId)}>
View project usage
</TableCellLink>
</TableRow>
{/each}
</TableBody>
</Table>
</div>
<TableScroll noMargin>
<TableHeader>
<TableCellHead width={185}>Project</TableCellHead>
<TableCellHead width={100}>Usage</TableCellHead>
<TableCellHead width={140} />
</TableHeader>
<TableBody>
{#each groupByProject(metric).sort((a, b) => b.usage - a.usage) as project}
<TableRow>
<TableCellText title="Project">
{getProjectName(project.projectId)}
</TableCellText>
<TableCellText title="Usage">{format(project.usage)}</TableCellText>
<TableCellLink
title="Go to project usage"
href={getProjectUsageLink(project.projectId)}>
View project usage
</TableCellLink>
</TableRow>
{/each}
</TableBody>
</TableScroll>
</CollapsibleItem>
</Collapsible>

3 comments on commit 9fc2d5c

@vercel
Copy link

@vercel vercel bot commented on 9fc2d5c Dec 21, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 9fc2d5c Dec 21, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

console-preview – ./

console-preview-appwrite.vercel.app
console-next.vercel.app
console-preview-git-main-appwrite.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 9fc2d5c Dec 21, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

console-cloud – ./

console-cloud.vercel.app
console-cloud-git-main-appwrite.vercel.app
console-cloud-appwrite.vercel.app

Please sign in to comment.