Skip to content

Commit f0d8fa0

Browse files
mxsocochrisolsen
authored andcommitted
fix(#3637): adjust the checkbox on table header row to prevent height increase
1 parent 2736224 commit f0d8fa0

8 files changed

Lines changed: 120 additions & 5 deletions

File tree

apps/prs/angular/src/app/app.component.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,14 @@
250250
url="/bugs/3685"
251251
></goab-work-side-menu-item>
252252
<goab-work-side-menu-item
253-
label="3635 Input Leading icon color"
254-
url="/bugs/3635"
255-
></goab-work-side-menu-item>
256-
</goab-work-side-menu-group>
253+
label="3635 Input Leading icon color"
254+
url="/bugs/3635"
255+
></goab-work-side-menu-item>
256+
<goab-work-side-menu-item
257+
label="3637 Checkbox Table Header Row Height Bug"
258+
url="/bugs/3637"
259+
></goab-work-side-menu-item>
260+
</goab-work-side-menu-group>
257261
<goab-work-side-menu-group icon="star" heading="Features">
258262
<goab-work-side-menu-item
259263
label="1328"

apps/prs/angular/src/app/app.routes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import { Bug3505Component } from "../routes/bugs/3505/bug3505.component";
5353
import { Bug3614Component } from "../routes/bugs/3614/bug3614.component";
5454
import { Bug3685Component } from "../routes/bugs/3685/bug3685.component";
5555
import { Bug3635Component } from "../routes/bugs/3635/bug3635.component";
56+
import { Bug3637Component } from "../routes/bugs/3637/bug3637.component";
5657

5758
import { Feat1328Component } from "../routes/features/feat1328/feat1328.component";
5859
import { Feat1383Component } from "../routes/features/feat1383/feat1383.component";
@@ -148,6 +149,7 @@ export const appRoutes: Route[] = [
148149
{ path: "bugs/3505", component: Bug3505Component },
149150
{ path: "bugs/3685", component: Bug3685Component },
150151
{ path: "bugs/3635", component: Bug3635Component },
152+
{ path: "bugs/3637", component: Bug3637Component },
151153
// Feature routes
152154
{ path: "features/1328", component: Feat1328Component },
153155
{ path: "features/1383", component: Feat1383Component },
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<div>
2+
<h1>3637 - Checkbox Table Header Row Height Bug </h1>
3+
4+
<goab-data-grid keyboardNav="table" keyboardIconPosition="right">
5+
<goab-table width="100%" mb="xl">
6+
<thead>
7+
<tr>
8+
<th className="goa-table-cell--checkbox"><goab-checkbox name="" text=""></goab-checkbox></th>
9+
<th>
10+
<goab-table-sort-header name="name">Name</goab-table-sort-header>
11+
</th>
12+
<th>
13+
<goab-table-sort-header name="status">Status</goab-table-sort-header>
14+
</th>
15+
<th>Assigned to</th>
16+
<th>
17+
<goab-table-sort-header name="due-date">Due date</goab-table-sort-header>
18+
</th>
19+
<th>
20+
<goab-table-sort-header name="jurisdiction">Jurisdiction</goab-table-sort-header>
21+
</th>
22+
<th>File number</th>
23+
<th>
24+
<goab-table-sort-header name="priority">Priority</goab-table-sort-header>
25+
</th>
26+
<th></th>
27+
</tr>
28+
</thead>
29+
<tbody>
30+
</tbody>
31+
</goab-table>
32+
</goab-data-grid>
33+
</div>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Component } from "@angular/core";
2+
import { CommonModule } from "@angular/common";
3+
import {
4+
GoabDataGrid,
5+
GoabTable,
6+
GoabTableSortHeader,
7+
GoabCheckbox
8+
} from "@abgov/angular-components";
9+
10+
11+
@Component({
12+
standalone: true,
13+
selector: "abgov-bug3637",
14+
templateUrl: "./bug3637.component.html",
15+
imports: [CommonModule,
16+
GoabDataGrid,
17+
GoabTable,
18+
GoabTableSortHeader,
19+
GoabCheckbox
20+
],
21+
})
22+
export class Bug3637Component {}

apps/prs/react/src/app/app.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ export function App() {
241241
label="3635 Input Leading icon color"
242242
url="/bugs/3635"
243243
/>
244+
<GoabWorkSideMenuItem
245+
label="3637 Checkbox Table Header Row Height Bug"
246+
url="/bugs/3637"
247+
/>
244248
</GoabWorkSideMenuGroup>
245249

246250
<GoabWorkSideMenuGroup icon="star" heading="Features">

apps/prs/react/src/main.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import { Bug3505Route } from "./routes/bugs/bug3505";
5555
import { Bug3614Route } from "./routes/bugs/bug3614";
5656
import { Bug3685Route } from "./routes/bugs/bug3685";
5757
import { Bug3635Route } from "./routes/bugs/bug3635";
58+
import { Bug3637Route } from "./routes/bugs/bug3637";
5859

5960
import { EverythingRoute } from "./routes/everything";
6061
import { EverythingBRoute } from "./routes/everything-b";
@@ -157,6 +158,7 @@ root.render(
157158
<Route path="bugs/3614" element={<Bug3614Route />} />
158159
<Route path="bugs/3685" element={<Bug3685Route />} />
159160
<Route path="bugs/3635" element={<Bug3635Route />} />
161+
<Route path="bugs/3637" element={<Bug3637Route />} />
160162

161163
<Route path="features/1383" element={<Feat1383Route />} />
162164
<Route path="features/1547" element={<Feat1547Route />} />
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import {
2+
GoabDataGrid,
3+
GoabTable,
4+
GoabTableSortHeader,
5+
GoabCheckbox
6+
} from "@abgov/react-components";
7+
8+
export function Bug3637Route() {
9+
10+
return (
11+
<div>
12+
<h1>3637 - Checkbox Table Header Row Height Bug </h1>
13+
<div className="table-wrapper">
14+
<GoabDataGrid keyboardNav="table" keyboardIconPosition="right">
15+
<GoabTable width="100%">
16+
<thead>
17+
<tr>
18+
<th className="goa-table-cell--checkbox"><GoabCheckbox name="" text=""></GoabCheckbox></th>
19+
<th>
20+
<GoabTableSortHeader name="name">Name</GoabTableSortHeader>
21+
</th>
22+
<th>
23+
<GoabTableSortHeader name="status">Status</GoabTableSortHeader>
24+
</th>
25+
<th>Assigned to</th>
26+
<th>
27+
<GoabTableSortHeader name="due-date">Due date</GoabTableSortHeader>
28+
</th>
29+
<th>
30+
<GoabTableSortHeader name="jurisdiction">Jurisdiction</GoabTableSortHeader>
31+
</th>
32+
<th>File number</th>
33+
<th>
34+
<GoabTableSortHeader name="priority">Priority</GoabTableSortHeader>
35+
</th>
36+
<th></th>
37+
</tr>
38+
</thead>
39+
<tbody>
40+
</tbody>
41+
</GoabTable>
42+
</GoabDataGrid>
43+
</div>
44+
</div>
45+
);
46+
}

libs/web-components/src/assets/css/components.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,12 @@ goa-table td.goa-table-cell--text {
151151
padding-bottom: var(--goa-table-padding-cell-text, var(--goa-space-s)) !important;
152152
}
153153

154-
goa-table td.goa-table-cell--checkbox {
154+
goa-table td.goa-table-cell--checkbox,
155+
goa-table th.goa-table-cell--checkbox {
155156
padding-top: var(--goa-table-padding-cell-checkbox, 2px) !important;
156157
padding-bottom: var(--goa-table-padding-cell-checkbox, 2px) !important;
157158
text-align: center;
159+
vertical-align: middle;
158160
}
159161

160162
goa-table td.goa-table-cell--form-field {

0 commit comments

Comments
 (0)