codesandbox-client
codesandbox-client copied to clipboard
Sandbox folders should show the total sandboxes and not just the 1st level sandboxes
🌈 Feature
Sandbox folders should show the total sandboxes and not just the 1st level sandboxes, Currently, nested sandboxes within sub-folders are not part of the number of sandboxes shown beside the folder name.
We can calculate the sandboxes on the front end or get the same from the API.
I can open a PR for this if we chose to calculate them on the frontend using the path property
For folders with /CSS
in the path, the count of them will be added and the total count will be shown for the "CSS" folder.
{
"data": {
"me": {
"collections": [
{
"id": "8d3a2ea4-e5ca-4a8c-abe2-a04593fddf3c",
"path": "/CSS",
"sandboxCount": 7
},
{
"id": "db85311a-67b0-4833-9400-891a3e0dd620",
"path": "/CSS/examples",
"sandboxCount": 1
},
{
"id": "543acbc0-6b5e-458f-bb09-931c4a7209ef",
"path": "/CSS/overflow",
"sandboxCount": 0
},
{
"id": "0ed3de54-0d3b-4ddd-ac88-4cd79fa76964",
"path": "/CSS/tutorial",
"sandboxCount": 4
},
]
}
}
}
Over here the total Count will be : 12.
Thanks for raising this @infinite4evr - I've raised it as a bug on our end!