Adding the Neuroglancer button
Test to integrate a button in the dataset page to view it with Neuroglancer. For now, the information needed for Neuroglancer is extracted from a local JSON file but I try to mimick as much as possible the code structure for the incoming API calls through IDS
It seems to work correctly, however, I am uncertain of the way I do it. It seems really heavy to me the way I did but I don't know how to do it differently
Merge request reports
Activity
requested review from @bocciare
assigned to @gaisne
- Resolved by Guillaume Gaisne
- Resolved by Guillaume Gaisne
- Resolved by Axel Bocciarelli
Ok ! I will go for TypeScript then.
I took Monday and Tuesday off so I will be back on Thursday next week !
I've pushed some changes:
- I'm now fetching the Neuroglancer JSON file with
useSWRImmutable
, so I've removed the local state in theNeuroLink
component. - I've tweaked the style of the Neuroglancer link so it looks the same as the Globus download link (except for the icon of course), and I've moved the button to the top, as I think they'll want to advertise this feature as much as possible.
- I've made sure that the mock JSON file is only added to the relevant dataset,
26.38um_complete_upper-lobe
, and only when fetching the dataset along with its files (i.e. when renderingDatasetPage
). - I've added tracking to the Neuroglancer link for good measure.
So basically, this is now deployable to production. I do recommend you give it another look before merging, though.
- I'm now fetching the Neuroglancer JSON file with
added 2 commits
mentioned in commit 24fc4f57