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

CSS and UI components demo #7787

Merged
merged 3 commits into from May 10, 2015
Merged

CSS and UI components demo #7787

merged 3 commits into from May 10, 2015

Conversation

mnapoli
Copy link
Contributor

@mnapoli mnapoli commented Apr 29, 2015

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:

capture d ecran 2015-04-29 a 16 20 23

capture d ecran 2015-04-29 a 16 23 32

@mnapoli mnapoli added the c: Design / UI For issues that impact Matomo's user interface or the design overall. label Apr 29, 2015
@mnapoli mnapoli added this to the Piwik 2.14.0 milestone Apr 29, 2015
@mnapoli mnapoli added the Needs Review PRs that need a code review label Apr 29, 2015
{
public function demo()
{
if (! Development::isEnabled()) {
Copy link
Member

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?

@tsteur
Copy link
Member

tsteur commented Apr 30, 2015

Is there a Menu missing? Should go to MenuAdmin::addDevelopmentItem

@tsteur
Copy link
Member

tsteur commented Apr 30, 2015

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.

@mnapoli
Copy link
Contributor Author

mnapoli commented May 6, 2015

Addressed comments, will merge very soon (unless more comments) because most of my pull requests (and future ones) are based on this.

@tsteur
Copy link
Member

tsteur commented May 7, 2015

@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 developer.piwik.org? Will be probably very hard as it would mean we'd have to load the Piwik CSS so forget it. Could maybe somehow work with a custom plugin as an exported widget + iframe though. Should be easy to built. Custom plugin because we would not want to have this as a regular widget and we'd not want to check for permissions and development mode in this case.

If it is API we should also mention something in changelog.

@mnapoli
Copy link
Contributor Author

mnapoli commented May 10, 2015

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.

mnapoli added a commit that referenced this pull request May 10, 2015
CSS and UI components demo
@mnapoli mnapoli merged commit fad1885 into master May 10, 2015
@mnapoli mnapoli deleted the ui-demo branch May 10, 2015 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Design / UI For issues that impact Matomo's user interface or the design overall. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants