fix(table): CollapseColumn uses wrong caret icon for expandable row toggle

未關閉 適合新手
#12,727 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@redhat-chai-bot 已經在處理了。

開始於 2026年11月21日。

  • #12728 來自 @redhat-chai-bot —— 未關閉

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
85/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
react, typescript
領域
frontend

研究方向

切換按鈕在 packages/react-table/src/components/Table/CollapseColumn.tsx 中渲染,其中匯入並使用了 RhMicronsCaretDownIcon;將其與 treeRow.tsx 中的 tree-view 變體進行比較,後者已經使用了 RhMicronsCaretRightIcon。交換 import 和 JSX 元素,然後檢查 Storybook 中的 Table 範例,確認摺疊時的 caret 指向右側,並在展開時旋轉為指向下方。完成意味著表格的 toggle 與 tree-view 的 caret 行為一致。

由索引模型根據 Issue 內容生成。

描述

Bug description

CollapseColumn.tsx uses RhMicronsCaretDownIcon for the standard expandable row toggle, resulting in a confusing down→up caret pattern when combined with the -180deg CSS rotation in the PatternFly core CSS package.

This is the same issue that was fixed for the tree-view variant in treeRow.tsx, which correctly uses RhMicronsCaretRightIcon.

Current behavior

In packages/react-table/src/components/Table/CollapseColumn.tsx:

import RhMicronsCaretDownIcon from
  'patternfly-react-icons/dist/esm/icons/rh-microns-caret-down-icon';
// ...
<RhMicronsCaretDownIcon />  // wrong icon

Result:

  • Collapsed: ▼ (caret-down at 0°)
  • Expanded: ▲ (caret-down rotated -180°)

Expected behavior

Should match the tree-view pattern in treeRow.tsx:

import RhMicronsCaretRightIcon from
  'patternfly-react-icons/dist/esm/icons/rh-microns-caret-right-icon';
// ...
<RhMicronsCaretRightIcon />  // correct icon

Result:

  • Collapsed: ► (caret-right at 0°)
  • Expanded: ▼ (caret-right rotated 90°)

Suggested fix

In CollapseColumn.tsx, change RhMicronsCaretDownIcon to RhMicronsCaretRightIcon.

The companion CSS fix is tracked in patternfly/patternfly#8712.

Related

  • patternfly/patternfly#8712 — CSS side of this fix (table.scss -180deg rotation)
  • patternfly/patternfly#8501 — tree-view table toggle icon direction (fixed)
  • patternfly/patternfly#8502 — CSS fix for tree-view + DualListSelector
  • patternfly/patternfly#8490 — original tree-view caret revert

AI-generated. Review for accuracy.

@rh-gvincent requested from Slack

Chai persona: Konflux Help

主要語言
TypeScript
星號
859
分支
395
平均合併
3 天 13 小時
30 天內合併 PR
15

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

patternfly/patternfly-react 的其他 Issue

查看 patternfly/patternfly-react 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。