-
Notifications
You must be signed in to change notification settings - Fork 353
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
Use workspace version of React for documentation #7217
Conversation
Preview: https://patternfly-react-pr-7217.surge.sh A11y report: https://patternfly-react-pr-7217-a11y.surge.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonkoops react-docs is our local workspace app we use for testing our components. In the past we have had downgrade version to test some version specific changes. For those purposes we would like to keep this dependency.
@tlabaj I don't think this currently has a different version, as you can see below the root of the workspace has the same version range as Lines 64 to 65 in b7823d1
Since |
That is correct @jonkoops, but in the past during testing we have updated versions to test specific version related issues. We would like to maintain flexibility. |
Can you explain to me how this removes that flexibility? If the root workspace version is upgraded it does not prevent anyone from downgrading the versions here at a later time by running |
That is true. It's more for documentation at the react-doc level so it is more intuitive for the devs. That is my opinion. I am open to other's thoughts here as well. |
Thanks for the feedback @jonkoops & we appreciate the help in updating for supporting React 18 🏆 I'll defer to @tlabaj here as the the lead for the PF react repo, but can you help me understand - does this dependency as it exists today block or disrupt your workflow in anyway that we're missing, or is this suggested change more for cleanup? |
This does not block the React 18 upgrade, I would simply bump the version there. This work is coming from my research in upgrading React (#7146) where I found that this could simply be removed (see #7146 (comment)). The reason why I'd recommend removing this is simply because it reduces maintenance burden of having multiple places where the same dependency is defined. This decreases the likeliness that someone will forget to update this in the future, which can cause unexpected behavior. This PR does not remove this dependency as it is already defined in the workspace. Just like all other packages in the repo do not have an explicit dependency on React either. It simply brings this package in line with all the other ones. |
Wouldn't it be better to document how to downgrade the version when needed then always have a static version here that can differ from the rest of the project. I agree with @jonkoops it seems to me like an unnecessary maintenance burden to keep this, just in case it might be needed |
LGTM, seems like a good approach, if we want to run react-docs with other package versions we can install those locally for test purposes. |
@jonkoops do you mind just adding something to the contribution guide about downgrading. Or you can open an issue to that as well. Then we can take this in. |
Removes React dependencies from the
react-docs
package, as this dependency is already present in the root of the workspace. Found this during the React 18 upgrade so this can be considered part of landing #7142.