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

Show unique visitors metric for all periods if available #10200

Closed
wants to merge 5 commits into from
Closed

Show unique visitors metric for all periods if available #10200

wants to merge 5 commits into from

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented May 31, 2016

fixes #9989

@sgiehl sgiehl added the Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. label May 31, 2016
@sgiehl sgiehl added this to the 2.16.2 milestone May 31, 2016
@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Jun 1, 2016
array($selectableColumns[0]),
array('nb_uniq_visitors'),
array_slice($selectableColumns, 1)
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want 'nb_uniq_visitors' to be always after 'nb_visits', maybe this is a better way (no need to modify if order of items in $selectableColumns changes):

$pos = array_search('nb_visits', $selectableColumns);
// array(a, b) -> array(a, x, b)
array_splice($selectableColumns, $pos+1, 0, array('nb_uniq_visitors'));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you point, but that behaviour was simply "copied" from another place.
Imho we should more likely discuss if we should introduce some kind of column ordering system that will be applied to all reports automatically. We could define that in the column classes or maybe have kind of a registry where columns can register and define there order, which would maybe make it easier for third party plugin to work with it. Maybe that could also be used to define a custom order for any user...
@tsteur @mattab any plans to do something like that in 3.0?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Piwik 3 there is already a sparklines visualization and it is defined very differently. See eg https://github.com/piwik/piwik/blob/3.x-dev/plugins/VisitsSummary/Reports/Get.php#L164

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. So, guess there is no need to solve that in 2.x aswell

@adaqus
Copy link

adaqus commented Jun 17, 2016

Looks ok 👍 Take a look at the comment above.

@mattab
Copy link
Member

mattab commented Jul 8, 2016

Do we need to merge this issue?

if so, here is myreview:

@mattab mattab modified the milestones: 2.16.x (LTS), 2.16.2 Jul 8, 2016
@sgiehl sgiehl added the PP label Jul 8, 2016
@mattab mattab removed the PP label Jul 14, 2016
@mattab mattab modified the milestones: 2.16.3, 2.16.x (LTS) Jul 18, 2016
@mattab
Copy link
Member

mattab commented Aug 23, 2016

Hi @sgiehl do you think this PR is now ready to be merged? Wondering, whether we maybe need create the PR against Piwik 3 as well?

@sgiehl
Copy link
Member Author

sgiehl commented Aug 25, 2016

I need to recreate the PR in order to update it. I don't think this should our could be included this way in Piwik 3, due to the changes already made there.
We might consider merging it to 2.16.3, but I would suggest to do that after merging master to 3.x to avoid merge conflicts.
I'll recreate the PR later to check if the tests are running...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants