Skip to content
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

Replace react-router-redux with redux-first-history #1826

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

anshgoyalevil
Copy link
Member

Which problem is this PR solving?

  • related to: Upgrade react-router-dom to latest version #1825
  • The react-router-redux is a dead project and is not compatible with react-router-dom v5 and v6.
  • The whole react-router community suggested using redux-first-history which is compatible with v4, v5 and v6 both.

How was this change tested?

  • Manually along with redux dev toolkit and automated testing

Checklist

Signed-off-by: Ansh Goyal <[email protected]>
@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
packages/jaeger-ui/src/components/App/index.jsx 100.00% <ø> (ø)
packages/jaeger-ui/src/middlewares/index.js 86.66% <ø> (ø)
packages/jaeger-ui/src/utils/configure-store.js 88.88% <100.00%> (+5.55%) ⬆️

📢 Thoughts on this report? Let us know!.

@yurishkuro
Copy link
Member

Manually along with redux dev toolkit and automated testing

Can you elaborate on these tests? It's impossible to understand the impact from the change alone.

@anshgoyalevil
Copy link
Member Author

Manually along with redux dev toolkit and automated testing

Can you elaborate on these tests? It's impossible to understand the impact of the change alone.

Yes, Since the change is related to react-router-redux, it affects the UiFindInput Component directly, since this consumes the state.router.location from the Redux Store.

Now, if something is broken on the redux-first-history part, the Find Span By ID feature won't work unless we reload the page.

How do I verify?

  • Visit any TracePage in Jaeger UI
  • Copy a span ID, and paste it into the search box at the TracePage header.
  • If the copies span id's span gets highlighted, redux-first-history is working behind the scenes.

Now, try creating a new history object instead of using the one imported from configure-store.
Repeat the above steps, the UiFindInput feature won't highlight the span anymore.

  • Test using Redux DevTools
    Using the Redux DevTools, we can see that every action is being dispatched. Like the specified above TracePage's search bar input, on entering a value, the redux-first-history dispatches an action of saving the value to history and then uses the location from the history of the redux store to highlight the span.

image

@yurishkuro yurishkuro merged commit 066dd4b into jaegertracing:main Sep 27, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants