diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index a0a298f8c02..a5a4572950c 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -20,6 +20,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) 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":