Skip to content
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

chore: add light mode to k8s tables #7584

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test('Expect simple column styling', async () => {
const text = screen.getByText(deployment.name);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-sm');
expect(text).toHaveClass('text-gray-300');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});

test('Expect clicking works', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ function openDetails() {
</script>

<button class="hover:cursor-pointer flex flex-col max-w-full" on:click="{() => openDetails()}">
<div class="text-sm text-gray-300 max-w-full overflow-hidden text-ellipsis">{object.name}</div>
<div class="text-sm text-[var(--pd-table-body-text-highlight)] max-w-full overflow-hidden text-ellipsis">
{object.name}
</div>
</button>
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ test('Expect simple column styling', async () => {
const text = screen.getByText(deployment.ready + ' / ' + deployment.replicas);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-xs');
expect(text).toHaveClass('text-gray-500');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import type { DeploymentUI } from './DeploymentUI';
export let object: DeploymentUI;
</script>

<div class="text-xs text-gray-500">
<div class="text-xs text-[var(--pd-table-body-text-highlight)]">
{object.ready} / {object.replicas}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test('Expect simple column styling with single path ingress', async () => {
const text = screen.getByText(backend);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-sm');
expect(text).toHaveClass('text-gray-500');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});

test('Expect simple column styling with multiple paths ingress', async () => {
Expand Down Expand Up @@ -110,11 +110,11 @@ test('Expect simple column styling with multiple paths ingress', async () => {
const firstElement = screen.getByText(backends[0]);
expect(firstElement).toBeInTheDocument();
expect(firstElement).toHaveClass('text-sm');
expect(firstElement).toHaveClass('text-gray-500');
expect(firstElement).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
const secondElement = screen.getByText(backends[1]);
expect(secondElement).toBeInTheDocument();
expect(secondElement).toHaveClass('text-sm');
expect(secondElement).toHaveClass('text-gray-500');
expect(secondElement).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});

test('Expect simple column styling with route', async () => {
Expand All @@ -137,5 +137,5 @@ test('Expect simple column styling with route', async () => {
const text = screen.getByText(backend);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-sm');
expect(text).toHaveClass('text-gray-500');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ const ingressRouteUtils = new IngressRouteUtils();
</script>

{#each ingressRouteUtils.getBackends(object) as backend}
<div class="text-sm text-gray-500">{backend}</div>
<div class="text-sm text-[var(--pd-table-body-text-highlight)]">{backend}</div>
{/each}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test('Expect simple column styling with Ingress', async () => {
const text = screen.getByText(ingressUI.name);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-sm');
expect(text).toHaveClass('text-gray-300');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});

test('Expect clicking on Ingress works', async () => {
Expand All @@ -76,7 +76,7 @@ test('Expect simple column styling with Route', async () => {
const text = screen.getByText(routeUI.name);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-sm');
expect(text).toHaveClass('text-gray-300');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});

test('Expect clicking on Route works', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ function openDetails() {
</script>

<button class="hover:cursor-pointer flex flex-col max-w-full" on:click="{() => openDetails()}">
<div class="text-sm text-gray-300 max-w-full overflow-hidden text-ellipsis">{object.name}</div>
<div class="text-sm text-[var(--pd-table-body-text-highlight)] max-w-full overflow-hidden text-ellipsis">
{object.name}
</div>
</button>
2 changes: 1 addition & 1 deletion packages/renderer/src/lib/node/NodeColumnName.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test('Expect simple column styling', async () => {
const text = screen.getByText(node.name);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-sm');
expect(text).toHaveClass('text-gray-300');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});

test('Expect clicking works', async () => {
Expand Down
4 changes: 3 additions & 1 deletion packages/renderer/src/lib/node/NodeColumnName.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ function openDetails() {
</script>

<button class="hover:cursor-pointer flex flex-col max-w-full" on:click="{() => openDetails()}">
<div class="text-sm text-gray-300 max-w-full overflow-hidden text-ellipsis">{object.name}</div>
<div class="text-sm text-[var(--pd-table-body-text-highlight)] max-w-full overflow-hidden text-ellipsis">
{object.name}
</div>
</button>
2 changes: 1 addition & 1 deletion packages/renderer/src/lib/pod/PodColumnAge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ test('Expect simple column styling', async () => {
const text = screen.getByText(pod.age);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-sm');
expect(text).toHaveClass('text-gray-700');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});
2 changes: 1 addition & 1 deletion packages/renderer/src/lib/pod/PodColumnAge.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import type { PodInfoUI } from './PodInfoUI';
export let object: PodInfoUI;
</script>

<div class="text-sm text-gray-700">
<div class="text-sm text-[var(--pd-table-body-text-highlight)]">
<StateChange state="{object.status}">{object.age}</StateChange>
</div>
4 changes: 2 additions & 2 deletions packages/renderer/src/lib/pod/PodColumnName.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ test('Expect simple column styling', async () => {
const text = screen.getByText(pod.name);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-sm');
expect(text).toHaveClass('text-gray-300');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');

const id = screen.getByText(pod.shortId);
expect(id).toBeInTheDocument();
expect(id).toHaveClass('text-xs');
expect(id).toHaveClass('text-violet-400');
expect(id).toHaveClass('text-[var(--pd-table-body-text-sub-secondary)]');
});

test('Expect clicking works', async () => {
Expand Down
6 changes: 4 additions & 2 deletions packages/renderer/src/lib/pod/PodColumnName.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function openDetailsPod(pod: PodInfoUI) {
</script>

<button class="hover:cursor-pointer flex flex-col max-w-full" on:click="{() => openDetailsPod(object)}">
<div class="text-sm text-gray-300 max-w-full overflow-hidden text-ellipsis">{object.name}</div>
<div class="text-xs text-violet-400">{object.shortId}</div>
<div class="text-sm text-[var(--pd-table-body-text-highlight)] max-w-full overflow-hidden text-ellipsis">
{object.name}
</div>
<div class="text-xs text-[var(--pd-table-body-text-sub-secondary)]">{object.shortId}</div>
</button>
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test('Expect simple column styling', async () => {
const text = screen.getByText(service.name);
expect(text).toBeInTheDocument();
expect(text).toHaveClass('text-sm');
expect(text).toHaveClass('text-gray-300');
expect(text).toHaveClass('text-[var(--pd-table-body-text-highlight)]');
});

test('Expect clicking works', async () => {
Expand Down
6 changes: 4 additions & 2 deletions packages/renderer/src/lib/service/ServiceColumnName.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ function openDetails() {
</script>

<button class="hover:cursor-pointer flex flex-col max-w-full" on:click="{() => openDetails()}">
<div class="text-sm text-gray-300 max-w-full overflow-hidden text-ellipsis">{object.name}</div>
<div class="text-sm text-[var(--pd-table-body-text-highlight)] max-w-full overflow-hidden text-ellipsis">
{object.name}
</div>
{#if object.loadBalancerIPs}
<div class="text-xs text-violet-400">{object.loadBalancerIPs}</div>
<div class="text-xs text-[var(--pd-table-body-text-sub-secondary)]">{object.loadBalancerIPs}</div>
{/if}
</button>