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

Clicking on currently loaded left menu item when current URL is full angular hash path + query, destroys graphs #9018

Closed
diosmosis opened this issue Oct 16, 2015 · 8 comments
Assignees
Labels
c: Design / UI For issues that impact Matomo's user interface or the design overall. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@diosmosis
Copy link
Member

As title.

To reproduce:

  1. Go to http://demo.piwik.org/index.php?module=CoreHome&action=index&idSite=7&period=day&date=yesterday#/?module=VisitsSummary&action=index&idSite=7&period=day&date=yesterday
    Note that the URL contains #/? which does not normally happen since menu URLs are defined as #... or #?....
  2. Click on Visitors > Overview.

The result is:

evolution_missing

Cause

This is caused by https://github.com/piwik/piwik/blob/master/plugins/CoreHome/javascripts/menu.js#L24.

When the hash is the same as what is loaded by angular, the browser does nothing. But the event above, triggers this event handler: https://github.com/piwik/piwik/blob/master/plugins/CoreVisualizations/javascripts/jqplot.js#L388 which destroys all visible plots.

@diosmosis diosmosis added c: Design / UI For issues that impact Matomo's user interface or the design overall. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels Oct 16, 2015
@diosmosis diosmosis added this to the 2.15.0 milestone Oct 16, 2015
@mattab
Copy link
Member

mattab commented Oct 16, 2015

Ideally, clicking on the current sub-menu, will reload and display the same report again.

This was implemented in 3.0.0 in #8319 and would be nice to have in 2.15.0

@mattab
Copy link
Member

mattab commented Oct 16, 2015

Note that the URL contains #/? which does not normally happen since menu URLs are defined as #... or #?....

This bug only occurs in this case, how did you reach this case via the UI?

Or did you manually change the URL?

in either case, maybe this is not a "Must fix" if user cannot reach this state 'naturally'. what do you think?

@mattab
Copy link
Member

mattab commented Oct 16, 2015

Note that the URL contains #/? which does not normally happen since menu URLs are defined as #... or #?....

This bug only occurs in this case, how did you reach this case via the UI?

Or did you manually change the URL?

in second case, maybe this is not a "Must fix" if user cannot reach this state 'naturally'. what do you think?

@diosmosis
Copy link
Member Author

Or did you manually change the URL?

Manually changed the URL. Only reason it doesn't appear is because menu.twig sets URLs to #?... or #... which are not correct angular URLs. Angular will change this to the correct URL. So if a user copies & shares the correct URL, then a user can be affected by this issue.

in second case, maybe this is not a "Must fix" if user cannot reach this state 'naturally'. what do you think?

I fixed it in a PR already.

@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Oct 16, 2015
@mattab mattab reopened this Oct 16, 2015
@mattab
Copy link
Member

mattab commented Oct 16, 2015

Which PR was it @diosmosis ? issue can be reproduced on demo2:

no graph

@diosmosis
Copy link
Member Author

I cannot reproduce on demo2, do you have steps to reproduce?

@mattab
Copy link
Member

mattab commented Oct 16, 2015

EDIT: after a recent PR the steps have changed:

  • go to demo2
    • wait for a widget with graph to render in the dashboard
    • click on "Actions" main menu link
    • got: graph in dashboard is now hidden and dashboard didn't reload, only Action menu expanded
    • expected: graph is only hidden when the whole page is reloaded

@diosmosis
Copy link
Member Author

Different bug, but same effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Design / UI For issues that impact Matomo's user interface or the design overall. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

No branches or pull requests

2 participants