Skip to content

OU-192: replace react-router and react-router-dom with react-router-dom-compat-v5 #273

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

Merged
merged 3 commits into from
Apr 22, 2025

Conversation

zhuje
Copy link
Contributor

@zhuje zhuje commented Apr 14, 2025

Context

remove react-router and react-router-dom to be replaced by react-router-dom-compat-v5 for transition to react-router v6
OU-192

Related JIRA from /openshift/console changes

openshift/console#14957

Threads

Slack #observability-ui-interal thread
https://redhat-internal.slack.com/archives/C03EPFR2BAR/p1744392852882399

Slack #announce-console-plugins
https://redhat-internal.slack.com/archives/C032NLNEE8G/p1744391666020899

…er-dom-compat-v5 for transition to react-router v6

Signed-off-by: Jenny Zhu <[email protected]>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 14, 2025
@openshift-ci-robot
Copy link

@zhuje: This pull request explicitly references no jira issue.

In response to this:

Context

remove react-router and react-router-dom to be replaced by react-router-dom-compat-v5 for transition to react-router v6

Related JIRA from /openshift/console changes

openshift/console#14957

Threads

Slack #observability-ui-interal thread
https://redhat-internal.slack.com/archives/C03EPFR2BAR/p1744392852882399

Slack #announce-console-plugins
https://redhat-internal.slack.com/archives/C032NLNEE8G/p1744391666020899

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.

@openshift-ci openshift-ci bot requested review from kyoto and PeterYurkovich April 14, 2025 17:06
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 14, 2025
@zhuje
Copy link
Contributor Author

zhuje commented Apr 14, 2025

/retest

@zhuje
Copy link
Contributor Author

zhuje commented Apr 14, 2025

 - import { useParams } from 'react-router';
 + import { useParams } from 'react-router-dom-v5-compat';

FYI I wasn't 100% sure if I can do a direct replacement like this. I think its okay becuase this isn't a React Native app (e.g.mobile app) we don't specifically need react-router and can use react-router-dom-v5-compat.

From a google search: "react-router provides the core routing functionality, while react-router-dom is specifically designed for web applications, offering DOM-aware components. react-router-dom re-exports everything from react-router, so importing directly from react-router-dom is sufficient for web projects."

@zhuje zhuje changed the title NO-JIRA: replace react-router and react-router-dom with react-router-dom-compat-v5 OU-192: replace react-router and react-router-dom with react-router-dom-compat-v5 Apr 15, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 15, 2025

@zhuje: This pull request references OU-192 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

Context

remove react-router and react-router-dom to be replaced by react-router-dom-compat-v5 for transition to react-router v6
OU-192

Related JIRA from /openshift/console changes

openshift/console#14957

Threads

Slack #observability-ui-interal thread
https://redhat-internal.slack.com/archives/C03EPFR2BAR/p1744392852882399

Slack #announce-console-plugins
https://redhat-internal.slack.com/archives/C032NLNEE8G/p1744391666020899

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.

@@ -65,8 +65,6 @@
"react": "17.0.2",
"react-dom": "17.0.2",
"react-helmet": "^6.1.0",
"react-router": "5.3.x",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should include the compat package in our dependencies. Although it currently works since the @openshift-console/dynamic-plugin-sdk package requires it, it is better to be explicit with the packages we are using

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Added react-router-dom-v5-compat in latest push.

Copy link
Contributor

openshift-ci bot commented Apr 22, 2025

@zhuje: all tests passed!

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@jgbernalp
Copy link
Contributor

/lgtm

@jgbernalp
Copy link
Contributor

/label ux-approved

@openshift-ci openshift-ci bot added the ux-approved Signifies that UX has signed off on this PR label Apr 22, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 22, 2025
Copy link
Contributor

openshift-ci bot commented Apr 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, zhuje

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jgbernalp
Copy link
Contributor

cc @etmurasaki

@etmurasaki
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Apr 22, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 22, 2025

@zhuje: This pull request references OU-192 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

Context

remove react-router and react-router-dom to be replaced by react-router-dom-compat-v5 for transition to react-router v6
OU-192

Related JIRA from /openshift/console changes

openshift/console#14957

Threads

Slack #observability-ui-interal thread
https://redhat-internal.slack.com/archives/C03EPFR2BAR/p1744392852882399

Slack #announce-console-plugins
https://redhat-internal.slack.com/archives/C032NLNEE8G/p1744391666020899

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.

@openshift-merge-bot openshift-merge-bot bot merged commit fe8cfdb into openshift:main Apr 22, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR ux-approved Signifies that UX has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants