#3202 closed Bug (fixed)

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

Reported by: matt Owned by:
Priority: normal Milestone: 1.8.3 - Piwik 1.8.3
Component: UI - UX (AngularJS, twig, less) Keywords:
Cc: Sensitive: no

Description

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

Attachments (1)

3202.diff.tar.gz (2.5 KB) - added by capedfuzz 21 months ago.
Patch for this issue.

Download all attachments as: .zip

Change History (14)

Changed 21 months ago by capedfuzz (diosmosis)

Patch for this issue.

comment:1 Changed 21 months ago by capedfuzz (diosmosis)

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?

comment:2 Changed 21 months ago by matt (mattab)

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!

comment:3 Changed 21 months ago by capedfuzz (diosmosis)

  • Resolution set to fixed
  • Status changed from new to closed

(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.

comment:4 Changed 21 months ago by capedfuzz (diosmosis)

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();

comment:5 Changed 21 months ago by matt (mattab)

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

see email for more

comment:6 Changed 21 months ago by capedfuzz (diosmosis)

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

comment:7 Changed 21 months ago by capedfuzz (diosmosis)

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.

comment:8 Changed 21 months ago by matt (mattab)

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 :-)

comment:9 Changed 21 months ago by matt (mattab)

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

comment:10 Changed 21 months ago by capedfuzz (diosmosis)

(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.

comment:11 Changed 21 months ago by capedfuzz (diosmosis)

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

comment:12 Changed 21 months ago by capedfuzz (diosmosis)

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

comment:13 Changed 21 months ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from reopened to closed
  • Summary changed from UI: Increase websites listed in Report to load by default > Dashboard for a specific website to UX: Reuse the website selector with inline search in all places in the UI

Very Nice work :)

Note: See TracTickets for help on using tickets.