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

fix(frontend): do not use redirects outside the react router #6739

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

vikrantgupta25
Copy link
Collaborator

@vikrantgupta25 vikrantgupta25 commented Jan 2, 2025

Summary

  • use history.replace to something went wrong instead of using redirects outside react router
  • updated the something went wrong page to error boundary fallback providing the reload support as well

Related Issues / PR's

contributes to - https://github.com/SigNoz/engineering-pod/issues/2123

Screenshots

NA

Affected Areas and Manually Tested Areas

Copy link

github-actions bot commented Jan 2, 2025

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added the bug Something isn't working label Jan 2, 2025
@vikrantgupta25 vikrantgupta25 marked this pull request as ready for review January 2, 2025 07:40
Copy link

github-actions bot commented Jan 2, 2025

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to fa8f49e in 20 seconds

More details
  • Looked at 50 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. frontend/src/AppRoutes/index.tsx:247
  • Draft comment:
    Consider refactoring the error handling and loading logic to avoid duplication and improve maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR aims to replace the use of Redirect with history.push or history.replace. In the App component, the use of history.replace is consistent with the intent of the PR, which is to avoid using Redirect outside of React Router. However, the logic for handling errors and loading states is duplicated in the App component. This could be refactored to improve maintainability.
2. frontend/src/AppRoutes/index.tsx:256
  • Draft comment:
    Avoid using inline styles for the Spinner component. Consider using external stylesheets, CSS classes, or styled components instead.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_S83AJ2NCOLsPyeaC


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Jan 2, 2025

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link

github-actions bot commented Jan 2, 2025

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 2d5dd26 in 24 seconds

More details
  • Looked at 26 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. frontend/src/AppRoutes/pageComponents.ts:183
  • Draft comment:
    The webpack chunk name has been changed from 'SomethingWentWrong' to 'ErrorBoundaryFallback'. Ensure that this change is intentional and consistent across the codebase to avoid confusion.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. frontend/src/container/TopNav/DateTimeSelectionV2/config.ts:217
  • Draft comment:
    Avoid using the component/index.tsx file structure approach, as it makes it difficult to debug and find components using global search tools.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_lM6bNvcVhQSzE5BO


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Jan 2, 2025

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@vikrantgupta25 vikrantgupta25 merged commit 28d27bc into main Jan 2, 2025
17 of 20 checks passed
@vikrantgupta25 vikrantgupta25 deleted the fix/redirect-outside-router branch January 2, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants