Skip to content

Conversation

hotzenklotz
Copy link
Member

@hotzenklotz hotzenklotz commented Jun 26, 2025

Small PR to refactor some technical debt in our React stack. I replaced the withRouter HOC from react-router with a useHistory hook instead.

The remaining 6 files with withRouter still use React class components.

Issues:

  • None

(Please delete unneeded items, merge only when none are left open)

  • Added changelog entry (create a $PR_NUMBER.md file in unreleased_changes or use ./tools/create-changelog-entry.py)
  • Added migration guide entry if applicable (edit the same file as for the changelog)
  • Updated documentation if applicable
  • Adapted wk-libs python client if relevant API parts change
  • Removed dev-only changes like prints and application.conf edits
  • Considered common edge cases
  • Needs datastore update after deployment

@hotzenklotz hotzenklotz self-assigned this Jun 26, 2025
Copy link
Contributor

coderabbitai bot commented Jun 26, 2025

📝 Walkthrough

Walkthrough

This update refactors several React components to replace the use of the withRouter higher-order component and explicit history props with the useHistory hook from react-router-dom. Component signatures and exports are updated accordingly, while internal logic and behavior remain unchanged.

Changes

Files Change Summary
frontend/javascripts/admin/auth/change_password_view.tsx
frontend/javascripts/admin/auth/finish_reset_password_view.tsx
frontend/javascripts/admin/auth/login_view.tsx
frontend/javascripts/admin/auth/start_reset_password_view.tsx
frontend/javascripts/admin/scripts/script_create_view.tsx
frontend/javascripts/admin/task/task_create_form_view.tsx
frontend/javascripts/admin/tasktype/task_type_create_view.tsx
frontend/javascripts/components/redirect.tsx
frontend/javascripts/admin/dataset/dataset_add_view.tsx
frontend/javascripts/components/credits_footer.tsx
Replaced withRouter HOC and explicit history prop with useHistory hook; updated function signatures and exports; removed related prop types.
frontend/javascripts/admin/project/project_create_view.tsx Simplified props type by removing intermediate aliases; updated function signature accordingly.
unreleased_changes/8721.md Documented the migration from withRouter to useHistory in multiple components.

Suggested labels

refactoring

Poem

A hop, a skip, a routing tweak,
From HOC to hook this week!
History’s now just one small call,
No more wrappers, none at all.
With every jump, our code’s more spry—
The rabbit cheers as changes fly!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ecbe4b3 and 86a8e91.

📒 Files selected for processing (3)
  • frontend/javascripts/admin/dataset/dataset_add_view.tsx (3 hunks)
  • frontend/javascripts/admin/project/project_create_view.tsx (1 hunks)
  • frontend/javascripts/components/credits_footer.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • frontend/javascripts/admin/project/project_create_view.tsx
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build-smoketest-push
  • GitHub Check: frontend-tests
  • GitHub Check: backend-tests
🔇 Additional comments (7)
frontend/javascripts/admin/dataset/dataset_add_view.tsx (5)

11-11: LGTM! Correct hook import.

The useHistory hook import is properly added from react-router-dom.


34-35: LGTM! Correct hooks refactoring pattern.

The function signature is properly updated to remove the history prop dependency, and the useHistory() hook is correctly called at the top level of the component to obtain the history object.


269-269: LGTM! Export properly simplified.

The withRouter HOC wrapper is correctly removed since the component now uses the useHistory hook internally. The Redux connector is still properly applied.


277-277: LGTM! Type annotation correctly updated.

The type annotation ReturnType<typeof useHistory> properly maintains type safety for the history parameter while being explicit about the source of the history object.


11-11: Excellent refactoring from withRouter to useHistory hook.

This is a clean and complete refactoring that:

  • Modernizes the routing approach by replacing HOC with hooks
  • Maintains all existing functionality
  • Preserves type safety
  • Follows React hooks best practices
  • Creates no breaking changes to the component interface

The refactoring is well-executed and aligns perfectly with the PR objectives.

Also applies to: 34-35, 269-269, 277-277

frontend/javascripts/components/credits_footer.tsx (2)

2-2: LGTM: Appropriate removal of unnecessary routing dependencies.

The removal of RouteComponentProps and withRouter imports is correct since this component doesn't use any routing props.


71-71: ```shell
#!/bin/bash

Verify JSX usage of CreditsFooter component and any passed props

echo "=== Searching for JSX usage of <CreditsFooter ==="
rg -B2 -A2 "<CreditsFooter" -g "*.tsx"


</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0A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7DellVFqwFQXyzQd6LjVl58N5eAjB3A0mV7qoI6oiKOjyC17EUOqKWG3sDAK7cZnGWxGWo8miaKdwggbI3oXQ1BUZEQLQRjpqlLqMZnYXAxAChSTAfQ9UkXaLogBgjZNe2ZJCYlrwrTdZOIDxIrGln3ZuUcsnEOiMgCQ55t+MJJBSohEVClQQSxvUXq9jmjttkQRmIeKDnqLzMLBvArml+Fn4Fwf8e6KSjwGSD+hq+vgUISQQ1Kd8KCKjCqruzQaVpr4HXQFlvRO6SCP6GJOOlIjMGMsColgqinqlXodglB70S1jNwQIkM9EKQ9QGkKsFRlV6blfoeMK6HpCPov/Asmi0KgYt5hiAHgVYLyLnsYkhgAwK5AfgHFvIQgxkoFEmwhRFeOXPolQGigOQ4ozkA4apAEx9BTCV4TYf4CsJ0BaoJhJyPsMOGiB1gAAFgEAABmJQKCJhAAAGPYDCD2A7AAAnKkAEAwgtgGwbPAwH2DZ4tgCI0EQwBhCgigR2ebPECN2B/CnhEASABsAABsaADYCQARF7BaAtItAECIYB7A9gWwNkTsFoBbAsQjWEgFsDxECAtgMIBgBsFBE7BCR2eLSPFEOGGR1AtUd4cbi+E5F1IfwoAA== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=scalableminds/webknossos&utm_content=8721):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@hotzenklotz hotzenklotz requested a review from philippotto June 26, 2025 09:10
@hotzenklotz hotzenklotz changed the title Replace withRouter HOC with useHistory hook Replace withRouter HOC with useHistory hook Jun 26, 2025
@hotzenklotz hotzenklotz changed the title Replace withRouter HOC with useHistory hook Replace withRouter HOC with useHistory hook Jun 26, 2025
Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

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

nice, lgtm 👍 by the way, I usually don't create changelog entries for changes that are only implementation-specific, because external users won't really care about them, I assume.

@hotzenklotz hotzenklotz merged commit 2e479fe into master Jun 26, 2025
4 checks passed
@hotzenklotz hotzenklotz deleted the refactor_withRouter branch June 26, 2025 09:50
@coderabbitai coderabbitai bot mentioned this pull request Jul 4, 2025
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants