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.
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
Update: React router dom from v5 to v6 #2580
base: main
Are you sure you want to change the base?
Update: React router dom from v5 to v6 #2580
Changes from 12 commits
2af7813
154c7c0
2455d90
8a40827
2743cca
3ee6445
828e985
d5eb985
93c2181
52793ea
aa98700
c1eaadd
188ae81
8aebf4c
375bed2
9e691d6
4228454
b0ac58a
fe98dc1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
why in
packages/jaeger-ui/src/components/App/index.jsx
the history provider is removed but here it's not? What is the motivation for either decision?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.
In
packages/jaeger-ui/src/components/App/index.jsx
,HistoryProvider
is removed b/c rrd v6 works without being wrapped with that component.But in this test and other tests, the
history
object from it's namesake package is used for assertions. So, removingHistoryProvider
would mean a rewrite for these tests.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.
but what's the story with the
history
package, aren't we going to have to remove it altogether as incompatible going forward? It's ok if that clean-up can be done incrementally, we can defer it to other PRs.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.
history
is no longer a peer dep in v6 and later. And yes, we should have a separate PR for removing it from this repo.And we need to consider how to replace the function of that package - currently, it's used to provide the navigation props (e.g.,
history.push(/)
) in class-based components wrapped withwithRouteProps
. Because they're class based, we can't use hooks likeuseNavigation
). This discussion is better continued in another PR :)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.
Specifically, the migration guide you linked recommends using
navigate
instead ofhistory
.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.
And the docs say BrowserRouter incorporates the history in it.
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.
yep, we should replace
history
withnavigate
from theuseNavigate
hook. But that change can't be made unless the class-based components (like this) are rewritten into functional components.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.
can this module be deleted?
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.
not in this PR, other unrelated tests depend on it. We should remove history on its own PR
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.
should use relative paths in v7 migration: e.g.,
search
instead of/search