Attached patch allows for the title to be displayed. Since 'item_list' already has a "title", we can provide it via the settings from the facet UI

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

DrColossos created an issue. See original summary.

drcolossos’s picture

Status: Active » Needs review
StatusFileSize
new646 bytes
kristen pol’s picture

Status: Needs review » Needs work
Issue tags: +Needs manual testing, +Needs steps to reproduce, +Novice

Thanks for the issue and patch!

I'm working on creating a Drupal 9 release and am reviewing all "needs review" issues in the process.

Confirmed that the patch still applies cleanly and modifies:

src/Plugin/facets/widget/GlossaryAZWidget.php

as expected.

+++ b/src/Plugin/facets/widget/GlossaryAZWidget.php
@@ -43,6 +43,10 @@ class GlossaryAZWidget extends WidgetPluginBase implements WidgetPluginInterface
+    if($facet->get('show_title') === TRUE) {

Nitpick: Add space after the "if".

It would also be good to have steps for testing. Thanks!

kristen pol’s picture

Issue tags: +Needs screenshots

And screenshots :)

libbna’s picture

Assigned: Unassigned » libbna
libbna’s picture

Assigned: libbna » Unassigned
StatusFileSize
new1.07 KB

Added a space after if.

Steps for testing:

  • Cloned the repo - git clone --branch '8.x-4.x' https://git.drupalcode.org/project/search_api_glossary.git
  • cd search_api_glossary
  • downloaded the latest patch - wget 3154429-1-show-facet-title.patch
  • applied the patch - git apply path_of_the_patch_
  • added space after if
  • checked the drupal coding standards using phpcbf and phpcs commands.
  • and then created a patch git diff > space-in if-stmt-3154429-6.patch
libbna’s picture

Status: Needs work » Needs review
StatusFileSize
new24.04 KB

Adding a screenshot.

ruturaj chaubey’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new27.1 KB
new3.36 KB

The patch works fine.

laura.gates made their first commit to this issue’s fork.

kristen pol’s picture

Thanks for updating the patch @Libbna. When I asked for testing steps, I meant testing the functionality works with the patch :)

Since @Ruturaj Chaubey has tested and provided screenshots (thanks!) and this is such a simple change, I'll try to get it in now.

  • Kristen Pol committed e824845b on 8.x-4.x authored by Libbna
    Issue #3154429 by Libbna, DrColossos, Ruturaj Chaubey, Kristen Pol:...
kristen pol’s picture

Status: Reviewed & tested by the community » Fixed

This has been merged and will be part of this release: #3377587: Create 8.x-4.2 release.

kristen pol’s picture

Assigned: kristen pol » Unassigned
Status: Fixed » Closed (fixed)