Skip to content

Commit

Permalink
spacing/flex in perf page
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronshaf committed Nov 16, 2024
1 parent 4139e99 commit 4e85f83
Showing 1 changed file with 55 additions and 32 deletions.
87 changes: 55 additions & 32 deletions packages/idb-cache-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { View } from "@instructure/ui-view";
import { Flex } from "@instructure/ui-flex";
import { Heading } from "@instructure/ui-heading";
import { NumberInput } from "@instructure/ui-number-input";
import { TextInput } from "@instructure/ui-text-input";
import GitHubLink from "./components/GitHubLink";
import BlankStat from "./components/BlankStat";

Expand Down Expand Up @@ -146,37 +147,59 @@ const App = () => {
Test Configuration
</legend>
<Flex direction="column" gap="small">
<div className="flex items-center justify-between">
<span>
Cache key: <code className="text-sm">{cacheKey}</code>
</span>
<Button
data-testid="reset-cacheKey"
onClick={() => {
localStorage.removeItem("cacheKey");
window.location.reload();
}}
>
Reset
</Button>
</div>
<div className="flex items-center justify-between">
<span>
Cache buster: <code className="text-sm">{cacheBuster}</code>
</span>
<Button
data-testid="reset-cacheBuster"
onClick={() => {
localStorage.removeItem("cacheBuster");
window.location.reload();
}}
>
Reset
</Button>
</div>

<Flex gap="medium">
<Flex.Item shouldGrow>
<Flex.Item>
<Flex gap="medium" justifyItems="space-between">
<Flex.Item width="48%">
<Flex direction="row" alignItems="end">
<Flex.Item shouldGrow>
<TextInput
renderLabel="Cache key:"
interaction="disabled"
value={cacheKey}
/>
</Flex.Item>
<Flex.Item>
<Button
margin="0 0 0 xxx-small"
data-testid="reset-cacheKey"
onClick={() => {
localStorage.removeItem("cacheKey");
window.location.reload();
}}
>
Reset
</Button>
</Flex.Item>
</Flex>
</Flex.Item>
<Flex.Item width="48%">
<Flex direction="row" alignItems="end">
<Flex.Item shouldGrow>
<TextInput
renderLabel="Cache buster:"
interaction="disabled"
value={cacheBuster}
/>
</Flex.Item>
<Flex.Item>
<Button
margin="0 0 0 xxx-small"
data-testid="reset-cacheBuster"
onClick={() => {
localStorage.removeItem("cacheBuster");
window.location.reload();
}}
>
Reset
</Button>
</Flex.Item>
</Flex>
</Flex.Item>
</Flex>
</Flex.Item>

<Flex justifyItems="space-between">
<Flex.Item width="48%">
<NumberInput
renderLabel="Size of data (KB):"
onChange={(e) => {
Expand All @@ -196,7 +219,7 @@ const App = () => {
value={Math.round(itemSize / 1024)} // Display in KB
/>
</Flex.Item>
<Flex.Item shouldGrow>
<Flex.Item width="48%">
<NumberInput
renderLabel="Number of chunks:"
interaction="disabled"
Expand Down

0 comments on commit 4e85f83

Please sign in to comment.