-
Notifications
You must be signed in to change notification settings - Fork 11
Dynamic statistics on administration panel #232
Dynamic statistics on administration panel #232
Conversation
First of all, welcome! |
Hi @loic425 , Thank you! And that's a good idea! I just did a test with your proposed solution, but I don't think this could be used to add a sort to the statistics. Because if I want to use a int as the key for sorting, the compilerpass overwrites it with the default array keys. This solution only works when defining your keys as words. Which would require extra code to convert those to values. I propose to use the native supported functionality to add a priority to the service. |
Yes you're right. It's a good solution:) |
@lucasballyn The build has failed. etc/travis/suites/application/script/validate-yaml-files Do you know phpspec ? there are few errors. |
Unfortunately I don't know phpspec :( But I wouldn't mind learning if it's necessary to contribute to oss? Maybe (if you have time) you could do it for this PR, and in meantime I start learning it? Is that ok for you? Thanks in advance! |
Deal! |
Ok! Thank you very much! |
6949c96
to
d80eed4
Compare
@lchrusciel Can you make a review please. This seems to me interesting but I'd like to have your opinion. |
@lucasballyn @lchrusciel Perfect for this PR! |
Hi @loic425, Thank you for the updates while I was a little inactive! I hope to have more time soon to contribute more actively! Anything else I need to do for this PR? Or is this ready to merge? Thanks in advance! |
@lucasballyn Adding a cookbook on documentation seems to be necessary. |
]); | ||
} | ||
|
||
public static function getDefaultPriority(): int |
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.
I prefer to define service priorities in service configuration rather than in php code, but still a pretty neat solution 👍
Create config & providers to process the generation
Add return type to generate function in the interface So we know a generated (HTML) string will be returned
Instead of in the main file. So we can define per statistic how wide it should be. And this way the statistics gets nicely arranged when adding multiple
e138c13
to
07cf12e
Compare
Thank you @lucasballyn! 🎉 |
This feature allows us to dynamically create dashboard widgets that are displayed in the dashboard of the admin panel.