Install Joomla RC1, note that in all components (for example, in the media manager) the descriptions for the parameters in the component settings have disappeared.
The problem is with this change. Remove the change on this line and the descriptions will revert to parameters.
As far as I can tell, this breaks the PR #37699, so I'm not sure how to properly fix this to keep PR #37699 working.
Labels |
Added:
No Code Attached Yet
|
Can the descriptions be enabled by using the Toggle Inline Help button?
No. Because such a button is only in the general settings and somewhere else (I don’t remember the component).
Confirmed!
Where no button, descriptions hidden.
Where button, possibility to show them.
I don’t remember the component
com_content, articles
37158
Yep. Another first merge then think ;-)
@cyrezdev, could you help us?
Other components will be updated if it's ok with this PR the way i did it. ;-)
In any case, this should be fixed by one of us as soon as possible, as this is a "button car with no icons/tooltips" for both new Joomla users and non-advanced administrators.
Hello,
Maybe time to check this this weekend, but may not be related to my PR to first include the toggle button in com_content.
EDIT: in 4.1.2, no such issue, and my PR was already merged in it!
The issue is due to a change in 4.1.3
there is a button for switching hints
@Kostelano I'm missing this button at the plugins or am i seeing it wrong ?
@sandewt Yes, it is not in plugins and in all other components, except for the general settings and the materials component (added in https://github.com/joomla/joomla-cms/pull/37158/files#diff-250b59d27f418e931b052803c0a6089439df3f1ada6db18096ec9f9e5edb095c).
We need to either cancel this change, or make changes to all components in the same way as PR #37158.
We need to either cancel this change, or make changes to all components in the same way as PR #37158.
Cancel.
As even with addition of the toggle button in all core components, it will still be an issue for third-party extensions.
I didn't had the time yet to check, but the way would be to revert the change, and find a new way to improve integration.
The situation as it is now [J4.1.3] is unacceptable, because as with the plugins, the help texts disappear.
It is currently impossible to enable the descriptions for plugins and modules in Joomla! 4.1.3 without workarounds. This should be fixed asap! The inline help toggle button should be automatically displayed in the Modules (com_modules) and Plugins Manager (com_plugins).
In the meantime, 3rd Party developers can enable the descriptions by using a custom field type with a CSS instruction: https://docs.joomla.org/Creating_a_custom_form_field_type/en
Create the custom field type file (see documentation) and add the following code to the file:
protected function getLabel(): string
{
Factory::getApplication()->getDocument()->addStyleDeclaration('div.hide-aware-inline-help.d-none {display: inline-block !important;}');
return '';
}
But I agree with @cyrezdev, this is a backward compatibility break. Every extension must be rewritten to add the inline help toggle button. This is not acceptable for a bugfix release!
@Kubik-Rubik do you know how to get the inlinehelp xml element value from the renderField layout ?
As maybe adding this check in the field layout could fix the issue by adding the class d-none only if inlinehelp button exists.
And no B/C this way.
If it is defined in the XML file like:
<inlinehelp button="show"/>
Then you can retrieve it in your custom field like:
$this->form->getXml()->config->inlinehelp['button'];
But this will not help us here; the inline toggle button must be added to the toolbar outside the parameters form.
I don't mean to add it in layout, but to get its value ;-)
And from the Joomla Layout rendefield (core field).
https://github.com/joomla/joomla-cms/pull/37699/files
This change from #37699 is meant to prevent "flash" while loading options page when inlinehelp toggle button is integrated.
But it is this PR which breaks descriptions display.
My wondering is how to properly get inlinehelp element if set in layouts/joomla/form/renderfield.php
So that d-none class could be added only if inlinehelp button integrated.
(and this would fix B/C issue)
I see form xml is in $displayData['field'] but i don't know how to get its elements values... in a clean way.
($this->form->getXml()->config->inlinehelp['button'] does not work in a layout context)
@cyrezdev Yes, it would be possible. This is just a quick example of how to check for the Inline Help Toggle Button in the renderfield.php
:
// after line 12
use Joomla\CMS\Toolbar\{Toolbar, Button\InlinehelpButton};
...
// after line 27
$inlinehelpButtonLoaded = false;
$toolbarItems = Toolbar::getInstance()->getItems();
foreach ($toolbarItems as $toolbarItem) {
if ($toolbarItem instanceof InlinehelpButton) {
$inlinehelpButtonLoaded = true;
break;
}
}
...
// after line 40
if (!$inlinehelpButtonLoaded) {
$descClass = 'hide-aware-inline-help';
}
But this is not the proper approach since the file is loaded multiple times during one request. It would be better to set it as an option in \Joomla\CMS\Form\FormField::renderField
.
Even better would be to fix the actual bugs that I created
@Kubik-Rubik This is exactly what i thought, and why i was wondering if a "clean" way to get the option...
But you put me on a possible way, so i will open a PR! ;-)
Thanks!
I've created a PR #37819 to fix display of description.
@brianteeman @Kubik-Rubik @richard67 @Kostelano @ReLater @ChristineWk
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-05-17 12:25:47 |
Closed_By | ⇒ | richard67 |
While I was looking for a problem, 4.1.3 came out. The problem is the same there.