From 24c512c1e2918a57bfea60905eb32e9ea3825b20 Mon Sep 17 00:00:00 2001 From: Charlie Meister Date: Mon, 23 Dec 2024 19:17:54 +0100 Subject: [PATCH 1/4] only display mag slider if there are multiple mags and fix additional axes check --- .../view/action-bar/download_modal_view.tsx | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx b/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx index c7091569432..7f55b9eb1d0 100644 --- a/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx +++ b/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx @@ -576,6 +576,8 @@ function _DownloadModalView({ ); + const onlyOneMagAvailable = selectedLayerMagInfo.getMagList().length === 1; + const tiffExportTab = ( <> @@ -642,7 +644,7 @@ function _DownloadModalView({ style={{ width: "100%" }} /> {boundingBoxCompatibilityAlerts} - {selectedLayerInfos.additionalAxes != null && ( + {(selectedLayerInfos.additionalAxes?.length || 0) > 0 && ( Mag - - - - - - {mag.join("-")} - - + {!onlyOneMagAvailable ? ( + + + + + + {mag.join("-")} + + + ) : null} + {onlyOneMagAvailable && mag.join("-")} +
Estimated file size:{" "} {estimateFileSize(selectedLayer, mag, selectedBoundingBox.boundingBox, exportFormat)}
From be14740950afa2369f3f5b37aff203e99e0ed72d Mon Sep 17 00:00:00 2001 From: Charlie Meister Date: Mon, 23 Dec 2024 19:28:18 +0100 Subject: [PATCH 2/4] add changelog --- CHANGELOG.unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 1f0225d766c..c571cbf10d2 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -36,6 +36,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Fixed some layout issues in the upload view. [#8231](https://github.com/scalableminds/webknossos/pull/8231) - Fixed `FATAL: role "postgres" does not exist` error message in Docker compose. [#8240](https://github.com/scalableminds/webknossos/pull/8240) - Fixed the Zarr 3 implementation not accepting BytesCodec without "configuration" key. [#8282](https://github.com/scalableminds/webknossos/pull/8282) +- Removed the magnification slider for the TIFF export within the download modal if only one magnification is available for the selected layer. [#8297](https://github.com/scalableminds/webknossos/pull/8297) ### Removed - Removed support for HTTP API versions 3 and 4. [#8075](https://github.com/scalableminds/webknossos/pull/8075) From 8b090d20a171e322a8186dc2380f84a2e18e68fa Mon Sep 17 00:00:00 2001 From: Charlie Meister Date: Mon, 30 Dec 2024 15:25:31 +0100 Subject: [PATCH 3/4] improve if clause --- .../oxalis/view/action-bar/download_modal_view.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx b/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx index 7f55b9eb1d0..11b1540bf67 100644 --- a/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx +++ b/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx @@ -672,7 +672,7 @@ function _DownloadModalView({ > Mag - {!onlyOneMagAvailable ? ( + {!onlyOneMagAvailable && ( @@ -684,7 +684,7 @@ function _DownloadModalView({ {mag.join("-")} - ) : null} + )} Date: Mon, 6 Jan 2025 13:42:18 +0100 Subject: [PATCH 4/4] address review: remove
--- .../javascripts/oxalis/view/action-bar/download_modal_view.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx b/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx index 11b1540bf67..4e0713d595d 100644 --- a/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx +++ b/frontend/javascripts/oxalis/view/action-bar/download_modal_view.tsx @@ -691,8 +691,7 @@ function _DownloadModalView({ display: "block", }} > - {onlyOneMagAvailable && mag.join("-")} -
+ {onlyOneMagAvailable &&
{mag.join("-")}
} Estimated file size:{" "} {estimateFileSize(selectedLayer, mag, selectedBoundingBox.boundingBox, exportFormat)}