? Success

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
14 Apr 2016

Pull Request for Issue #9919

Adds dimensions for the default breadcrumbs seperator image

avatar brianteeman brianteeman - open - 14 Apr 2016
avatar brianteeman brianteeman - change - 14 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Apr 2016
Labels Added: ?
avatar mbabker
mbabker - comment - 14 Apr 2016

The quirk with this is if you aren't using the core image then you have to
hack the helper to set the right attribute values for your separator
image. Or make JHtml::image() automagically parse the dimensions.

On Thursday, April 14, 2016, Brian Teeman notifications@github.com wrote:

Pull Request for Issue #9919
#9919

@810 https://github.com/810 Try this.

I dont see the need myself but this does what you asked for and adds

dimensions to the seperator image

You can view, comment on, or merge this pull request online at:

#9920
Commit Summary

  • add dimensions to breadcrumb seperator

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#9920

avatar brianteeman
brianteeman - comment - 14 Apr 2016

;) yes I realised that - still dont see the need for the dimensions on this type of image either

avatar brianteeman
brianteeman - comment - 14 Apr 2016

To be clear I hope this will be closed without merging I just did it to show @810

avatar 810
810 - comment - 14 Apr 2016

I'm now adding also dimensions to our component:

$location = JUri::root() . $attachment->getUrl();
$data = getimagesize($location);
$width = $data[0];
$height = $data[1];

<img src="<?php echo $attachment->getUrl(); ?>"<?php echo $attributesImg; ?> width="<?php echo $width ;?>" height="<?php echo $height ;?>" alt="" />
avatar brianteeman
brianteeman - comment - 14 Apr 2016

MY question about your original issue still remains

avatar 810
810 - comment - 14 Apr 2016

Yes, like Michael said, we need to JHtml::image() automagically parse the dimensions

This is needed for a w3c validation checks, or any other html checks like in the inspector from chrome (audit - ).

Now if you check a clean protostar template. he is showing a dimension notice to fix the height and width tag.

tests

avatar brianteeman
brianteeman - comment - 14 Apr 2016

Please add that to your issue report. #9919
Just saying Improve without saying what should be improved is not helpful


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9920.

avatar 810
810 - comment - 14 Apr 2016

Text updated on the issue.

You can close this pr.

Your fix works, but when have custom image it will break the height and size.

avatar brianteeman brianteeman - change - 15 Apr 2016
The description was changed
avatar brianteeman brianteeman - change - 15 Apr 2016
Category Modules
avatar ggppdk
ggppdk - comment - 15 Apr 2016

Now in order to override,

  • you need to place overriding image into specific folder of the frontend template which is not most most obvious to override
  • but overriding, seems to be disabled ? because the $relative parameter is null aka evalutes to false ? (i have not tested)

Why not adding a new parameter
(and maybe this parameter is not needed at all because overriding is disabled ? so we can just go ahead and always use CSS ?):

Separator type:

  • Image
  • CSS based

Thus existing sites will not break, the 2nd option will add a < span > with a css class to make it inline block (+ RTL check to add extra class)

  • the image will be added as background, and for some templates it can be a font-based image e.g. for protostar template CSS

To allow this to work for 3rd party templates, that do not add CSS for the class, we would need a default CSS ... to set the style of the arrow < span > box

but i am not sure in which file the CSS should go so that it get loaded always, e.g. in "system.css" or added from inside the HELPER using addStyleDeclaration() ? and anyone wanting to override would just prepend a body into the rule to make it of higher priority

avatar ggppdk
ggppdk - comment - 15 Apr 2016

@brianteeman
Also i have just now noticed, function signature is:

public static function image($file, $alt, $attribs = null, $relative = false, $path_rel = false)

you have changed 4th parameter, but the attribs is the 3rd parameter
[EDIT]
or i am looking at wrong file ?
cms/html/html.php

avatar andrepereiradasilva
andrepereiradasilva - comment - 15 Apr 2016

why not just use a utf8 character instead of images ....
example:
◄ = &#9668;
► = &#9658;
◂ = &#9666;
▸ = &#9656;

And then you can add color or size in css.

See http://mcdlr.com/8/

avatar brianteeman
brianteeman - comment - 15 Apr 2016

Why not just close this as a non-issue ;)

On 15 April 2016 at 13:22, andrepereiradasilva notifications@github.com
wrote:

why not just use a utf8 character instead of images ....
example:
◄ = ◄
► = ►
◂ = ◂
▸ = ▸

And then you can add color or size in css.

See http://mcdlr.com/8/


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9920 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar ggppdk
ggppdk - comment - 15 Apr 2016

Yes i think it is better to close this, it is not a bug, neither is too much of a problem as the image itself is too small to cause content repositioning on load

about my comments, i was just giving some feedback for anyone considering making another PR

avatar brianteeman brianteeman - change - 15 Apr 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-04-15 12:42:52
Closed_By brianteeman
avatar brianteeman brianteeman - close - 15 Apr 2016

Add a Comment

Login with GitHub to post a comment