Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#3137 closed New feature (fixed)

Add ability to link to related reports to ViewDataTable

Reported by: capedfuzz Owned by:
Priority: major Milestone: Piwik 1.8
Component: UI - UX (AngularJS, twig, less) Keywords:
Cc: Sensitive: no

Description

Some reports are related to other reports. In order to show the viewer these reports and in order to reduce the clutter that occurs if too many reports are displayed at once, a feature should be added to ViewDataTable that displays a report's related reports, if any.

The user should be able to click on a related report to see it load in-place. That is, it shouldn't send the viewer to a new page.

Attachments (7)

3137.diff.tar.gz (2.5 KB) - added by capedfuzz 2 years ago.
Patch for this issue.
related_reports_picture.png (43.8 KB) - added by capedfuzz 2 years ago.
Sample screen of related reports feature.
3137.diff.tar.2.gz (2.0 KB) - added by capedfuzz 2 years ago.
New patch for this issue.
3137.diff.tar.3.gz (2.9 KB) - added by capedfuzz 2 years ago.
Another patch for this issue.
related_reports_picture.2.png (46.6 KB) - added by capedfuzz 2 years ago.
New screenshot of related reports use. W/ one related report & w/ 2 related reports.
related_reports_widget1.png (14.9 KB) - added by capedfuzz 2 years ago.
Screenshot of related report feature used in widget.
related_reports_widget2.png (15.1 KB) - added by capedfuzz 2 years ago.
Screenshot of related report feature used in widget (just one related report).

Download all attachments as: .zip

Change History (23)

Changed 2 years ago by capedfuzz (diosmosis)

Patch for this issue.

Changed 2 years ago by capedfuzz (diosmosis)

Sample screen of related reports feature.

comment:1 Changed 2 years ago by capedfuzz (diosmosis)

I've uploaded a patch for this feature & a screenshot showing how it looks. If everything's OK, I can commit. What do you thing?

Changed 2 years ago by capedfuzz (diosmosis)

New patch for this issue.

comment:2 Changed 2 years ago by capedfuzz (diosmosis)

There was a bug in my patch, the related report URLs didn't unset filter information & forced a table to load. The patch I just uploaded fixes that.

comment:3 follow-up: Changed 2 years ago by matt (mattab)

  • Milestone set to 1.7.2 - Piwik 1.7.2

Cool new feature.

  • When there is only one related report, please put "Related report:" and the report name on the same line. It should look more concise/ less height pixels.
  • Does it work fine in the dashboard widgets?
  • For example in the Goals reports, if a related report needs the idGoal, will it be forwarded automatically to the related report controller?
    • Or should setRelatedReports() accept an array (module => X, action => Y, idGoal => Z, otherParameter => A) instead of just accepting module.action ?
  • do you think this feature would make sense to use in Piwik in some of the existing reports?

Good work!

Changed 2 years ago by capedfuzz (diosmosis)

Another patch for this issue.

Changed 2 years ago by capedfuzz (diosmosis)

New screenshot of related reports use. W/ one related report & w/ 2 related reports.

Changed 2 years ago by capedfuzz (diosmosis)

Screenshot of related report feature used in widget.

Changed 2 years ago by capedfuzz (diosmosis)

Screenshot of related report feature used in widget (just one related report).

comment:4 in reply to: ↑ 3 Changed 2 years ago by capedfuzz (diosmosis)

Uploaded a new patch.

Replying to matt:

  • When there is only one related report, please put "Related report:" and the report name on the same line. It should look more concise/ less height pixels.

Looks better this way :).

  • Does it work fine in the dashboard widgets?

I uploaded two pictures of its use in a dashboard widget. I think it looks ok.

  • For example in the Goals reports, if a related report needs the idGoal, will it be forwarded automatically to the related report controller?
    • Or should setRelatedReports() accept an array (module => X, action => Y, idGoal => Z, otherParameter => A) instead of just accepting module.action ?

