? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
12 Nov 2020

Inspired by discussion in #31382

Currently, the component specific dashboards of com_menus, com_content, com_users and com_privacy take their dashboard title from a string in com_cpanel.
This makes no sense and is a special threatment of core components which shouldn't happen.

Also current code requires that 3rd party dashboard are named as "com_foo" unlike core dashboards which are just named "foo". This PR will work with both variants for 3rd party.

Summary of Changes

Moving the strings to the correct component language file
Adjusting the title lookup code so it first tries to load the string from a component language file. It prepends the dashboard name with "com_" (eg "content" becomes "com_content) if not already present to guess the related component.
If no string is found it will try with a com_cpanel string.

I removed the string COM_CPANEL_DASHBOARD_CONTENT_WORKFLOW_TITLE="Content Workflow Dashboard" as I couldn't find a workflow related dashboard.

Testing Instructions

Test the various dashboards if the title is still the same.

Actual result BEFORE applying this Pull Request

Titles are shown, but taken from com_cpanel

Expected result AFTER applying this Pull Request

In core all looks fine, titles come from the component language files

Documentation Changes Required

Maybe if dashboard documentation exists somewhere.

avatar Bakual Bakual - open - 12 Nov 2020
avatar Bakual Bakual - change - 12 Nov 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Nov 2020
Category Administration com_cpanel Language & Strings
avatar Bakual
Bakual - comment - 12 Nov 2020

On a sidenote, the icon code is very strange as well, using a language string to define the icon used. However language strings are for translating purposes, not for design.
For core this was already changed to a hardcoded list. Which is better but still not good and not useable for 3rd parties.

If someone has a good idea how to solve this, I'm all ears.

avatar ceford ceford - test_item - 13 Nov 2020 - Tested successfully
avatar ceford
ceford - comment - 13 Nov 2020

I have tested this item successfully on 6483d07

Could the icon name be in the manifest xml file? Or in config.xml as a hidden field?


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

avatar Bakual
Bakual - comment - 13 Nov 2020

Could the icon name be in the manifest xml file? Or in config.xml as a hidden field?

Could be an idea, I'll have a look at it. Maybe even the title could be taken from there, would make things much more intuitive for sure.

avatar Bakual
Bakual - comment - 13 Nov 2020

Did an alternativ PR which makes use of the manifest file for title and icon specifications: #31397

avatar Bakual
Bakual - comment - 14 Nov 2020

I'm closing this one, as the other basically became an extended version. ?

avatar Bakual Bakual - close - 14 Nov 2020
avatar Bakual Bakual - change - 14 Nov 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-11-14 08:43:18
Closed_By Bakual
Labels Added: ? ?

Add a Comment

Login with GitHub to post a comment