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

NMR #214

Merged
merged 88 commits into from
May 21, 2024
Merged

NMR #214

merged 88 commits into from
May 21, 2024

Conversation

p3rcypj
Copy link

@p3rcypj p3rcypj commented Nov 28, 2023

📌 References

📝 Implementation

Added NMR Dialog with a list of the NMR fragments of each Target. Added two loaders and a pagination. On first glance, a simple request is made to retrieve the 25 first fragments and the count of them to be able to build the pagination. Later, each time the page is changed, it will trigger a new request to the API. An "Export all fragments" function has been added: it will first get the pagination count, in order to build all the needed requests to fullfill all the fragments of the target sequentially.

🎨 Screenshots

image

🔥 Testing

Please note the feature of being able to cancel the "export all fragments" request.

image

@p3rcypj p3rcypj requested a review from tokland April 15, 2024 09:41
Copy link

@tokland tokland left a comment

Choose a reason for hiding this comment

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

The code looks very good! Just some comments line:

app/assets/javascripts/3dbio_viewer/package.json Outdated Show resolved Hide resolved
}

saveNMRTarget(target: NMRFragmentTarget) {
const targetKeys = ["name", "uniprotId", "start", "end", "fragments"];
Copy link

@tokland tokland Apr 16, 2024

Choose a reason for hiding this comment

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

This save does not belong to NMRApiRepository, note how we are not using the api. In the past, we'd create some export repository + a JSON data implementation. However, Jorge's advice is not to have import/export features as repositories, instead do it in the presentation (webapp, script) layer. So the use case simply gets the entity values (getNMRTarget) and the generation of the JSON+save is done in the react app (to keep it clean, in a different file, but in the presentation layer)

@p3rcypj p3rcypj changed the base branch from development to feature/api-structural-hub May 6, 2024 09:10
@adrianq adrianq merged commit de2e4fa into feature/api-structural-hub May 21, 2024
1 check failed
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