-
Notifications
You must be signed in to change notification settings - Fork 18
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
Collection thumbs #125
Collection thumbs #125
Conversation
This was only a TEMP format and never made it to the HCS spec. HCS images are now /plate/A/1/0/ and the acquisition is not included in the URL
Re-opening this PR with a view to updating it to support |
Something has probably changed since I had this running previously, but now I can't get Thumbnails to render And also hit a blocker trying to fix
|
Should be able to have a look in the next day or so. My guess is that there are some changes to state organization that merging might have messed with. |
Hi will, as for the second type error:
The issue is that the type gaurd: if ('images' in sourceData && sourceData["images"].length > 0) {
// This is a Collection Doesn't sufficiently narrow the type. There is a case where if ('images' in sourceData) {
// This is a Collection Typescript could appropriately narrow correctly infer |
@will-moore, The |
Thanks @manzt - I'm away for rest of this week but will take a look ASAP... |
Hi @manzt - Unfortunately I have no clue how to fix:
That line didn't change in this PR, so I'm not sure where to start...? |
Hi will, the issue is that this PR widens the return type of // previously SourceData, now SourceData | CollectionData
const sourceData = await createSourceData(config); TypeScript is forcing you to handle each case ( const sourceData: SourceData | CollectionData = { images: [], /* ... */ }; // we know this is a collection, but TS does not yet
if ('images' in sourceData && images.length > 0) {
sourceData // CollectionData, we know this can only be CollectionData
setCollectionState(sourceData);
return;
};
sourceData // SourceData | CollectionData! source data _or_ collection with empty image list The issue is that the guard
const sourceData: SourceData | CollectionData = { images: [], /* ... */ }
if ('images' in sourceData) {
sourceData // CollectionData
setCollectionState(sourceData);
return;
};
sourceData // SourceData since the above captures _all_ instances of CollectionData |
Got it! Thanks for the explanation @manzt |
See #149 (comment) |
This is not even a draft PR, but just me learning and exploring options for viewing a collection. (See #123 and #124).
Very rough - barely working at this stage; just pushing as part of the discussion...
But locally I managed to view this collection https://minio-dev.openmicroscopy.org/idr/v0.3/datasets/idr0062/8dc4707/7754.zarr
which has only 11 images but they are different sizes and can't be viewed by #124
(From Dataset at http://idr.openmicroscopy.org/webclient/?show=dataset-7754)