Show the number of Coveo results in facets within brackets

Last Thursday evening out of the blue, the client asked to see the result count inside of brackets. It is a very intuitive feature that gives the searcher an indication of the big picture when searching and filtering.

The PROBLEM:


The ASK:

We were using the Coveo Atomic component, but there was no reason to not show the results inside brackets as it was the default behavior anywhere else. After much debugging, there was no indication of why the numbers were not within brackets but the client wants what the client wants. so, we took a short and simple way of implementing it using CSS.

.coveo {
  .coveo-facet-value-count:before, .coveo-facet-value-count:before {
    content: "(";
  }
}

This solved all our problems and the client lived happily ever after.

~ Unless you are easily worried about everything, try not to stress. ~

Leave a comment