User tests: Successful: Unsuccessful:
In version 4, extensions can create their own dashboards. While this is a really cool feature, it seems to be mostly undocumented, so I had to do a bit of research on how to use this, by reading PRs like #28027, #27773 and similar.
The code for com_cpanel
contains parts to define the title and icon used for the dashboard. However, these don't seem to work. There is a test that checks if the $extension
string starts with com_
. But previous filtering converts com_something
into com-something
.
There is no icon and the title says "Home Dashboard".
An icon is shown and the title says "DemoJ4 Dashboard" (or what you have specified as COM_<YOUR COMPONENT>_DASHBOARD_TITLE
.
The whole feature lacks documentation. I'm not even sure if it is correct to name the dashboard com_demoj4
for a component with the name com_demoj4
or it should be just demoj4
.
Pinging @Bakual as I saw you used the dashboard already for your extension. Of course, it would be great to have other extension developers here as well who might be already using this feature as well.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_cpanel |
Is your dashboard identifier "myextension" or "com_myextension"? I looked at the code of com_sermonspeaker you uploaded for another PR, where it was only "sermonspeaker". ;-)
As I said, I'm not sure whether it has to be "com_myextension", but if we omit the "com", I don't know how to load the appropriate language files.
I have tested this item
OK, confirm Expected Result and "nice" icon :-)
But I didn't check/know about the language matters.
Labels |
Added:
?
|
I have tested this item
I did notice that the Components Dashboard is missing an icon alongside J4 Demonstration Component, the dasboard icon is misaligned and has title="%s Dashboard" - but all of that is related to the demo component. I may look into that to see if I can help with some documentation.
I did notice that the Components Dashboard is missing an icon alongside J4 Demonstration Component,
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31382.
All other Components do also not have an icon alongside. So, I don't understand (?) Tks.
Fix for test script:
<menu img="class:bullhorn">
shows the icon in the components dashboard.
Is your dashboard identifier "myextension" or "com_myextension"? I looked at the code of com_sermonspeaker you uploaded for another PR, where it was only "sermonspeaker". ;-)
As I said, I'm not sure whether it has to be "com_myextension", but if we omit the "com", I don't know how to load the appropriate language files.
Yep, that looks indeed fishy in the code. Since the core dashboards all use just "content" or "users", one should expect 3rd parties can use the same naming convention. But those names all come from the com_cpanel.ini which is architecturally wrong. They should come from com_content.ini or com_users.ini which would also make it work for 3rd parties then.
I'll try to see if I can find a solution which don't has a special case for core extensions
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-11-14 13:47:05 |
Closed_By | ⇒ | richard67 | |
Labels |
Added:
?
|
Thanks!
I wasn't able to translate the string yet to my liking, I must be missing something somewhere. But code review looks fine. There is no reason to use
stringURLSafe
for the$extension
variable. And a few lines later (#64) the samestringURLSafe
is done again on the$extension
. So current code pretty sure smells.