-
Story
-
Resolution: Done
-
Normal
-
None
-
Incidents & Support
-
8
-
False
-
-
False
-
None
-
Unset
-
None
-
-
-
-
HCC Framework Sprint 53, HCC Framework Sprint 54
Background
The tower-analytics-frontend application currently uses PatternFly 5 (PF5) components that were completely removed in PatternFly 6. While the initial PF6 dependency upgrade has been completed (packages upgraded to v6.4.0, codemods applied, CSS classes/tokens updated), several core components are running on temporary placeholder shims that provide limited functionality. All work in this epic needs to be based off this branch https://github.com/prat98/tower-analytics-frontend/tree/AAP-64250-pf6-migration-groundwork which lays the groundwork for development
Current State:
- Application runs but uses pf5Shim.tsx for Select and Dropdown components (basic HTML placeholders lacking accessibility, keyboard navigation, and full styling)
- Notifications use notificationsShim.ts that logs warnings but doesn't display notifications to users
- ~31 files have @ts-nocheck TypeScript directives as temporary workarounds
Value Proposition:
- Restore full component functionality (filtering, typeahead, keyboard navigation, accessibility)
- Enable proper user notifications for API errors and success messages
- Maintain alignment with Red Hat's design system and accessibility standards
- Reduce technical debt and enable future PatternFly upgrades
- Remove temporary workarounds that mask potential issues
Repository and Scope
Repository: https://github.com/prat98/tower-analytics-frontend/tree/AAP-64250-pf6-migration-groundwork
The team will perform the following work:
- Update the application to PatternFly 6 - Migrate all PF5 components to their PF6 equivalents
- Implement common build pattern - Use git submodule to https://github.com/RedHatInsights/insights-frontend-builder-common
- Onboard to frontend operator - Complete the onboarding process for the frontend operator
User Stories
_ As a crc tower {_}analytics user{*}, I want dropdown menus and select inputs to work with keyboard navigation so that I can efficiently navigate the UI without a mouse.
_ As a crc tower analytics {_}user{*}, I want to receive notifications when actions succeed or fail so that I understand the result of my interactions.
_ As a {_}developer{*}, I want the codebase to use supported PatternFly 6 components so that I can confidently build new features without compatibility concerns.Supporting Documentation
- PatternFly 6 Select Migration Guide
- PatternFly 6 Dropdown Migration Guide
- PatternFly 6 Upgrade Guide
- Frontend Components Notifications
- Frontend Builder Common
Files Reference:
- Current PF5 Shim: src/pf5Shim.tsx
- Current Notifications Shim: src/notificationsShim.ts
Definition of Done
- All PF5 shim imports have been replaced with native PF6 component implementations
- All temporary shim files (pf5Shim.tsx, notificationsShim.ts) have been deleted
- All @ts-nocheck directives have been removed
- Application builds successfully (npm run build)
- Linting passes (npm run lint)
- All existing Cypress tests pass
- Manual smoke testing confirms no regressions in affected components
- Common build pattern using git submodule to insights-frontend-builder-common is implemented
- Application is successfully onboarded to frontend operator
- Code has been reviewed and approved
- Changes have been merged to main branch
Acceptance Criteria
Requirements
- All Select components use PF6 composable Select API (Select, SelectOption, SelectList, MenuToggle)
- All Dropdown components use PF6 composable Dropdown API (Dropdown, DropdownList, DropdownItem, MenuToggle)
- Notifications API uses the new store-based API from @redhat-cloud-services/frontend-components-notifications v6
- Single-select, multi-select, and typeahead Select variants function correctly
- Kebab menus render correctly with MenuToggle variant="plain"
- Dropdown action items, separators, and disabled states work as expected
- API error notifications display to users
- Success/info notifications display to users
- No imports reference deleted shim files
- No @ts-nocheck TypeScript directives remain in the codebase
- Git submodule to insights-frontend-builder-common is properly configured
- Application is successfully deployed through frontend operator
End to End Test
Test: Verify Select Component Migration
- Navigate to a Reports page with filters
- Click on a filter dropdown (e.g., status, cluster, organization)
- Use keyboard arrow keys to navigate between options
- Press Enter to select an option
- Verify the selection is applied and the page filters correctly
If the previous steps are possible, then the test succeeds. Otherwise, the test fails.
Test: Verify Dropdown Component Migration
- Navigate to the Savings Planner list view
- Locate a plan item with a kebab (⋮) actions menu
- Click the kebab menu
- Verify dropdown appears with action items (Edit, Delete, etc.)
- Click an action item
- Verify the action executes correctly
If the previous steps are possible, then the test succeeds. Otherwise, the test fails.
Test: Verify Notifications Migration
- Navigate to the Automation Calculator page
- Perform an action that triggers a notification (e.g., save calculation, API error)
- Verify notification toast appears in the notification drawer
- Verify notification can be dismissed
If the previous steps are possible, then the test succeeds. Otherwise, the test fails.
Original ticket: AAP-64407