Bug 33140 - Use facet label value in mouseover title attribute of facet removal link
Summary: Use facet label value in mouseover title attribute of facet removal link
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low trivial (vote)
Assignee: Andreas Jonsson
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-05 12:19 UTC by Andreas Jonsson
Modified: 2023-12-28 20:47 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.03,22.11.09


Attachments
Bug 33140 Use facet label value for mouseover text on facet removal link (2.66 KB, patch)
2023-03-05 12:22 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 33140: Use facet label value for mouseover text on facet removal link (3.44 KB, patch)
2023-07-26 15:49 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33140: Use facet label value for mouseover text on facet removal link (3.50 KB, patch)
2023-07-29 17:41 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jonsson 2023-03-05 12:19:36 UTC
The mouseover text for the remove link displays the link value of the facet rather than its label. (In koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc and koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc).

Logically, it is always the label value that should be displayed to the user so this should also be used for the title attribute.

For instance for a custom boolean valued facet one do not want to see the text "remove the facet true" when hovering on the link.  (See bug 33139.)
Comment 1 Andreas Jonsson 2023-03-05 12:22:58 UTC
Created attachment 147773 [details] [review]
Bug 33140 Use facet label value for mouseover text on facet removal link
Comment 2 Andreas Jonsson 2023-03-05 12:27:30 UTC
Test plan:

* Follow the test plan in bug 33139 but additionally add this patch
* Observe the mouseover text when hovering over the facet removal button of the E-resource facet (without patch the text will be "remove facet true/false")
Comment 3 Lucas Gass 2023-03-08 16:56:09 UTC
Andreas,

This one also looks like a good patch but lacks the proper commit message:


* Commit title does not start with 'Bug XXXXX: ' - 224750a113


If you can fix this I would be happy to sign-off.
Comment 4 Owen Leonard 2023-07-26 15:49:58 UTC
Created attachment 153927 [details] [review]
Bug 33140: Use facet label value for mouseover text on facet removal link

This patch updates the facets includes in both the staff interface and
OPAC so that the title attribute on "remove" links uses the full name
rather than the code of the facet. So, library name instead of
branchcode, collection code description instead of authorized value
code.

To test, apply the patch and perform a search in the staff interface.

- Click a facet in the left-hand sidebar which will return more than one
  result.
  - On the reloaded page there should be a link next to that facet: [X].
    Hovering your mouse over it should show "Remove facet [facet name]"
    e.g. "Remove facet Centerville" instead of "Remove facet CPL"
- Test on library facets, item type facets, and collection code facets.
- Perform the same test in the OPAC.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Owen Leonard 2023-07-26 15:50:31 UTC
I corrected the commit message and added the test plan. Everything worked as it should in my tests.
Comment 6 Katrin Fischer 2023-07-29 17:41:22 UTC
Created attachment 154056 [details] [review]
Bug 33140: Use facet label value for mouseover text on facet removal link

This patch updates the facets includes in both the staff interface and
OPAC so that the title attribute on "remove" links uses the full name
rather than the code of the facet. So, library name instead of
branchcode, collection code description instead of authorized value
code.

To test, apply the patch and perform a search in the staff interface.

- Click a facet in the left-hand sidebar which will return more than one
  result.
  - On the reloaded page there should be a link next to that facet: [X].
    Hovering your mouse over it should show "Remove facet [facet name]"
    e.g. "Remove facet Centerville" instead of "Remove facet CPL"
- Test on library facets, item type facets, and collection code facets.
- Perform the same test in the OPAC.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Tomás Cohen Arazi 2023-08-15 12:20:06 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-08-17 20:19:55 UTC
Pushed to 23.05.x for 23.05.03
Comment 9 Pedro Amorim 2023-08-18 13:45:59 UTC
Nice work everyone!

Pushed to 22.11.x for next release