Skip to content

Commit 1327f98

Browse files
dlabajmcokerrebeccaalpertthatblindgeye
authored
chore(6.6.x): cherry-pick 6.6 patch checklist items (#12603)
* chore: fix hero props table (#12562) * fix: update tree pattern expand icon direction (#12554) * fix(tree-view): update expand icon direction * fix: update dls tree and tree table icons, too * chore: bump to latest core * chore: fix yarn.lock * chore(deps): Bump docs framework (#12583) Andrew reports that the wrong Felt class is being added to the html tag. I bumped the docs framework to one that has the correct class. * fix(Popover): fixed focus trapped on hoverable trigger (#12591) * fix(Popover): fixed focus trapped on hoverable trigger * Added deprecation to hoverable --------- Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> Co-authored-by: Rebecca Alpert <ralpert@redhat.com> Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com>
1 parent 1b31fca commit 1327f98

9 files changed

Lines changed: 29 additions & 23 deletions

File tree

packages/react-core/src/components/DualListSelector/DualListSelectorTreeItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styles from '@patternfly/react-styles/css/components/DualListSelector/dua
33
import { css } from '@patternfly/react-styles';
44
import { DualListSelectorTreeItemData } from './DualListSelectorTree';
55
import { Badge } from '../Badge';
6-
import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
6+
import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
77
import { flattenTree } from './treeUtils';
88
import { DualListSelectorListContext } from './DualListSelectorContext';
99
import { useHasAnimations } from '../../helpers';
@@ -136,7 +136,7 @@ const DualListSelectorTreeItemBase: React.FunctionComponent<DualListSelectorTree
136136
tabIndex={-1}
137137
>
138138
<span className={css(styles.dualListSelectorItemToggleIcon)}>
139-
<RhMicronsCaretDownIcon />
139+
<RhMicronsCaretRightIcon />
140140
</span>
141141
</div>
142142
)}

