Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

UX: Reuse the website selector with inline search in all places in the UI #3202

Closed
mattab opened this Issue · 14 comments

2 participants

Matthieu Aubry Benaka
Matthieu Aubry
Owner

As per title: Increase websites from listing 10 currently to listing up to 200 max in Report to load by default > Dashboard for a specific website

Reported in forum

Benaka
Collaborator

Attachment: Patch for this issue.
3202.diff.tar.gz

Benaka
Collaborator

I uploaded a patch for this issue that makes it possible to use the website selector in different places and puts it to use in the UsersManager screen. matt, can you review it and let me know what you think?

Matthieu Aubry
Owner

Thanks for the patch!

  • Can you please put some short but to the point comments in the JS code eg. sites_selection.tpl and autocomplete.js?
    • Also when you see older code especially javascript that would be better with a comment please consider adding it also.
  • Code looks good and changes quite simple - I didn't apply the patch locally but please commit and I'll look then!
Benaka
Collaborator

(In [6556]) Fixes #3202, allowed site selector widget to be used in other places than the top bar, and put widget to use in 'report to load by default' setting.

Benaka
Collaborator

Committed. Regarding updating old JS code: I think it might be a good idea to rewrite the widgets as jquery plugins, when the opportunity allows. So you could use more than one of the widgets on the same page, etc. For site selector, the use would change to:

$('#whatever').piwik.siteSelector();
Matthieu Aubry
Owner

Getting many NOTICE errors when loading the user settings page: Notice: Undefined index: rawDate in piwik\svn\trunk\tmp\templates_c\%%2E^2E7^2E7E144D%%sites_selection.tpl.php on line 10

see email for more

Benaka
Collaborator

(In [6579]) Refs #3202, remove unnecessary hrefs from site selector and hide all sites link when selector used in user settings.

Benaka
Collaborator

I think I've fixed those issues, but I can't check. For some reason, I can't reproduce the notices, even though I can prove they're happening (nothing in the screen or the log). Let me know if my commit does the trick.

Matthieu Aubry
Owner

Code review:

  • Thanks that's beautiful! perfect in fact.... :)
  • Could you please also refactor all of the inline javascript code in the sites_selection.tpl refactored into the common.js ? This way all this content won't be loaded on each piwik first page load, speeding up a bit :)
  • also, it would be great to finish the refactoring of the selectors and also update the Site selector in "Settings > Users". This one has a particularity: there is an option to select "Apply to all websites". This could be at the top of the website selector in bold, and below the list of sites.
    • Once this one is converted all sites selectors will be consistent ensuring good user experience :-)
Matthieu Aubry
Owner

I noticed a regression: clicking on a site in the selector should collapse the selector. this way the user eyes focus on the Loading indicator at the right, this shows well that the click was taken into consideration

Benaka
Collaborator

(In [6616]) Refs #3202, added modified access manager page & visitor generator plugin to use the autocompleting site selector.

Notes:

  • Moved inline site selector javascript to autocomplete.js.
  • Added the ability to change the current url (via broadcast.propagateNewPage) w/o showing the main AJAX loading gif.
Benaka
Collaborator

(In [6627]) Refs #3202, fix notice in sites_selection.tpl.

Benaka
Collaborator

(In [6629]) Refs #3202, fix bug in sites_selection.tpl that affected VisitorGenerator.

Matthieu Aubry
Owner

Very Nice work :)

Matthieu Aubry mattab added this to the 1.8.3 - Piwik 1.8.3 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.