A Rounding Boundary Sheet for Product Dimension Filters
A shopper filters for items up to 30 cm wide and sees a product labelled 30 cm. Another product labelled 30 cm is missing. Both display the same number, yet one stored value is 29.96 and the other 30.04. Rounding for display while filtering on the raw value can leave shoppers puzzled. This article proposes a boundary test grid you could use to decide and verify how a dimension filter treats rounded values. It is a design suggestion, not a statement about any existing system.
Decide the rule first
There are three coherent choices.
- Filter on the raw value and show enough precision that the display cannot contradict the result.
- Filter on the displayed, rounded value, so what the shopper sees is what is tested.
- Filter on the raw value but state the rule near the filter, for example that sizes are rounded for display.
Pick one on purpose and write it down. The risk lies in having different parts of the site apply different rules without anyone choosing that.
The raw-value display-value boundary grid
For each filter you offer, build a grid with one row per test value:
- raw_value
- display_value (as the product page shows it)
- filter threshold
- operator: up to and including, or below
- expected_result under your chosen rule
- actual_result
- match: yes or no
Choose test values just below, on and just above each threshold, plus values that sit at rounding edges. For a 30 cm threshold displayed with no decimals, useful raw values are 29.49, 29.5, 29.96, 30.00, 30.04, 30.49, 30.5 and 30.51. Also include the unit conversion case if you show both centimetres and inches, as a value near a threshold in one unit can sit on the other side in the other.
Hypothetical worked example
Suppose a shop chooses rule 1 and shows one decimal place. The filter is width up to 30 cm, inclusive. Three test products have raw widths 29.96, 30.00 and 30.04. They display as 30.0, 30.0 and 30.0. Expected: first two included, third excluded. The third row displays 30.0 yet is excluded, which looks inconsistent. The team's options are to show two decimals, to switch to rule 2, or to add a note. They choose two decimals, so the display reads 30.04 and the exclusion is visible. They re-run the grid and every row matches.
Branching choices
If product data is entered with at most one decimal place, boundary conflicts should be rare, and the grid can be short. If data comes from suppliers with many decimals, treat the grid as essential. If the same value feeds a sort order, test sorting too, since two items with the same displayed number may appear in an order that seems arbitrary.
Stop conditions
Stop and revise the rule if any row shows a displayed value inside the filter range but the product excluded with no visible explanation, or a displayed value outside the range yet included. Stop if you cannot find which stored value the filter reads. Stop if inclusive and exclusive operators are not clear to the person writing tests.
Acceptance checks
- Every grid row has expected and actual values and a match.
- Each threshold has at least one test below, on and above.
- The same grid passes in every unit the shop displays.
- The filter label states the operator in plain words, such as up to and including.
- A fresh reviewer, given only the sheet, can predict the results without asking.
The grid cannot make rounding disappear. It makes the rule explicit, so shoppers do not meet a number that seems to contradict the list they are looking at.