-
-
Notifications
You must be signed in to change notification settings - Fork 840
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
feat(statistics): support for custom date ranges #3622
Conversation
a34c8ec
to
82ebf32
Compare
extensions/statistics/js/src/admin/components/StatisticsWidgetDateSelectionModal.tsx
Outdated
Show resolved
Hide resolved
extensions/statistics/js/src/admin/components/StatisticsWidgetDateSelectionModal.tsx
Outdated
Show resolved
Hide resolved
extensions/statistics/js/src/admin/components/StatisticsWidgetDateSelectionModal.tsx
Outdated
Show resolved
Hide resolved
} | ||
|
||
export default class StatisticsWidgetDateSelectionModal extends Modal<IStatisticsWidgetDateSelectionModalAttrs> { | ||
/* @ts-expect-error core typings don't allow us to set the type of the state attr :( */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noticed this too, I guess like we have to always type a default state/attribute type in any core components to not hinder extensibility going forward?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we've done it in some components, but not all.
Just a "simple" class MyComponent<CustomAttrs extends BaseAttrs = BaseAttrs, CustomState extends BaseState> extends BaseComponent<CustomAttrs, CustomState>
should work.
extensions/statistics/src/Api/Controller/ShowStatisticsData.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Sami Mazouz <[email protected]>
Co-authored-by: Sami Mazouz <[email protected]>
Co-authored-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Changes proposed in this pull request:
Reviewers should focus on:
Screenshot
Necessity
Confirmed
composer test
).