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

Wrong redirection from analytics page #8257

Closed
2 tasks done
Octoslav opened this issue Aug 5, 2024 · 1 comment · Fixed by #8277
Closed
2 tasks done

Wrong redirection from analytics page #8257

Octoslav opened this issue Aug 5, 2024 · 1 comment · Fixed by #8277
Assignees
Labels
bug Something isn't working

Comments

@Octoslav
Copy link

Octoslav commented Aug 5, 2024

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Steps to Reproduce

  1. Got to any proekect
  2. Go to the Actions/View analytics
  3. Press "Back" button
  4. You are on "/tasks" page

Expected Behavior

Return to the project page

Possible Solution

No response

Context

It's quite counterintuitive behaviour. As I remember, in older versions, the "Back" button took you to the last project pages.

Environment

Server version: 2.16.1

Core version: 15.1.0

Canvas version: 2.20.6

UI version: 1.64.0
@Octoslav Octoslav added the bug Something isn't working label Aug 5, 2024
@klakhov
Copy link
Contributor

klakhov commented Aug 6, 2024

Hi, thanks for the report. We will look into this

@klakhov klakhov self-assigned this Aug 6, 2024
klakhov added a commit that referenced this issue Aug 19, 2024
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/).
-->

<!-- Provide a general summary of your changes in the Title above -->

### Motivation and context
<!-- Why is this change required? What problem does it solve? If it
fixes an open
issue, please link to the issue here. Describe your changes in detail,
add
screenshots. -->
Resolved #8257

The problem is in hashing system we use to save the opened tab. It
clutters the history and we cant really go back using it. There are two
ways to improve that. We eighter save the actual link to go back
somewhere in our application or pass it as a state when moving to
analytics page `history.push(/analytics, { from: somewhere})`. From my
perspective the first way is more elegant

TODO:
- [x] Analytics page
- [x] Check Guide page 

### How has this been tested?
<!-- Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc. -->

### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable for some reason, then ~~explicitly
strikethrough~~ the whole
line. If you don't do that, GitHub will show incorrect progress for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- [x] I have created a changelog fragment <!-- see top comment in
CHANGELOG.md -->
- ~~[ ] I have updated the documentation accordingly~~
- ~~[ ] I have added tests to cover my changes~~
- [x] I have linked related issues (see [GitHub docs](

https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- [x] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced navigation functionality with a configurable back link for
the AnalyticsPage component.
- Introduced a dynamic back navigation experience across analytics
routes.
	- Improved the GoBackButton component to accept custom back links.
  
- **Bug Fixes**
- Fixed navigation flow issues by ensuring the previous pathname is
accurately stored and used.

- **Documentation**
- Updated documentation to reflect changes in component props and
improved navigation logic.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 a pull request may close this issue.

2 participants