avo
avo copied to clipboard
Show distinct values on Index
A user has a field called status with multiple values.
We'd love to be able to click a button on the Index view and show all the values from the DB and how many are in which category.
@adrianthedev I'll try to tackle this one :)
It's yours! Looking forward to see how this looks like. Thanks!
I think we can tie this one very nicelt with the dynamic filetrs feature to further filyer the records down. But one step at a time
@adrianthedev I have the first draft for the design. I'd add a bar chart icon next to the column label, which will be clickable and then it will show a small box with the summaries in it.
Not sure if we should be allowing columns to be both sortable and "summarizable".
Let me know what do you think:
I think it's a good start. I've been thinking about how to "marry" all these actions (sorting, filtering, and distinct values).
Instead of limiting the user to just one button, or showing two of them (and maybe later getting into issues when we add a third action), we could add a dropdown like Airtable has to show all the actions one can do with that column.
What do you think about the approach?
If you're not comfortable with designing it, I can take over and make it a bit prettier after you submit the PR.
@adrianthedev Good idea. A similar solution, but simpler, you can find on Metabase:
I'll try to come up with something (probably during the weekend).
yes, the airbnb fropdown is a bit more advanced and we don't need it like that. Metabase has a good solution too!
What does the "Distribution" button do?
In their case it is a link a query with visualisation that shows you the distribution of the value, like this:
@adrianthedev Right now it looks like this:
Not sure what styling we want to apply inside there. I was also thinking about adding a pie chart inside, WDYT?
The pie chart might be a cool thing to have.
That looks cool.
This is how it could look with the pie chart. I'll need to tweak the integration between those two parts:
This looks great @bryszard. I'll move the convo to the PR and make sure we'll review it this week. Thank you!