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

Fix Dataset Release Page #840

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Fix Dataset Release Page #840

wants to merge 28 commits into from

Conversation

nafiz1001
Copy link
Contributor

No description provided.


return Response(self.get_serializer(Dataset.objects.get(pk=pk)).data)
return Response(status=204)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you removed the return of the data that was updated? what is the reasoning?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error messages are not caught in the front end (the operation fails silently in the console).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just felt it was pointless to respond with a dataset if the frontend is never using it anyway.
I should look into catching the error.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well you should at least tell that there was an error ... if you remove the line to set released_by it does fail; it just does not show anything on the frontend side.

[ReleaseStatus.AVAILABLE]: ReleaseStatus.RELEASED,
[ReleaseStatus.RELEASED]: ReleaseStatus.BLOCKED,
[ReleaseStatus.BLOCKED]: ReleaseStatus.RELEASED,
} as const
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont understand the "as const" at the end of these const defined variables.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouff, im looking into this file and i understand what ulysse meant in terms of complexification of the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readset release management is complex 🥹

dispatch(ReadsetTableActions.listPage(1))
dispatch(ReadsetTableActions.resetPagedItems())
dispatch(ReadsetTableActions.setFixedFilter(createFixedFilter(FILTER_TYPE.INPUT_OBJECT_ID, 'dataset__id', dataset.id.toString())))
dispatch(ReadsetTableActions.listPage(1))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

careful with this piece of code, i believe this function launches a second api call to fetch the current page list

@UlysseFG
Copy link
Collaborator

This seem to be working well. I am worried that there is no way even for an admin to reset the status to available. This mean mistakes by PMs will force curations. I would prefer this not being the case. It would be great for admins to have a button to reset all readset in a dataset to available as a way to prevent time consuming curations.

@UlysseFG
Copy link
Collaborator

One last thing ... Maybe it might be nice to have a small note to mention the user need to release or block all readsets to save the change. Not sure if people will wonder why they can't save if they just click individual readsets status.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, i believe i understand the complexity of the task itself, although from it looks like, you took a backend approach to a more or less complicated frontend issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wrote some comments on my side, we can discuss them tomorrow if you want

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

Successfully merging this pull request may close these issues.

3 participants