User tests: Successful: Unsuccessful:
No limit if tag form field mode is set to nested.
Whatever mode tag form field value, a limit to 30 elements is set in libraries/src/Form/Field/TagField.php (line 133) and isRemoteSearch is set to true : general parameter tag_field_ajax_mode is set to 1 as default value.
Create more than 30 tags
Create a Tags - Popular module
Set up its parameters
In tags - popular module, Parent Tag parameter only shows 30 tags.
In tags - popular module, Parent Tag parameter list shows all available tags
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I do need all tags to be displayed in my modules, so the user selects which ones are to be displayed.
It maybe not necessary in Popular tags module that I took as an example to show the issue.
isRemoteSearch is enabled and the limit to 30 is set even if you defined mode=nested in your xml. They depend from the general parameters and ignore what you defined in your module's xml file.
With both values (ajax and nested), you'll have the 30 tags limit which does not make sense.
When looking at documentation https://docs.joomla.org/Tag_form_field_type , i don't see any limit.
so the user selects which ones are to be displayed.
User already can do that: type for search.
It maybe fine to display all when you have a few tags, but when you have a couple hundreds, then removing the limit it is a bad idea.
It maybe not necessary in Popular tags module
It used everywhere: Article editing, Content filter, some content modules
With both values (ajax and nested), you'll have the 30 tags limit which does not make sense
It a limit of initial tag rendering, it basicaly show top most used tags on the site on initial rendering. But it not a limit for User.
As I already told, User can search needed tag with: typing for search
Why display an uncomplete tags list ?
Because we have autocomplete search. Why we should pull all tags on first load, and slow down rendering?
you have to know available tags names to access these information.
Well, if you try to type what you need, you will get a suggestions, or you will get nothing ;)
you have to know available tags names to access these information.
Well, if you try to type what you need, you will get a suggestions, or you will get nothing ;)
Do you remember all the tags names you created ? I don't (maybe I'm getting too old)
Did I misunderstand what to expect from "mode=nested" in xml ?
My choice is "nested" but it's ignored (same choice in mod_tags_popular.xml)
Do you remember all the tags names you created ? I don't (maybe I'm getting too old)
No one remamber that ;)
But if you want to enter "Potato", you will start enetring "potato", and will get (or not) a suggestions.
Displaing All does not solver this issue, you still have to search and check if you have it or not.
Btw, you can try to make a PR to make the limit configurable, I think that will be more appropriate. But I cannot guarantee that it will be accepted by others, just an alternative idea ;)
Did I misunderstand what to expect from "mode=nested" in xml ?
It just some kind of formating, how to display the options in the list
thank you for your explanations,
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-10-01 12:40:10 |
Closed_By | ⇒ | conseilgouz | |
Labels |
Added:
?
|
For information, I found an undocumented option to fix my issue : add remote-search="false" in xml for my tag field.
This overrides ajax general parameter, all my tags are displayed in nested mode (which is my choosen mode, in xml file ).
It becomes :
<field name="tags" type="tag" label="SSISO_TAGS" description="SSISO_TAGSDESC" mode="nested" multiple="true" custom="deny" remote-search="false"/>
Sorry it is a bad changes.
You do not need to load all tags, the field support "search while typing" when isRemoteSearch is enabled. So you can search your tag already (even when it not loaded in first 30 items).