? Pending

User tests: Successful: Unsuccessful:

avatar N6REJ
N6REJ
15 Sep 2020

Pull Request for Issue # .

Summary of Changes

Better b/c handling.
Allows for setting custom prefix & icons.

Testing Instructions

compare & inspect icons.
apply pr.
Should be no changes.
install akeeba backup.
akeeba icon should display in dashboard.
no icon changes should be visible.

Expected result

image

Actual result

image

Documentation Changes Required

Explain the ability of using prefix. I don't think this is documented currently.
Most of all icons are set through the

LayoutHelper('joomla.icon.iconclass', ['icon' => 'some-kind-of-icon-type'])

adding prefix would become

LayoutHelper('joomla.icon.iconclass', ['icon' => 'some-kind-of-icon-type', 'prefix' => 'myprefix'])
avatar N6REJ N6REJ - open - 15 Sep 2020
avatar N6REJ N6REJ - change - 15 Sep 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Sep 2020
Category Layout
avatar N6REJ N6REJ - change - 15 Sep 2020
Title
[4.0] Allow for custom prefixes.
[4.0] [DRAFT] Allow for custom prefixes.
avatar N6REJ N6REJ - edited - 15 Sep 2020
avatar N6REJ N6REJ - change - 15 Sep 2020
Labels Added: ?
avatar N6REJ N6REJ - change - 15 Sep 2020
Title
[4.0] [DRAFT] Allow for custom prefixes.
[4.0] Allow for custom prefixes.
avatar N6REJ N6REJ - edited - 15 Sep 2020
avatar brianteeman
brianteeman - comment - 15 Sep 2020

Allows for setting custom prefix & icons.

how and where?

avatar sandewt
sandewt - comment - 16 Sep 2020

Allows for setting custom prefix & icons.

And for Fixed Width Icons, e.g. class="fas fa-skating fa-fw" ?


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

avatar N6REJ
N6REJ - comment - 16 Sep 2020

@sandewt I was thinking of putting that in a separate pr.

avatar N6REJ N6REJ - change - 16 Sep 2020
The description was changed
avatar N6REJ N6REJ - edited - 16 Sep 2020
avatar N6REJ
N6REJ - comment - 16 Sep 2020

Allows for setting custom prefix & icons.

how and where?

don't understand your question. Same way you normally use the layout except add 'prefix' => 'myprefix'

avatar N6REJ N6REJ - change - 16 Sep 2020
The description was changed
avatar N6REJ N6REJ - edited - 16 Sep 2020
avatar N6REJ N6REJ - change - 16 Sep 2020
The description was changed
avatar N6REJ N6REJ - edited - 16 Sep 2020
avatar hans2103 hans2103 - test_item - 17 Sep 2020 - Tested unsuccessfully
avatar hans2103
hans2103 - comment - 17 Sep 2020

I have tested this item 🔴 unsuccessfully on b4cb558


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

avatar hans2103
hans2103 - comment - 17 Sep 2020

Compare screenshots and see the result on the fa-circle icon in column Home

before PR

Schermafbeelding 2020-09-17 om 08 09 25

after PR

Schermafbeelding 2020-09-17 om 08 09 30

avatar hans2103
hans2103 - comment - 17 Sep 2020

The example above comes from ./administrator/components/com_menu/tmpl/items/default.php and seems to fail when only 'fa-circle' if provided instead of 'fas fa-circle'.

<?php echo HTMLHelper::_('jgrid.isdefault', $item->home, $i, 'items.', ($item->language != '*' || !$item->home) && $canChange && !$item->protected, 'cb', null, 'fa-home', 'fa-circle'); ?>

This PR should also work in case fas is forgotten.

avatar sandewt
sandewt - comment - 17 Sep 2020

After PR

Missing Akeeba icon

30645_after

avatar hans2103
hans2103 - comment - 17 Sep 2020

@N6REJ created a PR on your PR. N6REJ#15

avatar N6REJ
N6REJ - comment - 17 Sep 2020

Thanks guys, I'll fix it tomorrow

avatar N6REJ N6REJ - change - 17 Sep 2020
Title
[4.0] Allow for custom prefixes.
[4.0] [DRAFT] Allow for custom prefixes.
avatar N6REJ N6REJ - edited - 17 Sep 2020
avatar N6REJ
N6REJ - comment - 17 Sep 2020
  • Remove extra fa-
    image

  • Missing Akeeba icon

  • MERGE @hans2103 pr

avatar N6REJ N6REJ - change - 17 Sep 2020
Title
[4.0] [DRAFT] Allow for custom prefixes.
[4.0] [DRAFT] iconclass improvements.
avatar N6REJ N6REJ - edited - 17 Sep 2020
avatar hans2103
hans2103 - comment - 17 Sep 2020
  • Remove extra fa-
    image
  • Missing Akeeba icon
  • MERGE @hans2103 pr

extra 'fa-' will be solved by merging my PR.

@sandewt can you add a screenshot of the devtools, so we can see what HTML is provided?

avatar sandewt
sandewt - comment - 17 Sep 2020

Missing Akeeba icon

Joomla 4: before and after PR

30645_after_j4

Joomla 3: for comparison

30645_after_j3

avatar hans2103
hans2103 - comment - 17 Sep 2020

@sandewt I see your screenshot below Joomla 4: before and after PR.
What is the influence of this PR when the result before apply this PR is equal to the result after apply this PR?

avatar hans2103
hans2103 - comment - 17 Sep 2020

The missing icon was not caused by this PR.
administrator/components/com_akeeba/Toolbar/Toolbar.php line 350: $icon = 'akeeba-j4';
When I change the line to $icon = ' icon-akeeba-j4'; I can see the missing icon.

It seems that Akeeba is assuming the presence of Icomoon. This icon library has been replaced by Font Awesome in J4.
But due to backwards compatibility during J4 the icon should be shown.
Tough one to solve I guess

avatar hans2103
hans2103 - comment - 17 Sep 2020

@sandewt just found out that an earlier merged PR caused the issue.
see commit : e49cbc5

avatar brianteeman
brianteeman - comment - 17 Sep 2020

Tough one to solve I guess

Not really - revert all of these useless changes to the icons

avatar sandewt
sandewt - comment - 17 Sep 2020

The missing icon was not caused by this PR.

That's right.

avatar brianteeman
brianteeman - comment - 17 Sep 2020

Allows for setting custom prefix & icons.

how and where?

don't understand your question. Same way you normally use the layout except add 'prefix' => 'myprefix'

If that's what you meant by "allow custom prefix" etc then its no different to before this PR - you have to override the layout

Can you please please explain what the benefit is of this code. AFAICT the only B/C issue this fixes is one you introduced in another proposed pr and other than that its just change for change sake

avatar sandewt
sandewt - comment - 17 Sep 2020

@sandewt just found out that an earlier merged PR caused the issue.

Not completely true.
I tried something, this seems to work for Joomla and Akeeba before patch #30645:
But is of course not a good solution!

//$icon = stristr($icon, "joomla") ? str_ireplace("joomla", "fab fa-joomla", $icon) : "fas fa-" . $icon; // skipp this line !?
?>
<h1 class="page-title">
	<span class="icon-<?php echo $icon; ?>" aria-hidden="true"></span>
        <span class="<?php //echo $icon; ?>" aria-hidden="true"></span>
	<?php echo $displayData['title']; ?>
</h1>
avatar joomla-cms-bot joomla-cms-bot - change - 17 Sep 2020
Category Layout Repository Administration
avatar brianteeman
brianteeman - comment - 17 Sep 2020

you probably didnt mean to update 578 files by including akeeba backup in this PR or to commit your on .gitignore file

image

avatar N6REJ
N6REJ - comment - 18 Sep 2020

you probably didnt mean to update 578 files by including akeeba backup in this PR or to commit your on .gitignore file

image

ugh

avatar joomla-cms-bot joomla-cms-bot - change - 18 Sep 2020
Category Repository Administration Layout
avatar brianteeman
brianteeman - comment - 18 Sep 2020

Can you please please explain what the benefit is of this code. I am not alone in failing to see any point in this PR. If you cannot explain the benefits etc then its just change for changes sake.

avatar N6REJ
N6REJ - comment - 18 Sep 2020

we're rethinking the entire icon handling so closing all pr's for now.

avatar N6REJ N6REJ - change - 18 Sep 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-09-18 06:55:55
Closed_By N6REJ
avatar N6REJ N6REJ - close - 18 Sep 2020
avatar brianteeman
brianteeman - comment - 18 Sep 2020

Good

avatar sandewt
sandewt - comment - 18 Sep 2020

See PR #30677


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

Add a Comment

Login with GitHub to post a comment