From 35cb7d4c71c8458806bf58d1a5b7f4960f2cdf5c Mon Sep 17 00:00:00 2001 From: fairdataihub-bot Date: Thu, 30 May 2024 21:01:19 +0000 Subject: [PATCH 1/4] =?UTF-8?q?style:=20=F0=9F=8E=A8=20fix=20code=20style?= =?UTF-8?q?=20issues=20with=20Prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c3b2c1ca..9b6a6586f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,6 @@ All notable changes to SODA will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - ## v15.0.1 - 2024-05-30 ## Bug fixes: From e6d7508f2477dbc5b9f22928e4195fded2272d98 Mon Sep 17 00:00:00 2001 From: Aaron M <43050715+aaronm-2112@users.noreply.github.com> Date: Thu, 30 May 2024 14:22:22 -0700 Subject: [PATCH 2/4] chore: Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b6a6586f..6cd5434aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## v15.0.1 - 2024-05-30 +## Feature Additions: + +- Manifest generation text is less prominent. + ## Bug fixes: - Fixed an issue wherre uploads fail for fresh Pennsieve Agent installs. From 3a7d6ead3fb4d2d006c67ba14e2bd23cda02a957 Mon Sep 17 00:00:00 2001 From: Jacob Clark Date: Thu, 30 May 2024 15:21:04 -0700 Subject: [PATCH 3/4] fix: Handle case when traversing back to unset ds name input --- src/renderer/src/scripts/guided-mode/guided-curate-dataset.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/scripts/guided-mode/guided-curate-dataset.js b/src/renderer/src/scripts/guided-mode/guided-curate-dataset.js index caa8a0e45..6d84ea376 100644 --- a/src/renderer/src/scripts/guided-mode/guided-curate-dataset.js +++ b/src/renderer/src/scripts/guided-mode/guided-curate-dataset.js @@ -5203,7 +5203,7 @@ window.openPage = async (targetPageID) => { if (targetPageID === "guided-name-subtitle-tab") { // Get the dataset name and subtitle from the JSON obj - const datasetName = getGuidedDatasetName(); + const datasetName = getGuidedDatasetName() || ""; // Set the zustand datasetName state value to the dataset name setGuidedDatasetName(datasetName); @@ -12407,7 +12407,7 @@ $("#guided-submission-completion-date-manual").change(function () { ///////////////////////////////////////////////////////// const getGuidedDatasetName = () => { - return window.sodaJSONObj["digital-metadata"]["name"]; + return window.sodaJSONObj["digital-metadata"]["name"] || ""; }; const getGuidedDatasetSubtitle = () => { From ffbfc8cea787ff599783ed3b85c243b5263a25e5 Mon Sep 17 00:00:00 2001 From: Jacob Clark Date: Thu, 30 May 2024 15:23:51 -0700 Subject: [PATCH 4/4] fix: Gracefully handle case when zustand dropdown stores are set with new props --- .../src/stores/slices/dropDownSlice.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/stores/slices/dropDownSlice.js b/src/renderer/src/stores/slices/dropDownSlice.js index 39621e741..80e15eb47 100644 --- a/src/renderer/src/stores/slices/dropDownSlice.js +++ b/src/renderer/src/stores/slices/dropDownSlice.js @@ -15,11 +15,23 @@ export const dropDownSlice = (set) => ({ export const setDropdownState = (id, selectedValue) => { useGlobalStore.setState( produce((state) => { - const dropDownOptions = useGlobalStore.getState().dropDownState[id].options; + // Get the options for the dropdown related to the id passed in + const dropDownOptions = useGlobalStore + .getState() + .dropDownState[id].options.filter((option) => option !== ""); + + // If the selected value is not in the dropdown options, set the value + // to an empty string and add an empty string to the dropdown options if (!dropDownOptions.includes(selectedValue)) { - return; + state.dropDownState[id].options = ["", ...dropDownOptions]; + state.dropDownState[id].selectedValue = ""; + } else { + // If the selected value is in the dropdown options, set the selected value + // to the selected value passed in and set the dropdown options to the + // dropdown options (To remove the empty string if it exists) + state.dropDownState[id].options = dropDownOptions; + state.dropDownState[id].selectedValue = selectedValue; } - state.dropDownState[id].selectedValue = selectedValue || ""; }) ); };