Skip to content

Commit ee41527

Browse files
authored
Table component padding updates (#2482)
* Update padding on Table component to be consistent with PaginatedTable * Update padding in event table * Fix headers in Namespace detail tables
1 parent fdec09e commit ee41527

File tree

5 files changed

+22
-19
lines changed

5 files changed

+22
-19
lines changed

src/lib/components/event/event-details-full.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</script>
1919

2020
{#if showEventGroup}
21-
<div class="w-full p-2">
21+
<div class="w-full">
2222
<div
2323
class="flex flex-col gap-0 overflow-hidden border border-subtle xl:flex-row"
2424
>
@@ -75,7 +75,7 @@
7575
{:else if event}
7676
{@const attributes = formatAttributes(event)}
7777
{@const details = Object.entries(attributes)}
78-
<div class="w-full p-2">
78+
<div class="w-full">
7979
<div class="w-full overflow-hidden border border-subtle">
8080
<EventLinksExpanded links={event?.links} />
8181
{#each details as [key, value] (key)}

src/lib/components/event/event-summary-row.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235

236236
<style lang="postcss">
237237
.row {
238-
@apply flex select-none items-center gap-4 px-1 text-sm no-underline;
238+
@apply flex select-none items-center gap-4 px-2 text-sm no-underline;
239239
}
240240
241241
.failure {

src/lib/holocene/table/paginated-table/index.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@
7373
}
7474
7575
:global(tr > th) {
76-
@apply whitespace-nowrap px-2 text-left font-medium;
76+
@apply whitespace-nowrap p-2 text-left font-medium;
7777
}
7878
}
7979
8080
.paginated-table-body {
8181
:global(tr.primary) {
82-
@apply h-12 border-b border-table last-of-type:border-0 hover:bg-interactive-table-hover hover:bg-fixed;
82+
@apply border-b border-table last-of-type:border-0 hover:bg-interactive-table-hover hover:bg-fixed;
8383
}
8484
8585
:global(tr.dense) {
@@ -103,7 +103,7 @@
103103
}
104104
105105
:global(tr > td) {
106-
@apply whitespace-nowrap px-2;
106+
@apply whitespace-nowrap p-2;
107107
}
108108
109109
:global(tr > td > .table-link) {

src/lib/holocene/table/table.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
@apply surface-table;
5252
5353
:global(th) {
54-
@apply border-t border-table px-1 py-2 text-off-white;
54+
@apply border-t border-table p-2 text-off-white;
5555
}
5656
5757
:global(td) {
58-
@apply border-t border-table px-1 py-2;
58+
@apply border-t border-table p-2;
5959
6060
&:first-child {
6161
@apply border-l border-table;
@@ -69,7 +69,7 @@
6969
7070
tbody :global {
7171
td {
72-
@apply border-t border-table px-1 py-2 text-sm;
72+
@apply border-t border-table p-2 text-sm;
7373
7474
&:first-child:is(.expanded-cell) {
7575
@apply px-0;
@@ -81,11 +81,11 @@
8181
table.simple {
8282
thead :global(td),
8383
thead :global(th) {
84-
@apply border-b border-primary py-2;
84+
@apply border-b border-primary p-2;
8585
}
8686
8787
tbody :global(td) {
88-
@apply border-b py-2;
88+
@apply border-b p-2;
8989
}
9090
9191
&:last-child {

src/routes/(app)/namespaces/[namespace]/+page.svelte

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,16 @@
6868
</h2>
6969
<Card class="flex flex-col gap-4 lg:flex-row">
7070
<article class="namespace-info flex w-full flex-col">
71-
<h3>{translate('common.details')}</h3>
7271
<Table variant="simple">
7372
<caption class="sr-only" slot="caption"
7473
>{`${translate('namespaces.namespace')} ${translate(
7574
'common.details',
7675
)}`}</caption
7776
>
7877
<tr slot="headers">
79-
<th class="w-1/2 lg:w-3/5" /><th />
78+
<th colspan="2">
79+
<h3>{translate('common.details')}</h3>
80+
</th>
8081
</tr>
8182
<tr data-testid="namespace-owner">
8283
<td>{translate('namespaces.owner')}</td>
@@ -144,13 +145,14 @@
144145
</article>
145146

146147
<article class="namespace-info flex w-full flex-col">
147-
<h3>{translate('namespaces.versions')}</h3>
148148
<Table variant="simple">
149149
<caption class="sr-only" slot="caption"
150150
>{translate('namespaces.versions')}</caption
151151
>
152152
<tr slot="headers">
153-
<th class="w-1/2 lg:w-3/4" /><th />
153+
<th colspan="2">
154+
<h3>{translate('namespaces.versions')}</h3>
155+
</th>
154156
</tr>
155157

156158
<tr data-testid="server-version">
@@ -165,16 +167,17 @@
165167
</article>
166168

167169
<article class="namespace-info flex w-full flex-col">
168-
<h3>
169-
{translate('namespaces.client-actions')}
170-
</h3>
171170
<Table variant="simple">
172171
<caption class="sr-only" slot="caption"
173172
>{translate('namespaces.client-actions')}</caption
174173
>
175174

176175
<tr slot="headers">
177-
<th class="w-1/2 lg:w-3/5" /><th />
176+
<th colspan="2">
177+
<h3>
178+
{translate('namespaces.client-actions')}
179+
</h3>
180+
</th>
178181
</tr>
179182

180183
<tr>

0 commit comments

Comments
 (0)