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

branding: Logo breaks layout (size handling generally inconsistent) #5051

Closed
nkuehn opened this issue Apr 28, 2014 · 5 comments
Closed

branding: Logo breaks layout (size handling generally inconsistent) #5051

nkuehn opened this issue Apr 28, 2014 · 5 comments
Assignees
Labels
Bug For errors / faults / flaws. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@nkuehn
Copy link

nkuehn commented Apr 28, 2014

Hi,
here's a regression that came in with 2.2.0 (or 2.1.0, which I skipped): If using an own branding logo, the file gets scaled up to 100px height no matter what file I upload, which again leads to the top bar being bloated up to 100px height, as there's no more CSS that restricts the size.

My overall Impression is that there's no consistent concept behind handling the custom logos. A few examples:

  • the backend UI asks for an image at least 110px high, but the code scales the image to 100px height.
  • these size requirements don't fit the CSS of the themes.
  • the size requirement is not enforced, but instead the image is rescaled serverside to 100px with the worst available interpolation algorighm (makes quality worse than the browser would scale and increases the file size, yeah!)
  • 100px seems a random fixation as the height is per-theme and themes can choose any height.

I personally would drop the server-side rescaling completely and just implement a hard enforcing of a minimum pixel height (e.g. for the login screen) and a maximum file size as a security precaution. Leave the Scaling completely to the CSS of the Theme after that. The image is in the Browser cache anyways after the login screen, so there's no performance penalty at all. Just my two cents.
Keywords: theme, branding

@mattab
Copy link
Member

mattab commented Apr 28, 2014

Thanks for the report: there is a problem and some inconsistencies indeed...

@JimTheFrog
Copy link

I confirm these problems, and suggest that there be no minimum pixel height, or at least something much smaller than 110px, which is way too tall. The default Piwik logo, for example, is 80x21. If the Piwik logo were forced to be 110px high it would be 419px wide, which would take over a quarter of the average screen width!

Also, I'm seeing colors reversed when uploading PNGs. (Happy to provide sample files if needed for testing).

@mattab
Copy link
Member

mattab commented May 21, 2014

In 81b6343: Fixes #5051 Custom Logo rules now are:

  • On Login page, custom logo displayed with
    width: 240px ```
  • On dashboard and admin pages, custom logo displayed with max-height: 50px;

Please report if you still have some issue (you can delete tmp/assets/* files to re-generate css)

@mattab
Copy link
Member

mattab commented May 21, 2014

Also, I'm seeing colors reversed when uploading PNGs.

This sounds like a different issue, can you please create new ticket with sample PNG we can use to reproduce?

@nkuehn
Copy link
Author

nkuehn commented May 27, 2014

Thanks for fixing this in 2.3.0!

@nkuehn nkuehn added this to the 2.3.0 - Piwik 2.3.0 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants