Skip to content

Conversation

@axelboc
Copy link
Contributor

@axelboc axelboc commented Mar 14, 2025

As discussed, we end up with two fallback visualizations: one for scalar datasets and one for array datasets. If any other visualization is supported (e.g. Compound for printable scalar compound datasets), then Scalar vis is not shown.

I'm planning to clean-up the mock file and the tests a fair bit but didn't want to clutter this PR, which is already confusing because of all the files that are moved and renamed.

image image image
image image image

Note that the Scalar vis now has the ex-RawToolbar, now called ScalarToolbar, with the "Fit image" control and the ability to export to JSON.


{isImage ? (
<RawImageVis
<BinaryImageVis
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 renamed this visualization component, since the term "Raw" no longer makes much sense.

Comment on lines +49 to +55
return (val: unknown) => {
if (isTypedArray(val)) {
return `${val.constructor.name} [ ${val.toString()} ]`;
}

return JSON.stringify(val, null, 2);
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This takes care of formatting non-printable scalar values. This code was previously in RawVis.

@axelboc axelboc requested a review from loichuder March 14, 2025 15:53
@axelboc axelboc marked this pull request as draft March 18, 2025 07:56
@axelboc axelboc removed the request for review from loichuder March 18, 2025 07:56
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.

2 participants