Arturo Bernal created JSPWIKI-1353:
--------------------------------------
Summary: The bars of the relevance in the search results are not
proportional to the score
Key: JSPWIKI-1353
URL: https://issues.apache.org/jira/browse/JSPWIKI-1353
Project: JSPWiki
Issue Type: Improvement
Reporter: Arturo Bernal
Follow-up of JSPWIKI-1321 (pull request 575), from the review of Ulf Dittmer.
In the results of a search, each score is written as a span with the class gBar
inside a div with the class graphBars (templates/default/AJAXSearch.jsp), and
scripts/behaviors/GraphBar.js draws the bar. By default the smallest value of
the list gets a bar of 40 px and the largest one 440 px (the options offset 40
and size 400), and the other values are placed linearly between them. So the
length of a bar tells where a result is between the lowest and the highest
score of that list, and not what its score is.
In the screenshot of the review, the scores 100, 29 and 23 have bars of about
440, 71 and 40 CSS pixels, which is what that formula gives: 40 + (29 - 23) /
(100 - 23) * 400 = 71. The score 23 has a bar of 40 px, not 23% of the width.
The reviewer expects the length of the bar to be strictly proportional to the
value, so that a minimum that is barely visible reflects its low value.
To decide: change the search results page only, or GraphBar.js, which is also
what draws the graphBars of the wiki markup. I have not checked what else
depends on its default of 40 px for the smallest bar.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)