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.

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

claudiu.cristea’s picture

Issue summary: View changes
claudiu.cristea’s picture

Issue summary: View changes
borisson_’s picture

Status: Postponed » Active

The issue this was postponed on has been committed, so back to active.

dragos-dumi’s picture

Assigned: Unassigned » dragos-dumi
dragos-dumi’s picture

StatusFileSize
new5.37 KB

Attached 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.

dragos-dumi’s picture

Assigned: dragos-dumi » Unassigned
Status: Active » Needs review
Issue tags: +Needs tests

Status: Needs review » Needs work

The last submitted patch, 7: facets-show-more-config-2725499.patch, failed testing.

The last submitted patch, 7: facets-show-more-config-2725499.patch, failed testing.

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new3.93 KB
new9 KB

Fixes unit test + start of the javascript test. But it looks like that won't work.

Status: Needs review » Needs work

The last submitted patch, 11: make_show_more_show-2725499-11.patch, failed testing.

dillix’s picture

@borisson_ is there a way to programmatically change Show more/Show less labels?

borisson_’s picture

@dillix: not without finishing this patch. It's possible to do by overwriting the javascript that currently adding the labels.

borisson_’s picture

StatusFileSize
new9.61 KB

Reroll + green unit tests.

borisson_’s picture

Status: Needs work » Needs review

Go testbot, run them tests.

Status: Needs review » Needs work

The last submitted patch, 15: make_show_more_show-2725499-15.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

borisson_’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new3.41 KB
new11.07 KB

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.

Status: Needs review » Needs work

The last submitted patch, 18: make_show_more_show-2725499-18.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new1.65 KB
new11.17 KB

Status: Needs review » Needs work

The last submitted patch, 20: make_show_more_show-2725499-20.patch, failed testing. View results

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new1.49 KB
new10.95 KB

Status: Needs review » Needs work

The last submitted patch, 23: make_show_more_show-2725499-22.patch, failed testing. View results

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new513 bytes
new10.91 KB

Status: Needs review » Needs work

The last submitted patch, 25: make_show_more_show-2725499-24.patch, failed testing. View results

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new3.07 KB
new11.72 KB

Proper indenting in the js + fixes the test.

strykaizer’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Vienna2017

  • StryKaizer committed b1003c9 on 8.x-1.x authored by borisson_
    Issue #2725499 by borisson_, dragos-dumi, StryKaizer: Make 'Show more'/'...
strykaizer’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.