| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3476.surge.sh |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #3476 +/- ##
======================================
Coverage 67.1% 67.1%
======================================
Files 903 903
Lines 25483 25483
Branches 2254 2254
======================================
Hits 17100 17100
Misses 7342 7342
Partials 1041 1041
Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Looking good! Just bear in mind that you have to actually open the babel.config.js file in patternfly-4 folder, otherwise you won't see the full changes. Don't know why GitHub shows only part of it...
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
I'm working on an implementation to change all the instances of import { SomeIcon } from '@patternfly/react-icons'; to import SomeIcon from '@patternfly/react-icons/dist/js/SomeIcon; in all patternfly-4/*.{tsx,js} files. There's 60 occurrences which isn't too bad. Once I have the PR ready I'll link it here and you can let me know if it works.
Sorry, something went wrong.
| "@babel/proposal-class-properties", | ||
| "@babel/proposal-object-rest-spread", | ||
| ] | ||
| } |
There was a problem hiding this comment.
Why couldn't you have just renamed this to babel.config.js and added your plugin here? That would apply it to all the pf4 builds. I worked hard to unify our babel config and get away from BABEL_ENV=cjs or whatnot so that Windows works without having to use yet another tool called cross-env.
Soon I'm planning on removing babel in pf4 in favor of tsc, which we're already using for typechecking, so I'm also not really a fan of adding this plugin to begin with. Could we just change all the instances of import { SomeIcon } from '@patternfly/react-icons'; to import { SomeIcon } from '@patternfly/react-icons/dist/js/SomeIcon in all patternfly-4/*.{tsx,js} files? There's only about 50 or so. We could easily add a linting step that gets upset if we try to use ESM imports like import { SomeIcon } from '@patternfly/react-icons';.
Sorry, something went wrong.
There was a problem hiding this comment.
If you are planing the direct imports that would be perfect and we can close this. I would prefer that anyway so you don't have to rely on some plugin.
I did not want to do any changes to the component code.
I would like to point out that the same thing should be done with react-core components in extensions like react-table.
Sorry, something went wrong.
|
Does #3517 work for you @Hyperkid123 ? |
Sorry, something went wrong.
|
@redallen works. But I've noticed that you have marked #3155 as resolved. I think it could be closed after all extensions use direct imports not only for react-icons but for react-core as well. If you have your hands full I can start working on that. |
Sorry, something went wrong.
|
Ok, I will start the changes ASAP. I think this can be closed in favor of your PR. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What: Adress #3448 and #3155
Changes build paths to icons to use direct paths instead of using icons from index.js