[WIP] Fixes #37752 - Update to Patternfly 5 #11120
Draft
+1,766
−949
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updating pf4 to pf5
some work is done by running
npx @patternfly/pf-codemods@latest webpack --fix
search& replace "pf-c-" to "pf-v5-c-"
Check all "onChange={[^(]" to make sure that pure pf5 are using the right arguments, as they changed order, and most onChange are onChange(event,value) and not onChange(value)
And adding act wrapper around tests.
To test this pr you will need the foreman core pf5 pr, foreman js pr, link foreman-js, and to remove any foreman-js/patternfly folder in the katello node_modules (as this breaks React shared context in tests).
This is a WIP since the other prs were just done and not polished, and also because some of the tests I had troubles fixing and dont have capacity currently to fix. These tests fail with
Error: Uncaught [Error: Warning: An update to %s inside a test was not wrapped in act(...)
even if every line in the test is wrapped in act, or