From 6c6e7ed2f633b7b2754f0e113ba65ff098faac30 Mon Sep 17 00:00:00 2001 From: Charlie Date: Tue, 9 May 2023 16:21:59 +0200 Subject: [PATCH 1/2] adjust name length --- frontend/javascripts/admin/dataset/dataset_components.tsx | 3 ++- frontend/javascripts/messages.tsx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/javascripts/admin/dataset/dataset_components.tsx b/frontend/javascripts/admin/dataset/dataset_components.tsx index e475d21165c..d2bab29e5cc 100644 --- a/frontend/javascripts/admin/dataset/dataset_components.tsx +++ b/frontend/javascripts/admin/dataset/dataset_components.tsx @@ -34,7 +34,7 @@ export function CardContainer({ } export const layerNameRules = [ { - min: 3, + min: 1, }, // Note that these rules are also checked by the backend { @@ -57,6 +57,7 @@ export const getDatasetNameRules = ( required: true, message: messages["dataset.import.required.name"], }, + { min: 3, message: messages["dataset.name_length"] }, ...layerNameRules, { validator: async (_rule: any, value: string) => { diff --git a/frontend/javascripts/messages.tsx b/frontend/javascripts/messages.tsx index 4350efeb838..e3cbb3774c1 100644 --- a/frontend/javascripts/messages.tsx +++ b/frontend/javascripts/messages.tsx @@ -317,6 +317,7 @@ instead. Only enable this option if you understand its effect. All layers will n "dataset.import.required.folder": "Please define a target folder for this dataset.", "dataset.import.invalid_fields": "Please check that all form fields are valid.", "dataset.unique_layer_names": "The layer names provided by the dataset are not unique.", + "dataset.name_length": "Dataset name must be at least 3 characters", "dataset.unsupported_element_class": (layerName: string, elementClass: string) => `The layer "${layerName}" was defined as ${elementClass}. This format is not officially supported. Please convert the layer to a supported format.`, "dataset.unsupported_segmentation_class_uint24": From a32a6cc1e0c086ddd8353955618d094c7a6ff9d7 Mon Sep 17 00:00:00 2001 From: Charlie Date: Tue, 9 May 2023 16:33:06 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 844d47a07c6..9d608c3aba2 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -19,6 +19,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released ### Changed - Loading of precomputed meshes got significantly faster (especially when using a mesh file for an oversegmentation with an applied agglomerate mapping). [#7001](https://github.com/scalableminds/webknossos/pull/7001) - Improved speed of proofreading by only reloading affected areas after a split or merge. [#7050](https://github.com/scalableminds/webknossos/pull/7050) +- The minimum length of layer names in datasets was set from 3 to 1, enabling single-character names for layers. [#7064](https://github.com/scalableminds/webknossos/pull/7064) ### Fixed - Fixed that changing a segment color could lead to a crash. [#7000](https://github.com/scalableminds/webknossos/pull/7000)