OCPBUGS-87969: Directly use RhUi icons where possible#16591
Conversation
Currently the “legacy” icon names like ExclamationTriangleIcon will render both a font awesome and red hat icon into the DOM. This inflates bundle size, to have more control over what icon is used, the RhUi equivalent should be used where possible. This commit simply replaces existing PatternFly icons with their direct RhUi counterpart, as written in PatternFly.
e.g., RhStandard should be used in empty states which sensible. filled icons should be used where they look better also remove a pf-icons mock that isn't needed anymore
for some reason the monaco chunk grew a couple kb due to this. entrypoint limit can be shrunk a little more now
|
@logonoff: This pull request references Jira Issue OCPBUGS-87969, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (176)
💤 Files with no reviewable changes (1)
WalkthroughThis PR replaces many PatternFly icons with RhUi and RhStandard variants across frontend components, shared utilities, and package-specific UI. It also updates ESLint import restrictions, test lint exceptions, and one webpack performance budget. ChangesRH UI icon migration
Sequence Diagram(s)Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
|
|
@logonoff: This pull request references Jira Issue OCPBUGS-87969, which is valid. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
icon replacements tested locally /verified by @logonoff |
|
@logonoff: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@logonoff: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
| import { basename, join, resolve } from 'path'; | ||
| // Explicitly used this icon because nobody is going to use this | ||
| // eslint-disable-next-line no-restricted-imports | ||
| import { WizardsOfTheCoastIcon } from '@patternfly/react-icons'; |
There was a problem hiding this comment.
lol, why do we even have this icon in PF?
There was a problem hiding this comment.
What if someone wants to make a WizardsOfTheCoast console plugin?????
| 'Create an Event source to register interest in a class of events from a particular system', | ||
| groupId: 'developer-catalog', | ||
| href: '/catalog/ns/:namespace?catalogType=EventSource', | ||
| icon: <SignOutAltIcon />, |
There was a problem hiding this comment.
Is it intentional that we replaced this icon with something different?
There was a problem hiding this comment.
Yes, it's just test data - no reason to have it be this icon specifically
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: logonoff, TheRealJon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@logonoff: Jira Issue Verification Checks: Jira Issue OCPBUGS-87969 Jira Issue OCPBUGS-87969 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Analysis / Root cause:
Currently the “legacy” icon names like ExclamationTriangleIcon will render both a font awesome and red hat icon into the DOM. This inflates bundle size, to have more control over what icon is used, the RhUi equivalent should be used where possible.
Solution description:
This PR replaces existing PatternFly icons with a Rh counterpart
Summary by CodeRabbit