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

Add possibility to switch period in evolution graph #13689

Merged
merged 5 commits into from Nov 26, 2018
Merged

Add possibility to switch period in evolution graph #13689

merged 5 commits into from Nov 26, 2018

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Nov 9, 2018

Fix #955

re-used the calendar icon. same period will be applied in export dialog. won't work for range dates just like the limit selector.

@tsteur tsteur 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 labels Nov 9, 2018
@tsteur tsteur added this to the 3.8.0 milestone Nov 9, 2018
@@ -515,6 +527,12 @@ public function __construct()
Metrics::getDefaultProcessedMetrics()
);

$periodValidator = new PeriodValidator();
$this->selectable_periods = $periodValidator->getPeriodsAllowedForUI();
$this->selectable_periods = array_diff($this->selectable_periods, array('range'));
Copy link
Member

Choose a reason for hiding this comment

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

Should this filtering also be done before rendering? For example, if someone sets the periods to ['day', 'week', 'garbage', 'range'], should we remove the values that aren't allowed?

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 would have said it's not needed maybe cause a plugin might support it but not actually implement it fully in Matomo but that shouldn't be an issue I suppose. I think the feature usually won't be used so wouldn't do too much about it.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense.

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

2 participants