For a Goals report the idGoal would be added automatically, since it would already exist in the query string. If you were trying to link a goal report to a non-goal report (for whatever reason), however, there'd be an issue, so I made the following changes:

I removed the setRelatedReport method and replaced it w/ two others: addRelatedReports & addRelatedReport. addRelatedReports works more or less like setRelatedReport. addRelatedReport (singular) will allow you to use specific query parameters.

I thought about making setRelatedReports take an array of arrays like you suggested, but it seemed like the use of custom query parameters would be rare occurrence. What do you think?

  • do you think this feature would make sense to use in Piwik in some of the existing reports?

I'm not sure it would. It makes sense to use it when you want to display reports that are very similar and want to save space. If you're trying to tell the user when looking at a certain report that there's another one that can be used in conjunction with it, I think this feature isn't the right one to use. It would probably be better to use some sort of text bubble.

So I guess I think this feature should be used to show different views of the same data (like browser & browser version, archive tables & archive tables by year, etc.)

But I haven't looked at every report, so maybe I'm missing something?

Good work!

Thanks! Let me know what you think of the new patch.

comment:5 Changed 2 years ago by matt (mattab)

I uploaded two pictures of its use in a dashboard widget. I think it looks ok.

it looks OK indeed, I might change the color to greyish color to make it less black... but def OK :)

I thought about making setRelatedReports take an array of arrays like you suggested, but it seemed like the use of custom query parameters would be rare occurrence. What do you think?

Perfect!

So I guess I think this feature should be used to show different views of the same data (like browser & browser version, archive tables & archive tables by year, etc.)

One perfect report to reuse this feature is to display "Exit Page Titles" and "Entry page titles" reports, from the footer of "Page Titles". See #1996 - feel free to look into this one if you're keen :)

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

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

(In [6309]) Fixes #3137, added ability for data table views to link to arbitrary related reports in the data table footer.

comment:7 Changed 23 months ago by matt (mattab)

(In [6332]) Refs #3137 Small style changes

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

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for Small bug: When adding "OS" and "OS family" widgets in dashboard, clicking on footer link confuses the datatable and reload the other widget.

comment:9 Changed 23 months ago by capedfuzz (diosmosis)

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

(In [6336]) Fixes #3137, fixed issue when same reports used more than once in dashboard (due to related reports feature) and modified so if a url to an index page is supplied as a related report, its corresponding menu item is clicked.

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

(In [6342]) Refs #3137, don't show related reports when there's no data to display.

comment:11 Changed 23 months ago by matt (mattab)

  • Component changed from Core to UI (templates, javascript)
  • Priority changed from normal to major

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

(In [6354]) Refs #3137, #2987, reverted datatable id changes, will require much more work to fix this bug.

comment:13 Changed 23 months ago by capedfuzz (diosmosis)

(In [6358]) Refs #3137, fix small bugs in Piwik, modified related reports feature so set of related reports used doesn't change after a related report is loaded.

Notes:

  • fixed bug in datatable.js. code that loaded by AJAX shouldn't of used $().html() but $().replaceWith(). The former added an unnecessary div every time.
  • GenerateGraphHTML.php didn't set the right viewDataTable view property value
  • Added getValuesFromUrl function to broadcast JS object.

comment:14 Changed 23 months ago by capedfuzz (diosmosis)

(In [6361]) Fixes #1996, refs #3137 added entry page titles & exit page titles reports. Fixed issues w/ related reports feature and actions data tables.

comment:15 Changed 23 months ago by capedfuzz (diosmosis)

(In [6364]) Refs #1996, #3137 fixed some minor issues w/ new entry/exit page titles reports and added logic to related reports feature to modify report header if available.

comment:16 Changed 23 months ago by matt (mattab)

(In [6400]) Refs #3137 Fixing last issues with datatable features ?

Note: See TracTickets for help on using tickets.