Closed axelboc closed 2 months ago
/approve
I could refactor the visualization detection code so it allows fetching dataset values. The downside is that it will trigger the suspense fallback that wraps the whole Visualizer. I guess it's okay as long as we fetch only datasets that contain metadata and not actual data... Any thoughts @loichuder?
I think it is fine as it is for several reasons:
type
Fix #1603
Nothing crazy, but there is a subtlety: the MIME type is stored in a dataset and not an attribute (:shrug:), which means that with our current architecture, we don't have access to it when looking for supported visualizations. We can only detect that the group has
NX_class=NXnote
, renderNxNoteContainer
, and only then fetch the values of thedata
andtype
datasets. So if the MIME type is not JSON, we get:When ideally, it would be nicer to show the default fallback (without the NX Note tab):
I could refactor the visualization detection code so it allows fetching dataset values. The downside is that it will trigger the suspense fallback that wraps the whole
Visualizer
. I guess it's okay as long as we fetch only datasets that contain metadata and not actual data... Any thoughts @loichuder?