Skip to content

Commit dfc7bee

Browse files
committed
fix(BulkSelect): more compact layout to match design
1 parent 459c09e commit dfc7bee

File tree

3 files changed

+33
-19
lines changed

3 files changed

+33
-19
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,6 @@
8686
"@patternfly/react-drag-drop": "^6.0.0",
8787
"@patternfly/react-tokens": "^6.0.0",
8888
"sharp": "^0.34.0"
89-
}
89+
},
90+
"packageManager": "[email protected]+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f"
9091
}

packages/module/src/BulkSelect/BulkSelect.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,13 @@ export const BulkSelect: FC<BulkSelectProps> = ({
122122
}
123123
onChange={(checked) => onSelect?.(!checked || checked === null ? noneOption : allOption)}
124124
{...menuToggleCheckboxProps}
125-
/>,
126-
selectedCount > 0 ? (
127-
<span onClick={onToggleClick} data-ouia-component-id={`${ouiaId}-text`} key="bulk-select-text">
128-
{`${selectedCount} selected`}
129-
</span>
130-
) : null
125+
>
126+
{selectedCount > 0 ? (
127+
<span data-ouia-component-id={`${ouiaId}-text`}>
128+
{`${selectedCount} selected`}
129+
</span>
130+
) : null}
131+
</MenuToggleCheckbox>
131132
]}
132133
/>
133134
)}

packages/module/src/BulkSelect/__snapshots__/BulkSelect.test.tsx.snap

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exports[`BulkSelect component should render 1`] = `
99
class="pf-v6-c-menu-toggle pf-m-split-button"
1010
>
1111
<label
12-
class="pf-v6-c-check pf-m-standalone"
12+
class="pf-v6-c-check"
1313
>
1414
<input
1515
aria-invalid="false"
@@ -21,12 +21,18 @@ exports[`BulkSelect component should render 1`] = `
2121
name="BulkSelect-checkbox"
2222
type="checkbox"
2323
/>
24+
<span
25+
aria-hidden="true"
26+
class="pf-v6-c-check__label"
27+
id="BulkSelect-checkbox"
28+
>
29+
<span
30+
data-ouia-component-id="BulkSelect-text"
31+
>
32+
2 selected
33+
</span>
34+
</span>
2435
</label>
25-
<span
26-
data-ouia-component-id="BulkSelect-text"
27-
>
28-
2 selected
29-
</span>
3036
<button
3137
aria-expanded="false"
3238
aria-label="Bulk select toggle"
@@ -66,7 +72,7 @@ exports[`BulkSelect component should render 1`] = `
6672
class="pf-v6-c-menu-toggle pf-m-split-button"
6773
>
6874
<label
69-
class="pf-v6-c-check pf-m-standalone"
75+
class="pf-v6-c-check"
7076
>
7177
<input
7278
aria-invalid="false"
@@ -78,12 +84,18 @@ exports[`BulkSelect component should render 1`] = `
7884
name="BulkSelect-checkbox"
7985
type="checkbox"
8086
/>
87+
<span
88+
aria-hidden="true"
89+
class="pf-v6-c-check__label"
90+
id="BulkSelect-checkbox"
91+
>
92+
<span
93+
data-ouia-component-id="BulkSelect-text"
94+
>
95+
2 selected
96+
</span>
97+
</span>
8198
</label>
82-
<span
83-
data-ouia-component-id="BulkSelect-text"
84-
>
85-
2 selected
86-
</span>
8799
<button
88100
aria-expanded="false"
89101
aria-label="Bulk select toggle"

0 commit comments

Comments
 (0)