User tests: Successful: Unsuccessful:
Pull Request for Issue #30024
removed button- from button render as the class shouldn't be there
Go to /administrator/index.php?option=com_templates&view=templates
Cassiopeia Details and Files
Click template_thumbnail.png
none
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
Labels |
Added:
?
|
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
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.
@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).
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?
Category | Libraries | ⇒ | Administration com_templates Libraries |
@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.
also icon-over breaks the whole thing if added back into custom() like it should be.. as currently written its never used.
Category | Libraries Administration com_templates | ⇒ | Administration com_templates Layout Libraries |
imo its ready for testing now. There are design issues with icons but that has nothing to do with this issue/pr.
Title |
|
@joeforjoomla you'll be happy to know the button class is back
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
|
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 |
Tks
@Quy any idea whats creating the space before
btn btn-primary?