patternfly / patternfly/react-component-groups
MissingPage: support multiple action buttons
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 10
- フォーク
- 40
- 平均マージ
- 3日 22時間
- マージ済み PR(30日)
- 4
説明
Description
MissingPage currently supports only a single link/action via the toHomePageUrl prop (rendered as a "Go to home page" link). A common 404 page pattern includes multiple actions — typically both "Go Home" and "Go Back" buttons.
Use Case
In ansible/ansible-ui, our custom PageNotFound component renders two action buttons:
-
"Go to Dashboard" (navigate to home)
-
"Return to previous page" (browser back)
We cannot adopt MissingPage because it only renders one action.
Proposed Solution
Add support for custom footer actions, either via:
-
A
customFooteroractionsprop that acceptsReactNode(most flexible) -
An
additionalActionsarray prop alongside the existingtoHomePageUrl
This would align with how other component-groups components like ErrorState support customFooter.
Current Workaround
We maintain a custom PageNotFound component that duplicates MissingPage's layout but adds a second button.
Jira Issue: PF-4547
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず MissingPage コンポーネントを読み、すでに customFooter をサポートしている ErrorState とその footer API を比較します。既存の toHomePageUrl アクションがどのようにレンダリングされるかを確認し、現在の動作を維持したまま複数のカスタムアクションをレンダリングできるサポートされた方法を追加します。MissingPage のレイアウトを複製せずに、利用側がホームアクションと戻るアクションの両方を指定できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100