Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NF: add number of subdatasets to dataset view and on each item in subdatasets tab #280

Closed
jsheunis opened this issue Apr 12, 2023 · 3 comments

Comments

@jsheunis
Copy link
Member

So that:

  • user can immediately see how many subdatasets without having to count the items in the subdatasets tab
  • does not have to click on a subdataset in order to see how many subdatasets it has in turn
@jsheunis
Copy link
Member Author

does not have to click on a subdataset in order to see how many subdatasets it has in turn

This will require a change with costs that we likely do not want to incur. Currently the following happens when entering a dataset page:

  1. try to fetch all of the dataset's subdatasets
  2. if success: mark subdataset as available and grab some subdataset metadata to store on dataset structure (name, authors, keywords, etc)
  3. if failure: mark subdataset as unavailable (i.e. it is listed as a submodule of the current dataset, but it does not have its own catalog entry)

With this process, we can count the number of subdatasets (both available and unavailable in the catalog). Note: I think it would make sense from a UX perspective to display the number of available datasets (not the total).

BUT, if we also want to display the number of subdatasets of each subdataset (i.e. in the list of subdatasets where we currently display subdataset name, authors, keywords, etc) we will have to recurse into subsubdatasets at step 2 above, and this might introduce unwanted delays, i.e. wait for info on a dataset page to load just because one of its subdatasets has a thousand subdatasets.

So unless we want to implement something else to achieve the same (e.g. run some service that routinely checks subsubdatasets and updates the number on all dataset entries correctly) I think we should not add the subsubdataset count.

However, showing the subdataset count of the current dataset is feasible, e.g.:

Screenshot 2023-04-13 at 16 12 45

@mih
Copy link
Member

mih commented Apr 14, 2023

It sounds like this is not worth the investment. I am not familiar enough with the processing logic, but it seems to make sense that such a "reach-down" would break encapsulation and make things more complicated.

@jsheunis
Copy link
Member Author

I agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants