Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Min length for layer names is one #7064

Merged
merged 3 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion frontend/javascripts/admin/dataset/dataset_components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function CardContainer({
}
export const layerNameRules = [
{
min: 3,
min: 1,
},
// Note that these rules are also checked by the backend
{
Expand All @@ -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) => {
Expand Down
1 change: 1 addition & 0 deletions frontend/javascripts/messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down