@@ -16,6 +16,7 @@ import { formatToSec } from '../../UXMetrics/KeyUXMetrics';
1616import { SelectableUrlList } from './SelectableUrlList' ;
1717import { UrlOption } from './RenderOption' ;
1818import { useUxQuery } from '../../hooks/useUxQuery' ;
19+ import { getPercentileLabel } from '../../UXMetrics/translations' ;
1920
2021interface Props {
2122 onChange : ( value : string [ ] ) => void ;
@@ -26,7 +27,7 @@ export function URLSearch({ onChange: onFilterChange }: Props) {
2627
2728 const { uiFilters, urlParams } = useUrlParams ( ) ;
2829
29- const { searchTerm } = urlParams ;
30+ const { searchTerm, percentile } = urlParams ;
3031
3132 const [ popoverIsOpen , setPopoverIsOpen ] = useState ( false ) ;
3233
@@ -104,12 +105,17 @@ export function URLSearch({ onChange: onFilterChange }: Props) {
104105 setCheckedUrls ( clickedItems . map ( ( item ) => item . url ) ) ;
105106 } ;
106107
108+ const percTitle = getPercentileLabel ( percentile ! ) ;
109+
107110 const items : UrlOption [ ] = ( data ?. items ?? [ ] ) . map ( ( item ) => ( {
108111 label : item . url ,
109112 key : item . url ,
110113 meta : [
111114 I18LABELS . pageViews + ': ' + item . count ,
112- I18LABELS . pageLoadDuration + ': ' + formatToSec ( item . pld ) ,
115+ I18LABELS . pageLoadDuration +
116+ ': ' +
117+ formatToSec ( item . pld ) +
118+ ` (${ percTitle } )` ,
113119 ] ,
114120 url : item . url ,
115121 checked : checkedUrls ?. includes ( item . url ) ? 'on' : undefined ,
0 commit comments