When you hover over a tag, the number that appears is the weighting of that tag, not the actual number of items that are tagged with that. This is not really what one would expect.
*** Bug 8157 has been marked as a duplicate of this bug. ***
I plan to make a syspref that'll allow this to be turned off.
Created attachment 9785 [details] [review] Bug 7642 - OpacShowTagCloudWeight system preference This system preference allows the mouseover text on the tag cloud to be turned off. The text consists of the weight for the tag, but users are more likely to confuse it with the number of items that have this tag.
This will apply to the 3.6 (and I guess 3.8) branches happily enough, just with easy-to-fix conflicts due to changes in the prefs and database files.
Adding a preference for this seems like overkill to me. Why not either make the number represent the actual number of items tagged or remove the title attribute altogether?
I agree with Owen here - it seems like it's confusing how it is now and I would really like a way to show the number of titles associated with a tag.
Making it reflect the real number of items is hard, you have to do a whole nother set of queries to account for multiple people tagging the same thing the same. Removing it totally is obviously easy, but I didn't want to remove that option in case there were people that liked it. Basically, I didn't want to remove an existing "feature."
Created attachment 10028 [details] [review] [SIGNED-OFF] Bug 7642 - OpacShowTagCloudWeight system preference This system preference allows the mouseover text on the tag cloud to be turned off. The text consists of the weight for the tag, but users are more likely to confuse it with the number of items that have this tag. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as advertised, tiny change to the HTML output.
Leaving decision to QA team and RM.
(In reply to comment #9) > Leaving decision to QA team and RM. RM fully agreeing with owen & katrin & is happy to see he's not the only member of FAUSP ("Fighters Against Useless System Preferences") let's go to disabling this option : if the number is confusing (and I agree it is), just remove it !
Alrighty then, I'll modify it to do so.
Created attachment 10111 [details] [review] Bug 7642 - remove the cloud weight from the tags
Created attachment 10123 [details] [review] signed off patch
QA comment: tiniest patch ever maybe, but I've a doubt. In opac-tags.pl, there is still some references to cloudweight field that you remove from the template (and is no more used in the template), for example: $_->{cloudweight} = $strata; I'm not sure I'm right, so I let someone else investigating and confirming or infirming. Not changing QA status for now.
cloudweight looks to be an attempt to cluster the various weightings of terms into strata groups, 1 through 5. This isn't even the tag's raw weight, just it's relative weight projected to a 5 point scale. I don't think this is worth keeping, as it does nothing to inform the patron about anything they can actually use. Marking this as Passed QA, as it's perfectly valid code, and that it removes is okay (by my opinion) to remove.
Pushed to 3.8.x, will be in 3.8.3
I've found this causes a regression: the tags no longer display in their correct size, they all appear the same, as the value in the 'title' field was used by javascript to calculate the font-size attribute. I'm hoping to get this fixed in not too long.
Also, the size calculation logic should probably get moved to template toolkit rather than javascript.
Created attachment 10986 [details] [review] Bug 7642 - fix the lost display of tag sizes This fixes the display of different sized words for differently popular tags. It is a bit of a refactor of that part of the system, moving logic to more sensible places (and removing an unused method on the way.) Note that it isn't an attempt to reproduce what was there previously, just to do something similar, and in an easier to change fashion. Sponsored-By: New Zealand Educational Institute
This should be applied on top of the previous patch.
Created attachment 10987 [details] [review] Bug 7642 - fix the lost display of tag sizes This fixes the display of different sized words for differently popular tags. It is a bit of a refactor of that part of the system, moving logic to more sensible places (and removing an unused method on the way.) Note that it isn't an attempt to reproduce what was there previously, just to do something similar, and in an easier to change fashion. Sponsored-By: New Zealand Educational Institute
This one just removes some CSS stuff that wasn't supposed to be there.
Created attachment 10988 [details] [review] Bug 7642 - fix the lost display of tag sizes This fixes the display of different sized words for differently popular tags. It is a bit of a refactor of that part of the system, moving logic to more sensible places (and removing an unused method on the way.) Note that it isn't an attempt to reproduce what was there previously, just to do something similar, and in an easier to change fashion. Sponsored-By: New Zealand Educational Institute
For serious this time.
The first patch no longer applies for me.
Oh never mind, the first one was already pushed.
*** Bug 8445 has been marked as a duplicate of this bug. ***
Same problem with the follow-up patch. Does not apply. Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y Applying: Bug 7642 - fix the lost display of tag sizes fatal: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 7642 - fix the lost display of tag sizes
I had the same error as well and do not know how to resolve it: Applying: Bug 7642 - fix the lost display of tag sizes fatal: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Marc
Created attachment 12014 [details] [review] Bug 7642 - fix the lost display of tag sizes This fixes the display of different sized words for differently popular tags. It is a bit of a refactor of that part of the system, moving logic to more sensible places (and removing an unused method on the way.) Note that it isn't an attempt to reproduce what was there previously, just to do something similar, and in an easier to change fashion. Sponsored-By: New Zealand Educational Institute
I think the issue was that I'd based it off a branch that you didn't have, and so it couldn't do 3-way merge when it found a conflict. Try this, which is based off current master.
Created attachment 12022 [details] [review] [SIGNED-OFF] Bug 7642 - fix the lost display of tag sizes This fixes the display of different sized words for differently popular tags. It is a bit of a refactor of that part of the system, moving logic to more sensible places (and removing an unused method on the way.) Note that it isn't an attempt to reproduce what was there previously, just to do something similar, and in an easier to change fashion. Sponsored-By: New Zealand Educational Institute Signed-off-by: Marc Veron <veron@veron.ch> Works as expected.
QA Comments: - Remove an unused routine (rectify_weights) - Simplify tag weight management - add UT not blocker: - add a tabulation character in C4/Tags.pm (but a lot of already exist) - useless "use Data::Dumper" in Tags.t Marked as Passed QA.
*** Bug 8814 has been marked as a duplicate of this bug. ***
Some comments: * the patch does not apply anymore Applying: Bug 7642 - fix the lost display of tag sizes Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/opac-tmpl/prog/en/css/opac.css CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/prog/en/css/opac.css Auto-merging C4/Tags.pm CONFLICT (content): Merge conflict in C4/Tags.pm Failed to merge in the changes. Patch failed at 0001 Bug 7642 - fix the lost display of tag sizes When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Patch left in /tmp/SIGNED-OFF-Bug-7642---fix-the-lost-display-of-tag--OPHe1P.patch * you should add the css to ccsr theme * this patch is attached to 7642, but it's not really a follow-up of the previous part, shouldn't it be another bug number ?
Created attachment 12604 [details] [review] Bug 7642 - fix the lost display of tag sizes This fixes the display of different sized words for differently popular tags. It is a bit of a refactor of that part of the system, moving logic to more sensible places (and removing an unused method on the way.) Note that it isn't an attempt to reproduce what was there previously, just to do something similar, and in an easier to change fashion. Sponsored-By: New Zealand Educational Institute Signed-off-by: Marc Veron <veron@veron.ch> Works as expected.
Rebased against master, added CSS to ccsr theme, fixed Jonathan's QA comments.
Oh, it probably could have got its own bug number, but I thought it was going to be a simple followup when I started it.
Comment on attachment 12022 [details] [review] [SIGNED-OFF] Bug 7642 - fix the lost display of tag sizes this patch obsoleted by the rebased one
Patch pushed to master, on master branch directly The QA tools have detected a mistake in POD doc (that was here before this patch), I've fixed it too
This wont apply to 3.8.x please rebase if it is needed there.
Created attachment 12626 [details] [review] Bug 7642 - [3.8.x] fix the lost display of tag sizes This fixes the display of different sized words for differently popular tags. It is a bit of a refactor of that part of the system, moving logic to more sensible places (and removing an unused method on the way.) Note that it isn't an attempt to reproduce what was there previously, just to do something similar, and in an easier to change fashion. Sponsored-By: New Zealand Educational Institute Signed-off-by: Marc Veron <veron@veron.ch> Works as expected.
Rebased against 3.8.x
Pushed to 3.8.x, will be in 3.8.6