? Pending

User tests: Successful: Unsuccessful:

avatar sakiss
sakiss
6 Jul 2021

Summary of Changes

If you try to use an image file in the component menu, this is shown differently than the icons used in Joomla components.
It does not have the same spacing.

Testing Instructions

For the shake of testing i created a very simple component that can be downloaded from github.

It is just an empty component that uses an svg icon in it's menu.

Install it and click the components dashboard icon.

component_dashboard

Actual result BEFORE applying this Pull Request

Icon stuck to the component name
icon_test_before

Expected result AFTER applying this Pull Request

Icon having the same spacing as the other component icons.
icon_test_after

Documentation Changes Required

No

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar sakiss sakiss - open - 6 Jul 2021
avatar sakiss sakiss - change - 6 Jul 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jul 2021
Category Modules Administration
avatar sakiss sakiss - change - 6 Jul 2021
The description was changed
avatar sakiss sakiss - edited - 6 Jul 2021
avatar sakiss sakiss - change - 6 Jul 2021
The description was changed
avatar sakiss sakiss - edited - 6 Jul 2021
avatar sakiss sakiss - change - 6 Jul 2021
The description was changed
avatar sakiss sakiss - edited - 6 Jul 2021
avatar ChristineWk
ChristineWk - comment - 7 Jul 2021

Don't see an Icon:

screen shot 2021-07-07 at 09 21 09


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

<a class="no-dropdown" href="index.php?option=com_icontest" aria-label="Icon Test"><span class="sidebar-item-title">Icon Test</span></a>

avatar sakiss
sakiss - comment - 7 Jul 2021

@ChristineWk You have to visit the components dashboard. To do that either press the square button right to the Components menu (see my 1st screenshot) or visit: index.php?option=com_cpanel&view=cpanel&dashboard=components

avatar ChristineWk
ChristineWk - comment - 7 Jul 2021

@sakiss I'm afraid:

screen shot 2021-07-07 at 10 14 07


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

/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=components

avatar sakiss
sakiss - comment - 7 Jul 2021

@ChristineWk This is related with your admin modules and how they are configured. By default loads the components there.

avatar ChristineWk
ChristineWk - comment - 7 Jul 2021

@sakiss OK. Will check the modules etc.

avatar sakiss sakiss - change - 7 Jul 2021
Title
[4.0] Component menu image to be styles as component font-icon
[4.0] Component menu image to be styled as component font-icon
avatar sakiss sakiss - edited - 7 Jul 2021
avatar ChristineWk
ChristineWk - comment - 7 Jul 2021

@sakiss Thanks for the screenshot. Found it. Tried also some other things, but unfortunately now a mess, e.g.

Notice: Undefined property: Joomla\CMS\Menu\AdministratorMenuItem::$element in /mysite/administrator/modules/mod_menu/src/Menu/CssMenu.php on line 314

Hv to repair :-) Sorry about.

avatar ChristineWk ChristineWk - test_item - 7 Jul 2021 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 7 Jul 2021

I have tested this item successfully on 5acdace


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

avatar ChristineWk
ChristineWk - comment - 7 Jul 2021

OK. Repaired it :-) and got:

Before Patch:

screen shot 2021-07-07 at 11 52 34

With Patch:

screen shot 2021-07-07 at 11 52 52


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

avatar obuisard obuisard - test_item - 9 Jul 2021 - Tested successfully
avatar obuisard
obuisard - comment - 9 Jul 2021

I have tested this item successfully on 5acdace


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

avatar Bakual
Bakual - comment - 10 Jul 2021

I don't think this PR is correct. Using the class icon- just as a means to get some spacing is certainly wrong and could have unintended sideeffects. A better approach would be to add specific CSS rules for that img tag,

avatar sakiss
sakiss - comment - 10 Jul 2021

@Bakual Agree but a solution should meet the following requirements:

  1. The same class should be used both for the component's icon fonts and the image, to set their basic styling (e.g. margins, display).
  2. Both the icon and the img basic styling should depend on the template. Cannot 1 depend on a font l(e.g. fontawesome) and the other on the template.

For the time being this PR provides at least a solution, but if you wish to solve it in a better way, please commit or create a PR.
I am not a front-end dev, hence i am not familiar with things like scss.

avatar Bakual
Bakual - comment - 10 Jul 2021

I'm not a frontend dev either, but there are some here who could help.

avatar obuisard
obuisard - comment - 10 Jul 2021

I have created PR #34751 to address the issue on the CSS side and avoid the use of the class 'icon-'.

avatar richard67
richard67 - comment - 10 Jul 2021

@sakiss If you are ok with it, please close this PR here in favour of #34751 . Thanks in advance.

avatar sakiss
sakiss - comment - 10 Jul 2021

Closed in favour of #34751

avatar sakiss sakiss - close - 10 Jul 2021
avatar sakiss sakiss - change - 10 Jul 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-07-10 20:00:18
Closed_By sakiss
Labels Added: ?
avatar obuisard
obuisard - comment - 10 Jul 2021

Thanks @sakiss for bringing this issue up and a possible solution!

Add a Comment

Login with GitHub to post a comment