Releases: silx-kit/h5web
v7.1.0
Full Changelog: v7.0.1...v7.1.0
🔍 H5Web now allows searching for datasets, groups and other entities in an HDF5 file by text.
👀 Keep an eye out for the next releases of jupyterlab-h5web, vscode-h5web and myHDF5, or check out one of the demos to see the feature in action!
@h5web/app
- ✨ Show search panel in sidebar when supported by provider (currently
H5GroveProvider
,H5WasmProvider
andMockProvider
) #1348 #1367 #1391 - ✨
< Heatmap, Line >
Support NetCDF's_FillValue
attribute to indicate missing data. When the attribute is set, the given value is ignored when computing the data domain and when rendering the line and heatmap visualizations. #1181 #1381 #1395 - 🐛
< Heatmap >
+Infinity
and-Infinity
no longer appear as transparent; they are now displayed with the lowest/highest colors of the selected color map just like any other under/over values #1372 #1374 - 🐛 Fix full-screen button when H5Web is integrated into a larger application, like JupyterLab #1365 #1383
- ⚡
< Line, Scatter >
Optimise creation and update of internal Three.js geometries and remove misleading error bars in case of negative error values #1390 #1393
@h5web/lib
- ✨
[HeatmapVis, LineVis, DataCurve]
Add propignoreValue
to allow ignoring values when computing the domain and rendering the heatmap/line visualization. The prop accepts a callback that is called for each value in the data array; if the callback returnstrue
, the value is ignored. #1381 - ✨
[HeatmapMesh]
Add optional propmask
, a uint8 ndarray that indicates which data values to mask (255
) and which to show (0
) #1395 - ✨
[HeatmapMesh]
Add propbadColor
, which defaults to transparent, to control the color used to displayNaN
and other bad values (i.e. values not supported by the selected scale, and values ignored via the newmask
prop) #1372 #1374⚠️ Note that the default colour for bad values used to be white.
- ✨ Stack elements that appear on top of the
canvas
(i.e. HTML/SVG elements, axis grid, tooltip, etc.) in the most predictable way possible, and document the new default stacking order and how to tweak it #1387⚠️ The parent container of the canvas (i.e. available from react-three-fiber's internal state viagl.parentElement
) now haspointer-event: none
, which means that overlays, annotations, SVG elements and other HTML elements that get appended to this container no longer respond to pointer events by default. You can therefore remove your ownpointer-events: none
declarations from those elements. For elements that are meant to be interactive, you can restore interactivity withpointer-events: auto
.
- 🐛
[HeatmapVis, HeatmapMesh]
+Infinity
and-Infinity
no longer appear as transparent ; they are now displayed with the lowest/highest colors of the selected color map just like any other under/over values #1372 #1374 [SelectToZoom, AxialSelectToZoom]
Add propminZoom
to allow changing the default minimum zoom size of 20px #1384[Toolbar]
Add propoverflowChildren
to forcefully render elements inside the overflow menu regardless of screen size #1378 by @PeterC-DLS[DomainSlider]
Add propdisabled
to disable the slider and tooltip #1385- New
SvgCircle
component #1389 [LineVis, DataCurve, ScatterVis]
Optimise creation and update of internal Three.js geometries and fix edge cases with error values <= 0 #1390 #1393[getDomain, useDomain]
Add optional parameterignoreValue
, a callback to ignore values from the domain computation #1381- Add CSS custom properties
--h5w-toolbar--height
and--h5w-btn--height
to control the height of the toolbar and toolbar buttons #1402
Experimental
[TiledHeatmapMesh]
Remove background mesh to keep canvas transparent where tiles are loading #1376
@h5web/h5wasm
- 🐛
[H5WasmProvider]
Fix support for unsigned 64-bit integers #1371 #1375 [H5WasmProvider]
Implement methodgetSearchablePaths
to support searching through entities in the viewer #1367
Screenshots
Search panel
Screencast.from.21-03-2023.17.00.24.webm
Ignore/mask values
Default stacking order
v7.0.1
Full Changelog: v7.0.0...v7.0.1
@h5web/lib
- 🐛
useCameraState
Fix regression introduced in v7.0.0 (PR #1361) and affecting cases where thefactory
function references external dependencies (i.e. props, state and other local variables) —useCameraState
would ignore changes to those dependencies and return a stale state. This bug was also affecting theAnnotation
andDataToHtml
components (but not @h5web/app). #1368- If you don't use
useCameraState
directly, upgrading should suffice. - If you use
useCameraState
directly, you'll need to revert some of the changes you made when upgrading to 7.0.0. More specifically, you'll need to pass once again a dependency array as second argument to the hook and reconfigure thereact-hooks/exhaustive-deps
linting rule in your project. See the documentation foruseCameraState
for more details.
- If you don't use
v7.0.0
👉 These release notes appear cropped on the Releases page. You'll find them in full on their dedicated page. 👈
Full Changelog: v6.6.1...v7.0.0 — big thanks to @PeterC-DLS for #1311, #1324 and #1356 🧑🤝🧑
tldr; This release includes numerous breaking changes and new features to the component library, @h5web/lib
. Highlights include: a simpler way to control the aspect ratio of the visualization; a more powerful SelectionTool
component with support for validating and transforming selections; a more flexible API to render SVG shapes on top of the canvas.
@h5web/app
- ❇️ Select-to-zoom interactions now zoom only on areas of at least 20x20px. This avoids inadvertently zooming on very small areas. Visual clues are provided to help users determine when selections being drawn become big enough to zoom on. #1345
- 🐛 Fix error when switching from
< NX Heatmap >
to< NX Line >
with an axis dataset longer than the signal dataset by one value (i.e. pixel boundaries) #1350 #1352 - 🐛 When drawing a zoom selection, the stroke of the rectangle is no longer partially cropped by the canvas. #1346
@h5web/lib
Open the sections below to see the changes.
⚠️ Breaking changes
[HeatmapVis, RgbVis]
Remove proplayout
, now replaced with propaspect
(cf. New features). #1284layout="cover"
👉 replace withaspect="equal"
(default)layout="fill"
👉 replace withaspect="auto"
layout="contain"
👉 remove; equivalent behaviour can be achieved by constraining the size of the visualization's container. #1283
[VisCanvas]
Remove propvisRatio
, now replaced with propaspect
(cf. New features). #1284visRatio={undefined}
👉 replace withaspect="auto"
(default)visRatio={cols / rows}
(i.e. orthonormal basis) 👉 replace withaspect="equal"
(the correctvisRatio
is computed internally)visRatio={(cols / rows) / aspect}
👉 replace withaspect={aspect}
[VisCanvas]
Remove propcanvasRatio
, which allowed restricting the canvas to a specific ratio. The canvas now always fills the available space (i.e. parent container minus axes). Migration: remove prop and constrain size of visualization container. #1283[DefaultInteractions, SelectToZoom]
Remove propkeepRatio
. Interaction components now adjust their behaviours automatically when used inside a canvas with an aspect ratio (cf. New features). #1287[SelectionTool, AxialSelectionTool]
Callback propsonSelectionChange
andonSelectionEnd
can now receiveundefined
when the user cancels the selection with Escape or releases the modifier key (if any). You may use the newonValidSelection
callback instead ofonSelectionEnd
if you only care about successful selections. #1360[SelectionTool, AxialSelectionTool]
The shape of selection objects passed to callback props and to the render prop has changed - cf. the new interface vs. the old interface- Remove
SelectionRect
andSelectionLine
. Use the newDataToHtml
,SvgElement
,SvgRect
andSvgLine
components instead. See code example below. - Rename
useAxisSystemContext()
touseVisCanvasContext()
#1291 - Utility
getAxisValues
now returnsNumArray
(i.e.TypedArray | number[]
) instead ofnumber[]
. #1357 useCameraState
The callback parameter no longer receives acontext
argument, and the second parameter is removed (i.e. the array dependencies à lauseCallback
), which means that ESLint rulereact-hooks/exhaustive-deps
no longer has to be configured in consumer projects. #1361dataToHtml, getVisibleDomains
must now be retrieved from context and no longer require acontext
argument. #1342- Rename
getWorldFOV
togetFovBox
and move to context; it no longer requires acontext
argument and returns aBox
instance (cf. New features). #1361 - Hook
useCanvasEvents
and context utilitiesdataToHtml, dataToWorld, worldToData
now work solely withVector3
instances; they no longer accept/returnVector2
instances. More generally, computations in all three coordinate spaces (HTML, world, data) are now performed withVector3
only to avoid cluttering the codebase withVector3 <-> Vector2
conversions (cf. notably, the newBox
class, as well as theRect
type used for selection rectangles). We recommend you do the same when implementing your own interactivity features. #1300 #1341 - Callbacks passed to
useCanvasEvents
no longer receive points in camera space (i.e. propertycameraPt
).
🚀 New features
VisCanvas
now renders ansvg
element that overlays the canvas. Use the newSvgElement
component to append any SVG shape to it from anywhere inside theVisCanvas
component tree. See code example and screen recording below. #1322- New
SvgRect
andSvgLine
components to simplify rendering SVGrect
andline
elements from a tuple ofVector3
points.SvgRect
also provides a way to simulate rendering the stroke outside or inside of the rectangle (instead of centred on the boundary). These components are for convenience only; don't hesitate to renderrect
,line
and any other SVG element directly. #1332 #1346 - New
DataToHtml
component to convert points from data space to HTML space directly in JSX. Useful to render SVG shapes on the canvas and update them automatically when the user zooms or pans. See code example below. - New
Box
utility class based on Three'sBox 3
, but with a more convenient API and some useful additional methods. Particularly handy when implementing interactivity features (zoom selection, SVG ROIs, etc.) #1323 #1359 [LineVis]
Allow passing abscissa array longer than data array (i.e. the abscissa array gets cropped) #1352[VisCanvas]
Add propaspect
, which works similarly to matplotlib'sAxes.set_aspect
#1284:aspect="auto"
: the visualization is to fill the entire canvas (default; i.e. the internalvisRatio
is set toundefined
);aspect="equal"
: one ordinate unit is to be displayed with the same number of pixels on screen as one abscissa unit (equivalent toaspect={1}
; i.e. orthonormal basis);aspect={2}
: one ordinate unit is to be displayed with twice the number of pixels on screen as one abscissa unit.
[VisCanvas]
Addnice
property toabscissaConfig
andordinateConfig
props. This passes through to D3 to allow it to extend the domains to nice values when appropriate. #1324[SelectToZoom, AxialSelectToZoom]
Enforce minimum selection size of 20x20px, with help of visual clues, to avoid inadvertently zooming when users mean to click. #1345[XAxisZoom, YAxisZoom, AxialSelectToZoom]
now disable themselves when used inside a canvas with an aspect ratio (equal or custom). #1287[SelectToZoom]
now configures its own behaviour automatically according to the canvas' aspect ratio (or lack thereof). #1287[SelectionTool, AxialSelectionTool]
Add propsvalidate
andonValidSelection
to support validating selections. See code examples and screen recordings below. Callback propsonSelectionChange
andonSelectionEnd
, as well as thechildren
render prop, all receive a boolean flag conveying whether the selection they are invoked with is valid. #1345[SelectionTool, AxialSelectionTool]
The selection objects passed to the render prop and to the callback props now include the selection rectangle in HTML space (in addition to world and data space). This is likely what you want to use in the render prop to render the selection rectangle in SVG. See code examples below. #1343[SelectionTool]
Add proptransform
to allow transforming the selection while it is being drawn. The render prop andonSelectionChange
both receive the transformed selection object as first parameter and the raw, untransformed selection object as second parameter. This feature is used internally byAxialSelectionTool
to transform the user's selection into a selection that spans the entire width or height of the canvas. For another example, check out story Rect With Transform. #1301 #1340 #1349[Histogram]
Add propshowLeftAxis
, which defaults totrue
, to allow hiding the left axis (withshowLeftAxis={false}
) #1295[DataCurve, ScatterPoints]
Accept typed arrays for abscissas and ordinates #1357getValueToIndexScale, getAxisDomain, getAxisValues
Accept typed arrays as argument #1357- [**
useCameraState
*...
v6.6.1
Full Changelog: v6.6.0...v6.6.1
@h5web/app
- 🐛 Fix Compression filters table appearing even if there was no filter when inspecting datasets #1282
@h5web/lib
v6.6.0
Full Changelog: v6.5.0...v6.6.0
@h5web/app
- ✨
< RGB, NX RGB >
Support stacks of RGB images #1259 - ✨
< RGB, NX RGB >
Allow transposing RGB images #1259 - ✨
< NX RGB >
Support custom axes #1262 - 🐛
< NX RGB >
Fix detection of RGB datasets insideNXdata
groups #1259 ⚠️ CSS variable--h5w-domainSlider-histogram-indicator--color
was renamed--h5w-domainSlider-histogram-marker--color
< Heatmap, NX Heatmap >
In the slider to select the colormap range, selecting a range smaller than the data domain no longer reduces the slider extent
@h5web/lib
- ✨ Expose the
Histogram
component used inDomainSlider
to display a histogram with markers selecting a range of bins. The markers can be made interactive through theonChange
prop. #1261 - ✨
[DomainSlider]
The domain can now be changed by clicking on the histogram markers (note that thehistogram
prop must be provided for the histogram to appear). #1267⚠️ CSS variable--h5w-domainSlider-histogram-indicator--color
was renamed--h5w-domainSlider-histogram-marker--color
- ✨
[VisCanvas]
New propshowAxes
to toggle the display of axes (default:true
). #1265 useCombinedDomain
Improve typings #1269
Experimental
⚠️ TiledHeatmapMesh
no longer renders a tooltip. Please use the newTiledTooltipMesh
component. #1258- ✨ New component
TiledTooltipMesh
with proprenderTooltip
to customise the content of the tooltip #1258 - 🐛
[TiledHeatmapMesh]
Fix regression where tiled heatmap was being flipped horizontally and vertically #1270
Screenshots
NeXus RGB image with 4 dimensions
v6.5.0
Full Changelog: v6.4.1...v6.5.0
- The
"type"
field was removed from thepackage.json
of published packages, which should accommodate more setups #1219.
@h5web/app
- ✨
< NX Spectrum, NX Image >
Rename visualizations "NX Line" and "NX Heatmap" respectively to reduce NeXus jargon #1244 - ✨
[H5GroveProvider, HsdsProvider, MockProvider]
New propgetExportURL
to generate client-side exports of datasets/slices, amongst other advanced use cases. See README of @h5web/app for a complete description. - ✨ In addition to the support of ArrowUp or ArrowDown for focused entities in the explorer, we have now support for:
- ArrowLeft: Focus the parent group or collapse an opened group
- ArrowRight: Focus the first child or expand a closed group (no effect for non-group entities)
- Home: Focus the root group
- End: Focus the last visible entity in the file tree
- ✨ Make focused entry in toolbar more visible #1234
- 🐛 Fix ordinate tick labels appearing underneath axis label by tweaking format, reducing font-size and adjusting axis offsets #1250 #1251
- 🐛
< Heatmap, NX Image, NX Scatter >
Fix a visual bug where the domain slider could seem to merge with the overflow menu #1235 - Default font size for tick labels (
--h5w-tickLabels--fontSize
) and color bar bounds (--h5w-colorBar-bounds--fontSize
) is now0.75em
#1251
@h5web/lib
- ✨
[Selector, ColorMapSelector, ScaleSelector]
Add an outline to the focused entry. The color of the outline can be set via the new CSS variable--h5w-selector-option-focus--outlineColor
. #1234 - 🐛 Fix ordinate tick labels appearing underneath axis label by tweaking format, reducing font-size and adjusting axis offsets #1250 #1251
- 🐛
[Selector, DomainSlider]
Fix stacking of opened menus (could merge with the overflow menu of the toolbar) #1235 [LineVis, ScatterVis]
Remove outer1rem
margin #1251
@h5web/h5wasm
- ✨
[H5WasmProvider]
New propgetExportURL
to generate client-side exports of datasets/slices. See README of @h5web/app for a complete description. - ✨
[H5WasmProvider]
Display dataset compression filters in metadata viewer #1253 - ✨
[H5WasmProvider]
Show error when visualizing dataset compressed with external filters #1253 - ✨
[H5WasmProvider]
Add basic support for datatypes #1252
Screenshots
NX Line, NX Heatmap
Keyboard arrows navigation in explorer
Dataset compressed with external filter in H5Wasm demo
Tick labels format/font-size
v6.4.1
Full Changelog: v6.4.0...v6.4.1
@h5web/app
- Prevent scroll of containers when navigating the explorer with the keyboard #1230
- Added visual cue when moving through dropdown entries in the toolbar
@h5web/lib
[Selector]
Change background color when focusing option. The color can be set via--h5w-selector-option-hover--bgColor
v6.4.0
Full Changelog: v6.3.0...v6.4.0
@h5web/app
- ✨ When an entity in the explorer has focus (as indicated by a focus outline), pressing ArrowUp or ArrowDown on the keyboard now moves focus to the next or previous entity (similarly to Tab and Shift+Tab). Pressing Enter (or Space) then selects the entity.
- ✨
< NX Image >
Enable or disable "keep ratio" automatically based on axis units:- if the
units
attributes of the two axis datasets are equal, enable "keep ratio"; - if the
units
attributes differ or only oneunits
attribute is present, disable "keep ratio"; - if no
units
attributes are present, apply the user's preferred setting as before.
- if the
- 🐛
< Scalar >
Don't collapse line breaks and tabs #1217 - 🐛
< Raw, Scalar >
Handle overflowing content better #1228 < NX Spectrum, NX Image, NX Scatter >
SILX_style
options are no longer persisted across visualizations. When the user selects a plottable NeXus group with aSILX_style
attribute, the plot configuration options suggested by the attribute (signal/axes scale types) now override the user's preferred options only for the current visualization and until the user decides otherwise. #1213[H5GroveProvider]
Improve error message when user does not have permission to access the file #1218⚠️ This change requires [email protected] #1218
[App]
Add proppropagateErrors
, which defaults tofalse
, to control whether errors should be let through the top-level error boundary in order to be handled by the consumer application #1211[App]
Focus the explorer on first render #1221
@h5web/lib
- ✨ New
AxialSelectionTool
component to allow drawing selections along a given axis #1225 - ✨ Add tooltip to experimental
TiledHeatmapMesh
component [ScatterVis]
MakecolorMap
prop optional (now defaults to'Viridis'
) #1210[TooltipMesh]
Add propsize
to allow resizing the mesh #1193
v6.3.0
v6.2.1
Full Changelog: v6.2.0...v6.2.1
@h5web/lib
⚠️ Bump minimal peer dependency version ofthree
from 0.120 to 0.138 #1194 (oversight from #1170)- 👉 Please upgrade
three
if you haven't already done so when installing@h5web/lib
v6.2.0
- 👉 Please upgrade
@h5web/h5wasm
- 🐛 Fix display of attribute values in metadata viewer for several dtypes, including
int64
,float
, andcomplex
#1191 - 🐛 Fix
Unknown
dtype in metadata viewer for string datasets #1192