? ? Pending

User tests: Successful: Unsuccessful:

avatar N6REJ
N6REJ
27 Jul 2020

Pull Request for Issue #30024

Summary of Changes

removed button- from button render as the class shouldn't be there

Testing Instructions

Go to /administrator/index.php?option=com_templates&view=templates
Cassiopeia Details and Files
Click template_thumbnail.png

Actual result BEFORE applying this Pull Request

Missing icon on Crop button
image

Expected result AFTER applying this Pull Request

image
image

Documentation Changes Required

none

avatar N6REJ N6REJ - open - 27 Jul 2020
avatar N6REJ N6REJ - change - 27 Jul 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jul 2020
Category Libraries
avatar N6REJ N6REJ - change - 27 Jul 2020
Title
remove icon class from <button>
[4.0] [DRAFT] remove icon class from
avatar N6REJ N6REJ - edited - 27 Jul 2020
avatar N6REJ N6REJ - change - 27 Jul 2020
Labels Added: ?
avatar N6REJ
N6REJ - comment - 27 Jul 2020

@Quy any idea whats creating the space before btn btn-primary?

avatar joeforjoomla
joeforjoomla - comment - 27 Jul 2020

Strange that there is a space before btn btn-primary, however removing this class could have side effects if the core or certain third-party extensions is using it to target a certain button... not sure if it's a good idea

avatar N6REJ
N6REJ - comment - 27 Jul 2020

Strange that there is a space before btn btn-primary, however removing this class could have side effects if the core or certain third-party extensions is using it to target a certain button... not sure if it's a good idea

I hear your concern @joeforjoomla .
do we want to encourage bad class usage? The only other alternative is to rewrite the "standard" toolbar system completely.
I'm certainely open to suggestions.

avatar joeforjoomla
joeforjoomla - comment - 28 Jul 2020

@N6REJ having a button- class in the button element doesn't seem a bad class usage to me. If you think so... i don't care

avatar N6REJ
N6REJ - comment - 28 Jul 2020

@N6REJ having a button- class in the button element doesn't seem a bad class usage to me. If you think so... i don't care

I really don't think the attitude is necessary nor warranted. The class can be added IF NEEDED/DESIRED by the application simply by supplying an "button-icon-class" afaik.
to have button- there with the current J! core will require a rewrite of the toolbar class(s).

avatar N6REJ
N6REJ - comment - 28 Jul 2020

we could add a variable $button_class and make it the class for the <button> itself.
if we stripped the icon- and fa- from $icon then we could use
$button_class . ' ' . $icon in the toolbar class and that would satisfy all uses I would think.
Whats your thoughts?

avatar joomla-cms-bot joomla-cms-bot - change - 28 Jul 2020
Category Libraries Administration com_templates Libraries
avatar N6REJ
N6REJ - comment - 28 Jul 2020

@infograf768 This pr "fixes" the issue but in the process of fixing it I discovered another issue.
if we create the call w/o "fas fa-crop" and instead use NAME only.. such as
ToolbarHelper::custom('template.cropImage', 'crop', 'arrows-alt', 'COM_TEMPLATES_BUTTON_CROP', false);
then the problem goes away and all is well ( after this pr )
BUT if instead we use
ToolbarHelper::custom('template.cropImage', 'fas fa-crop', 'fas fa-arrows-alt', 'COM_TEMPLATES_BUTTON_CROP', false);
then the toolbar id has a space in it.
image

avatar N6REJ
N6REJ - comment - 28 Jul 2020

also icon-over breaks the whole thing if added back into custom() like it should be.. as currently written its never used.

avatar joomla-cms-bot joomla-cms-bot - change - 28 Jul 2020
Category Libraries Administration com_templates Administration com_templates Layout Libraries
avatar N6REJ
N6REJ - comment - 28 Jul 2020

imo its ready for testing now. There are design issues with icons but that has nothing to do with this issue/pr.

avatar N6REJ N6REJ - change - 28 Jul 2020
Title
[4.0] [DRAFT] remove icon class from
[4.0] Missing icon on Crop button
avatar N6REJ N6REJ - edited - 28 Jul 2020
avatar N6REJ
N6REJ - comment - 28 Jul 2020

@joeforjoomla you'll be happy to know the button class is back

avatar ChristineWk ChristineWk - test_item - 28 Jul 2020 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 28 Jul 2020

I have tested this item successfully on 6f09d50


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

avatar jwaisner jwaisner - test_item - 29 Jul 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 29 Jul 2020

I have tested this item successfully on 6f09d50


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

avatar jwaisner jwaisner - change - 29 Jul 2020
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 29 Jul 2020

RTC


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

avatar N6REJ N6REJ - change - 29 Jul 2020
Labels Added: ?
avatar infograf768 infograf768 - change - 29 Jul 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-07-29 07:57:40
Closed_By infograf768
avatar infograf768 infograf768 - close - 29 Jul 2020
avatar infograf768 infograf768 - merge - 29 Jul 2020
avatar infograf768
infograf768 - comment - 29 Jul 2020

Tks

Add a Comment

Login with GitHub to post a comment