[fix] Remove unreachable error-modal scaffolding from YAML-only policy pages#448
[fix] Remove unreachable error-modal scaffolding from YAML-only policy pages#448WasThatRudy wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (4)
📝 WalkthroughWalkthroughFour policy creation page components (AuthPolicy, PlanPolicy, RateLimitPolicy, TokenRateLimitPolicy) have PatternFly-based error modal state, imports, and JSX removed. Each component now renders only a Helmet page title and a ResourceYAMLEditor. ChangesError Modal UI Removal
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
LGTM you just need to rebase before it can merge |
…y pages The 5 YAML-only policy create pages (Auth, RateLimit, TokenRateLimit, OIDC, Plan) each declared an error-modal block that could never render: setIsErrorModalOpen was never called with true, and errorModalMsg had no setter destructured. Remove the dead block plus the @patternfly/react-core imports it kept alive (Button, ButtonVariant, Modal, ModalVariant, ModalBody, ModalFooter). No behaviour change - these pages currently render only ResourceYAMLEditor, which has its own internal save/error handling. Refs Kuadrant#445 Signed-off-by: WasThatRudy <rudraksharss@gmail.com>
2bc81f3 to
fa19559
Compare
I have rebased the PR :) |
|
lgtm you just have one test failing |
Summary
<Modal>blocks from the 5 YAML-only policy create pages (Auth, RateLimit, TokenRateLimit, OIDC, Plan)useStatedeclarations forisErrorModalOpen/errorModalMsg(the latter had no setter destructured, the former was never set totrue, so the modal could never render)@patternfly/react-coreimports the dead block was keeping alive (Button,ButtonVariant,Modal,ModalVariant,ModalBody,ModalFooter)131 lines deleted, 0 added. No behaviour change — these pages currently render only
<ResourceYAMLEditor>, which has its own save/error handling.These pages are slated to be rewritten with real Form + YAML views under #378 (the LFX mentorship epic). This cleanup just removes scaffolding that has no render path today.
Refs #445.
Test plan
yarn lintclean/k8s/ns/:ns/<policy>/~newstill renders the YAML editor for AuthPolicy, RateLimitPolicy, TokenRateLimitPolicy, OIDCPolicy, PlanPolicy — leaving for reviewer / will follow up once I have a console environment upSummary by CodeRabbit