Optionally suppress badges in OPAC

Bug #1738064 reported by Jeff Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

It would be handy to have the option to enable or disable display of popularity and other badges in the OPAC. For example, a consortium with multiple OPAC skins may wish to display badges in some skins but not others; having a single setting in OPAC config for this would make life easier.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :
tags: added: opac pullrequest
Galen Charlton (gmc)
Changed in evergreen:
importance: Undecided → Wishlist
status: New → Confirmed
milestone: none → 3.next
Dan Wells (dbw2)
Changed in evergreen:
milestone: 3.next → 3.1-beta
Revision history for this message
Remington Steed (rjs7) wrote :

A quick note that the release notes have a mistake ("true" should be "false"):

"A new setting controls whether badges (popularity, etc.) are displayed in the
OPAC. If you do not wish badges to be displayed, set the `badge_scores.display`
setting to "true" in `config.tt2`."

Last sentence should be:

"If you do not wish badges to be displayed, set the `badge_scores.display`
setting to "false" in `config.tt2`."

Dan Wells (dbw2)
Changed in evergreen:
assignee: nobody → Dan Wells (dbw2)
Revision history for this message
Dan Wells (dbw2) wrote :

This looks like a good addition, but one small concern. I think it is generally better for backwards compatibility if unset == default behavior, i.e. they see the badges in the absence of any value being set for this option. In this case, we could simply change the test to:

badge_scores.display != 'false';

but I think it might read a little better to make it a 'hide' option instead, so:

badge_scores.hide != 'true';

The longer I think about it, the harder it is to tell which is more natural, so this second part is really no big deal either way, I think.

Jeff, what do you think?

Changed in evergreen:
assignee: Dan Wells (dbw2) → nobody
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Working branch user/jeffdavis/lp1738064-suppress-badges-2 has ctx.hide_badge_scores as the setting and ctx.hide_badge_scores != 'true' as the test. I think that gives us unset == default behavior in a readable way, which seems like a worthy objective.

Revision history for this message
Dan Wells (dbw2) wrote :

Looks good to me, and works fine. One last commit for 3.1. Thanks, Jeff!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.