Postponed on #2725453: Refactor widget plugins by adding interface, base class, schema
Problem/Motivation
Soft limit was introduced in #2724381: Port "Show more"/"Show less" functionality from D7. But the 'Show more'/'Show less' labels are hardcoded.
Proposed resolution
Make 'Show more'/'Show less' labels configurable per facets, meaning store them in the facet entity, inside widget_configs
Because facets.facet.*.widget_configs has no schema right now, the labels cannot be translated. So this issue is postponed on #2725453: Refactor widget plugins by adding interface, base class, schema.
Remaining tasks
None.
User interface changes
In facet admin, site builder is able to configure 'Show more'/'Show less' labels. Then labels can be translated with config translation.
API changes
None.
Data model changes
New soft limit configs for 'Show more'/'Show less' labels.
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | make_show_more_show-2725499-27.patch | 11.72 KB | borisson_ |
Comments
Comment #2
claudiu.cristeaComment #3
claudiu.cristeaComment #4
claudiu.cristeaComment #5
borisson_The issue this was postponed on has been committed, so back to active.
Comment #6
dragos-dumi commentedComment #7
dragos-dumi commentedAttached the patch to make them configurable. It needs also an integration test; maybe I'll make some time in the following days for tests.
If this gets committed, than this #2800507: Feature request: remember show more/less needs an update.
Comment #8
dragos-dumi commentedComment #11
borisson_Fixes unit test + start of the javascript test. But it looks like that won't work.
Comment #13
dillix commented@borisson_ is there a way to programmatically change Show more/Show less labels?
Comment #14
borisson_@dillix: not without finishing this patch. It's possible to do by overwriting the javascript that currently adding the labels.
Comment #15
borisson_Reroll + green unit tests.
Comment #16
borisson_Go testbot, run them tests.
Comment #18
borisson_I extended the test to make sure it actually tests the behaviour added here. I also fixed the failing kernel tests. I still can't get the js-test to pass though.
Comment #20
borisson_Comment #23
borisson_Comment #25
borisson_Comment #27
borisson_Proper indenting in the js + fixes the test.
Comment #28
strykaizerComment #30
strykaizer