packages/react-core/src/components/Hero/Hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const Hero: React.FunctionComponent<HeroProps> = ({
5353
bodyWidth,
5454
bodyMaxWidth,
5555
...props
56-
}) => {
56+
}: HeroProps) => {
5757
const customStyles: { [key: string]: string } = {};
5858
if (backgroundSrcLight) {
5959
customStyles[heroBackgroundImageLight.name] = `url(${backgroundSrcLight})`;

packages/react-core/src/components/Popover/Popover.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,11 @@ export interface PopoverProps {
205205
shouldOpen?: (event: MouseEvent | KeyboardEvent, showFunction?: () => void) => void;
206206
/** Flag indicating whether the close button should be shown. */
207207
showClose?: boolean;
208-
/** Sets an interaction to open popover, defaults to "click" */
208+
/** @deprecated Sets an interaction to open popover, defaults to "click" */
209209
triggerAction?: 'click' | 'hover';
210-
/** Whether to trap focus in the popover. */
210+
/** Whether to trap focus in the popover. When using a triggerAction of "hover", this will be set to false
211+
* by default and must remain false.
212+
*/
211213
withFocusTrap?: boolean;
212214
/** The z-index of the popover. */
213215
zIndex?: number;
@@ -267,7 +269,7 @@ export const Popover: React.FunctionComponent<PopoverProps> = ({
267269
],
268270
animationDuration = 300,
269271
id,
270-
withFocusTrap: propWithFocusTrap,
272+
withFocusTrap: propWithFocusTrap = triggerAction === 'hover' ? false : undefined,
271273
triggerRef,
272274
hasNoPadding = false,
273275
hasAutoWidth = false,

packages/react-core/src/components/Popover/examples/Popover.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ By default, the `appendTo` prop of the popover will append to the document body
2525

2626
### Hoverable
2727

28-
```ts file="./PopoverHover.tsx"
28+
Pass the `triggerAction="hover"` property to make a `<Popover>` that is triggered via hover and focus rather than on click. When using a hoverable Popover, you **must not** include any interactive or semantic content (e.g. buttons, links, headings, lists, etc), as focus is not intended to enter a hoverable `<Popover>`. Including such content may cause an inaccessible UI for users who are not able to reach the content when navigating via assistive tech.
29+
30+
It is instead recommended to use our [tooltip component](/components/tooltip).
31+
32+
```ts isDeprecated file="./PopoverHover.tsx"
2933

3034
```
3135

packages/react-core/src/components/TreeView/TreeViewListItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { memo, useState, useEffect, Children, isValidElement, cloneElement } from 'react';
22
import { css } from '@patternfly/react-styles';
33
import styles from '@patternfly/react-styles/css/components/TreeView/tree-view';
4-
import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
4+
import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
55
import { TreeViewDataItem } from './TreeView';
66
import { Badge } from '../Badge';
77
import { useSSRSafeId } from '../../helpers';
@@ -155,7 +155,7 @@ const TreeViewListItemBase: React.FunctionComponent<TreeViewListItemProps> = ({
155155
tabIndex={-1}
156156
>
157157
<span className={css(styles.treeViewNodeToggleIcon)}>
158-
<RhMicronsCaretDownIcon />
158+
<RhMicronsCaretRightIcon />
159159
</span>
160160
</ToggleComponent>
161161
);

packages/react-core/src/components/TreeView/__tests__/__snapshots__/TreeViewListItem.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ exports[`Matches snapshot with children 1`] = `
3636
width="1em"
3737
>
3838
<path
39-
d="M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z"
39+
d="M14.35 8.94 6.71 1.29l-.02-.02c-.4-.38-1.03-.37-1.41.02-.38.4-.37 1.03.02 1.41l7.29 7.29-7.29 7.29a1.003 1.003 0 0 0 1.42 1.42l7.65-7.65c.59-.59.59-1.54 0-2.12Z"
4040
/>
4141
</svg>
4242
</span>

packages/react-docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"victory": "^37.3.6"
3838
},
3939
"devDependencies": {
40-
"@patternfly/documentation-framework": "^6.36.8",
40+
"@patternfly/documentation-framework": "^6.40.0",
4141
"@patternfly/patternfly-a11y": "5.1.0"
4242
},
4343
"keywords": [

packages/react-table/src/components/Table/utils/decorators/treeRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import styles from '@patternfly/react-styles/css/components/Table/table';
44
import stylesTreeView from '@patternfly/react-styles/css/components/Table/table-tree-view';
55
import { Button } from '@patternfly/react-core/dist/esm/components/Button';
66
import { Checkbox } from '@patternfly/react-core/dist/esm/components/Checkbox';
7-
import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
7+
import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
88
import RhUiEllipsisHorizontalFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-horizontal-fill-icon';
99

1010
export const treeRow =
@@ -54,7 +54,7 @@ export const treeRow =
5454
aria-label={toggleAriaLabel || `${isExpanded ? 'Collapse' : 'Expand'} row ${rowIndex}`}
5555
icon={
5656
<div className={css(stylesTreeView.tableToggleIcon)}>
57-
<RhMicronsCaretDownIcon />
57+
<RhMicronsCaretRightIcon />
5858
</div>
5959
}
6060
/>

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4963,9 +4963,9 @@ __metadata:
49634963
languageName: node
49644964
linkType: hard
49654965

4966-
"@patternfly/documentation-framework@npm:^6.36.8":
4967-
version: 6.36.8
4968-
resolution: "@patternfly/documentation-framework@npm:6.36.8"
4966+
"@patternfly/documentation-framework@npm:^6.40.0":
4967+
version: 6.49.2
4968+
resolution: "@patternfly/documentation-framework@npm:6.49.2"
49694969
dependencies:
49704970
"@babel/core": "npm:^7.29.0"
49714971
"@babel/preset-env": "npm:7.29.0"
@@ -5026,16 +5026,16 @@ __metadata:
50265026
webpack-dev-server: "npm:5.2.3"
50275027
webpack-merge: "npm:5.10.0"
50285028
peerDependencies:
5029-
"@patternfly/patternfly": ^6.5.0-prerelease.46
5030-
"@patternfly/react-code-editor": ^6.5.0-prerelease.39
5031-
"@patternfly/react-core": ^6.5.0-prerelease.36
5032-
"@patternfly/react-icons": ^6.5.0-prerelease.15
5033-
"@patternfly/react-table": ^6.5.0-prerelease.37
5029+
"@patternfly/patternfly": ^6.6.0
5030+
"@patternfly/react-code-editor": ^6.6.0
5031+
"@patternfly/react-core": ^6.6.0
5032+
"@patternfly/react-icons": ^6.6.0
5033+
"@patternfly/react-table": ^6.6.0
50345034
react: ^17.0.0 || ^18.0.0
50355035
react-dom: ^17.0.0 || ^18.0.0
50365036
bin:
50375037
pf-docs-framework: scripts/cli/cli.js
5038-
checksum: 10c0/bf29256be06e32e130d6146a8d5cc9744e0b88463b69f9c2ef6bae98f0ffee15901760fb69c3737d7fdcf2d612511d034c7661568c92187ead143fe772f8d561
5038+
checksum: 10c0/1d80d9d6078237d17b71deeb4ffa4b7ad6ed43c0d424c6044de4420d5ef8267eb913e281fc97ffa9fe6d6e70b0462557c22fdf50ecca9df555163eb48ab40ff5
50395039
languageName: node
50405040
linkType: hard
50415041

@@ -5191,7 +5191,7 @@ __metadata:
51915191
version: 0.0.0-use.local
51925192
resolution: "@patternfly/react-docs@workspace:packages/react-docs"
51935193
dependencies:
5194-
"@patternfly/documentation-framework": "npm:^6.36.8"
5194+
"@patternfly/documentation-framework": "npm:^6.40.0"
51955195
"@patternfly/patternfly": "npm:^6.6.0"
51965196
"@patternfly/patternfly-a11y": "npm:5.1.0"
51975197
"@patternfly/react-charts": "workspace:^"

0 commit comments

Comments
 (0)