You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show count of facet values if ?_facet_size=max #1423
Problem: on a page which doesn't have quite enough facet values to trigger the display of the "..." link that links to ?_facet_size=max the user would still have to manually count the values - up to 30 by default.
So maybe the count should always be shown, perhaps as a non-bold light colored number?
I could even hide it in a non-discoverable tooltip.
Point of confusion: if only 30 options are shown, but there's a ... at the end, what would the number be? It can't be the total number of facets because we haven't counted them all - but if it's just the number of displayed facets that's like to be confusing.
So the original idea of showing the counts only if _facet_size=max is a good one.
The invisible tooltip could say "Showing 30 items, more available" (helping save you from counting up to 20 if you know about the secret feature). The numbers could then be fully displayed on the "..." page.
This means that the counts would be unavailable to users who cannot see tooltips (e.g. mobile users) on pages that did not have any facets that broke the 30 limit and hence displayed that "..." link.
I think I'm OK with that, for the moment. May revisit in the future.
You've caused me to rethink this feature - I no longer think there's value in only showing these numbers if ?_facet_size=max as opposed to all of the time. New issue coming up.
Activity
simonw commentedon Aug 6, 2021
Problem: on a page which doesn't have quite enough facet values to trigger the display of the "..." link that links to
?_facet_size=maxthe user would still have to manually count the values - up to 30 by default.So maybe the count should always be shown, perhaps as a non-bold light colored number?
I could even hide it in a non-discoverable tooltip.
simonw commentedon Aug 6, 2021
Could display them always, like this:
That's with
<span style="font-size: 0.8em;color: #666;">23</span>simonw commentedon Aug 6, 2021
Point of confusion: if only 30 options are shown, but there's a
...at the end, what would the number be? It can't be the total number of facets because we haven't counted them all - but if it's just the number of displayed facets that's like to be confusing.So the original idea of showing the counts only if
_facet_size=maxis a good one.simonw commentedon Aug 6, 2021
The invisible tooltip could say "Showing 30 items, more available" (helping save you from counting up to 20 if you know about the secret feature). The numbers could then be fully displayed on the "..." page.
simonw commentedon Aug 6, 2021
This means that the counts would be unavailable to users who cannot see tooltips (e.g. mobile users) on pages that did not have any facets that broke the 30 limit and hence displayed that "..." link.
I think I'm OK with that, for the moment. May revisit in the future.
simonw commentedon Aug 16, 2021
I didn't bother with the tooltip, just the visible display if
?_facet_size=max.simonw commentedon Aug 16, 2021
Demo: https://latest.datasette.io/fixtures/compound_three_primary_keys?_facet=content&_facet_size=max&_facet=pk1&_facet=pk2
Release 0.59a2
Release 0.59
Release 0.59
plpxsk commentedon Dec 14, 2021
Great feature.
But what is the right way to enable this to show up? Currently, it seems I need to edit the URL to add, in the right place,
&_facet_size=maxIs there another (easier) way to enable this feature?
simonw commentedon Dec 15, 2021
You've caused me to rethink this feature - I no longer think there's value in only showing these numbers if
?_facet_size=maxas opposed to all of the time. New issue coming up.Always show count of distinct facet values, closes #1556