-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFE: Create and publish a proper NPM package #7775
Comments
@kahowell, yes we've discussed this a number of times. Here is where we are at. Anything in However, for the js in |
@petervo, I understand; thanks for the insight. I looked into copying some of the files, and there is some tight coupling that makes it hard to do without a lot of work to identify and pull in additional files and/or rewrite/refactor the dependencies out (I don't recall specifics at the moment, but could look back and provide specifics if you're curious). Is there any plan to contribute some of the react components specifically upstream to patternfly-react? That's another way to achieve the spirit of what this RFE is about (for subscription-manager at least). For example, we identified three specific components that would be useful for us specifically:
edit: grammar |
Yes please do. We'd like to make these easy to copy, so any problems you ran into would be helpful to know about and we can try to fix them here.
There hasn't been so far, mainly because we don't use patternfly-react. Last time we looked into it we didn't want to bring it in as it was pretty heavy weight with a lot of deps. But it's probably worth looking into. |
@petervo I had a TODO sitting around for quite a while for this... Here goes:
Anyways, we reached a state where we're relatively happy with the various solutions... Hope this info helps cockpit devs or others following a similar path. I still think it'd be nice to have an NPM package for reusable react components from cockpit (or get them into patternfly-react), but subscription-manager-cockpit is in an okay state without it. |
In Cockpit itself we are aiming for moving to PatternFly-React components, and we encourage others to do the same. Honestly defining a public stable API for these shared components is just too cumbersome -- if you want to use them, it's easier to just copy and adjust them. |
This would make development of out-of-tree cockpit plugins far easier. For example it would make work such as that in candlepin/subscription-manager#1709 unnecessary (i.e. since cockpit developers have already done all the hard work of getting the bootstrap-select component to work in pure React, it'd be wonderful to simply take advantage of that). I tried a few things to import cockpit JS as a dependency in that PR and hit many blockers, since the project is really not structured for that (the last one I recall is some relative paths causing issues).
Another way to have a similar effect is to push some of the code upstream. For example, if some of the react components such as cockpit-select were integrated into patternfly-react, this would have a similar effect.
Related: patternfly/patternfly-react#54
The text was updated successfully, but these errors were encountered: