[ENHANCEMENT]: New layout for dashboard for J4/5 #1134
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#1134
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Enhancement Details
Hi,
Here is the whole override to display the icons with the current dataset.
One issues is; with current dataset there is no link between an object that is a category, or an add button. So you see in my code i had to jump through some loops to fix that but you can just ignore that. Also i created an array that adds icons that math the legacy images as best as possible.
The layout above is copied from HTMLHelper::(icon.buttons) wich uses ROOT/layouts/joomla/quickicons/icon.php
FontAwesome 6 Free is what is used in J4 and J5.
They have an API: https://docs.fontawesome.com/apis/graphql/objects#release
I think we should detect what version is in use in Joomla and then the API can get the appropriate icon data. This file holds the version data: ROOT/media/vendor/joomla.asset.json
It would be nice to display a dropdown with the icons visible. I've done that before in a J3 JCB Component i built. There i had a database table with fontawesome icon information and a field that would pull the data into a list. A normal input type list does not allow icons in it. But i believe it could be done with the fancy dropdown list feature of Joomla 4/5 choices.js has several options to accomplish this : https://github.com/Choices-js/Choices?tab=readme-ov-file#callbackoncreatetemplates and https://github.com/Choices-js/Choices?tab=readme-ov-file#allowhtml
I believe my implementation relied on the unicode char of fontawesome icon since that was also what was in the db table i created for it.
Which part of the extension will be affected by this enhancement?
Compilation of component
Additional Context
No response