dandi / dandi-archive

DANDI API server and Web app
https://dandiarchive.org
13 stars 9 forks source link

Older published Dandiset version is displayed on the `Public Dandisets` page instead of the updated `Draft` version #1964

Open kabilar opened 2 months ago

kabilar commented 2 months ago

When viewing the Public Dandisets page, the latest published version of a Dandiset is displayed. This behavior is expected except in the cases where the Draft version is updated, then I would expect the Draft version to be displayed.

As an example on DANDI Staging, DANDI:213794 has a published version from May 7 and an updated Draft version from May 20. On the Public Dandisets page, we see the older May 7 version:

image

Related issue:

Thank you

waxlamp commented 3 weeks ago

I believe the existing behavior is correct, even though the draft version is "more recent" than the most recent published version. The rationale is that a published version, when one exists, should always be considered the public face of the Dandiset, even if it is currently being worked on.

However, we have never actually made this rationale official. I would like thoughts from @satra, @yarikoptic, @jjnesbitt, and @mvandenburgh. My own thought is that the existing behavior is correct, but that it might be useful to have a link in the main listing that goes straight to the draft version in case the draft version is more recently updated.

yarikoptic commented 3 weeks ago

yeah, I think we can keep this as official/desired behavior since Draft indeed could be "broken" (not even validate etc). But also relates to

And if there is no more recent Draft, may be not even show it at all?

kabilar commented 3 weeks ago

Thanks team. Sounds good.

...that it might be useful to have a link in the main listing that goes straight to the draft version in case the draft version is more recently updated.

so we might want to add explicit statement that there is a more recent Draft.

I agree.

Follow up thought. With the existing behavior, the default Sort By option (i.e. Modified) on the PUBLIC DANDISETS page only sorts based on the published version and not the updated draft version (if a published version exists and the draft version is updated). This does not seem intuitive to me. What do you think? I can file this as a separate issue if we need to.

yarikoptic commented 3 weeks ago

nice observation. BTW do you have a current example dandiset (with draft ahead and thus should be sorted differently)?

I feel that sorting should be by the modified (so "draft" if that what was modified last, or released version date if after draft), and we should just make it explicitly marked that there are changes after release: so clicking on it would go to DLP for the release but with that label that draft is ahead. So it would be 2 clicks to get to the most recent draft'y version