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 anchor links issue within Matomo #19252

Closed
Chardonneaur opened this issue May 22, 2022 · 11 comments · Fixed by #19271
Closed

Fix anchor links issue within Matomo #19252

Chardonneaur opened this issue May 22, 2022 · 11 comments · Fixed by #19271
Assignees
Labels
Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@Chardonneaur
Copy link

When we access to the API page within Matomo, Admin --> Platform --> API. If you click on one of the API method link, it makes you move to the associated link. But then, if you scroll up or click on any other link on the page it will still go back to the anchor link you selected.
Honestly, this is super annoying.

@Chardonneaur Chardonneaur added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label May 22, 2022
@peterhashair
Copy link
Contributor

@Chardonneaur try to reproduce it, but it works fine for me, I tested Safari, Firefox, and Chrome. Do you mind providing more details, like a screencast or browser version?

@Chardonneaur
Copy link
Author

@sgiehl
Copy link
Member

sgiehl commented May 23, 2022

I was able to reproduce that locally. Once the hash is appended to the url, every click will trigger a scroll to that anchor.
Might possibly be a vue regression. ping @diosmosis

@sgiehl sgiehl added Regression Indicates a feature used to work in a certain way but it no longer does even though it should. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels May 23, 2022
@heurteph-ei
Copy link

I confirm I have this behavior on Matomo 4.3.1

@diosmosis
Copy link
Member

@sgiehl I've seen this before the vue migration, had something to do with the angularjs digest cycle (you should be able to see infinite digest errors in the console). Curiously it does not happen if I scroll my mousewheel, only if I use the scroll bar itself. Actually if I remember correctly it's due to the URL being like #CustomTranslations, if it's set to #/CustomTranslations it works fine. This happened on another page w/ links like this.

@sgiehl
Copy link
Member

sgiehl commented May 23, 2022

you should be able to see infinite digest errors in the console

yes, that's right. wondering why the scrolling is triggered on every activity even though the URL doesn't change 🤔
The URL handling is still done by angular, right? Maybe that will get fixed when this part is migrated to vue as well?

@diosmosis
Copy link
Member

@sgiehl It's due to the URL not matching what angularjs expects. As in its in the format #CustomTranslations and not #/...?.... My guess is, because of this, angularjs is not able to handle the URL change, and just keeps trying to (ie, sees URL is changed to #CustomTranslations which is different from stored state, fails to parse and handle it, checks watches again, sees URL does not match stored state, fails to parse it again, etc.).

Maybe that will get fixed when this part is migrated to vue as well?

Probably. It can also be fixed now by changing the URLs to start with a /.

@Chardonneaur
Copy link
Author

@diosmosis oh great, so it can be fixed within the next Matomo version?

@diosmosis
Copy link
Member

@Chardonneaur I'm not in charge or prioritization you'd want to ask someone else.

@justinvelluppillai justinvelluppillai added this to the 4.11.0 milestone May 25, 2022
@justinvelluppillai
Copy link
Contributor

@Chardonneaur yes we aim to fix all regressions quickly. I have added this to the current milestone for Matomo 4.11.0

@Chardonneaur
Copy link
Author

Perfect, thank you so much.

@sgiehl sgiehl self-assigned this May 25, 2022
@justinvelluppillai justinvelluppillai changed the title API page anchor link issue within Matomo Fix anchor links issue within Matomo Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants