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
CSS and UI components demo #7787
Conversation
{ | ||
public function demo() | ||
{ | ||
if (! Development::isEnabled()) { |
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.
Can we check for permission here? Maybe hasViewPermissionToSomeSites?
Is there a Menu missing? Should go to |
We need to be aware that whatever we expose here basically becomes a public API that we need to maintain/keep BC and needs to be documented in changelog. |
Addressed comments, will merge very soon (unless more comments) because most of my pull requests (and future ones) are based on this. |
@mattab should we in the beginning add something like that "we do our best to keep BC but we cannot guarantee it"? Or are we making it officially an API? If so, I'm wondering if we should but this on If it is API we should also mention something in changelog. |
OK let's then say this is not API. I need this PR merged for other PRs, and to be able to use UI tests to show the UI diffs in those PRs. What we will do however is discuss the CSS/HTML "API" topic in #7652 and decide there what to tag as API and how to document it for the best. |
See #7652
Instead of documenting CSS and UI elements on the developer website using screenshots or similar techniques, I've created a page in Piwik that documents CSS class and UI components.
I've also added a UI test on that page so that we can detect UI changes much more easily on reusable components.
I think it would be great that this page is publicly accessible on the demo: that would allow to link to it in the developer documentation. An idea how I can do that? (because I guess we don't want to make such page public for all piwik installs…)
You will note that some things in the page don't look very good: I didn't fix anything in that pull request, I just used basic HTML layout and it is meant to show the things to improve. It will be really practical when fixing UI stuff, or introducing new UI components (which I did a lot in upcoming pull requests for 2.14).
The layout of the page is heavily inspired by Bootstrap's documentation.
Preview of the page: