User tests: Successful: Unsuccessful:
Pull Request for Issue #42376 , #38835 .
redo of #42765 for sql custom field
add a new plugin to allow the user to set max render and max result for content category fancy list:
issue 42376 - Backend : Articles ->Category-Filter
issue 38835 - New Article - Select Category
- Category List filter
pr 42765 - allow to set max render and max result for fancy list on custom sql field
create more than 10 content category with same prefix something like
apply the pr ,discover the new plugin or use the prebuild package
enable the plugin and set max render more than 10
you cannot see more than 10 result
you can set how many result to render
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Unit Tests Repository Administration com_admin SQL Postgresql com_associations com_banners |
Labels |
Added:
Unit/System Tests
PR-5.2-dev
|
Category | Unit Tests Repository Administration com_admin SQL Postgresql com_associations com_banners | ⇒ | Administration com_fields Language & Strings Front End Plugins |
Labels |
Added:
Language Change
PR-5.3-dev
Removed: Unit/System Tests |
Category | Administration com_fields Language & Strings Front End Plugins | ⇒ | SQL Administration com_admin Postgresql com_categories com_fields Language & Strings Installation Libraries Front End Plugins |
Labels |
Removed:
PR-5.2-dev
|
Title |
|
the plugin as it is for now works only on Articles List View and on New Articles i'll check for the category list later
the max render can be tested setting for example 5 in the plugin settings and check that are rendered only 5 category items not all as before
I think it does not make sense to introduce a system plugin to allow changing the attributes of these fields. If changed are needed, add these attributes directly to the field definition instead.
I have tested this item ✅ successfully on 06ae85a
I think it does not make sense to introduce a system plugin to allow changing the attributes of these fields. If changed are needed, add these attributes directly to the field definition instead.
should be more easy for an end user to change the settings in this way imho
Having a system plugin for this like this is expensive. I think we need to figure out what would be the best default value for these attributes, and adjust the fields to use it.
A plugin like this, should not be part of the core. If it is needed, it should be a third party plugin.
I agree with @joomdonation use of the plugin for this is overkill, it fine in personal project, but not for core.
However if you think that 10 is not enough, you can just add data-max-results="20"
(or any other amount, that you think is sufficient) in all core category filters .
That would make more sense
I do not know the internal of that script, but I think we have to choices here :
Option 1: Adjust the default value for these attributes in the script (for example, 20) so that it is used for all. Then we are done.
Option 2: Find all the fields which need this adjustment, then add data-max-results="20"
to these fields. And in that case, the changes you did in the field plugins could be kept
@Fedik Do you have any idea about it? Would love to have your feedback here so that we can have the issues sorted.
@joomdonation the default values are set here
I am fine with any: can be changed the default value, so it will be applied globally, or can be edited the attribute in each field xml where it is need.
In this case, I would go with the global approach. Then later, if people needs more flexible options, we can add the attributes to each field need it and introduce settings to field plugins later.
@alikon Could you please change default value as @Fedik suggested? Note that I do not know what would be the right default value as I did not follow the issues from the beginning. Ping @angieradtke for suggestion if needed.
The problem as reported by @angieradtke is that there will never be a default value that can satisfy every use case
in that way you are always hard-coding a default value, that can be good or not depending on use case, and hard for an end user to suite their needs in an easy way, anyway.... i'll respect the final decision and in case i'll convert it as a non core plugin
The problem as reported by @angieradtke is that there will never be a default value that can satisfy every use case
Even if we add these attributes to the fields, we still face the same issue. We can only use a best default value. Then for people need to adjust it, they can use the third party plugin. Or maybe just implement an override to the layout ?
I think around 20-30 should be good enough.
I do not thinks that anything bigger than 50 makes sense.
maxRender
should stay -1
, as it is for "no limit" https://github.com/Choices-js/Choices?tab=readme-ov-file#renderchoicelimit
hmhm, or maybe set maxResults
to no limit also, with -1
Why does it need a plugin - can it not simply be a value that you define in the component options
Why does it need a plugin - can it not simply be a value that you define in the component options
I assume you want to add it to options of categories component, that would only solve the issues for categories field, not other fields which use fancy select layout. And I don't know if it is really needed to have the option.
I dont see the need either. Its a very edge case that @angieradtke had
more i look at this more i think it should be as much more simple, as @Fedik already suggested just set a default for searchResultLimit: parseInt(this.select.dataset.maxResults, 50) || 50,
should be more than enough even for edge cases (50)
sorry for the noise and thank you all for the brain-storming
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-02-11 11:59:06 |
Closed_By | ⇒ | alikon |
@alikon
Max Results
change the showing Results, but how to testMax Render
?