Skip to content

Commit

Permalink
docs(ontology): update docs and show hint in ontology-form (DSP-1139) (
Browse files Browse the repository at this point in the history
  • Loading branch information
kilchenmann committed Jun 30, 2021
1 parent 2f314a2 commit 927237d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/user-guide/project.md
Expand Up @@ -66,7 +66,13 @@ Go to your project, select the tab `Data model` and click on button `New data mo
> - shouldn't begin with a number
> - shouldn't begin with the letter v and a number
> - spaces or special characters are not allowed
> - the term "ontology" is not allowed
> - may not contain these reserved words:
> - knora
> - ontology
> - salsah
> - shared
> - simple
> - standoff
> - the unique name can't be changed afterwards
The label is a combination of project's shortname and the unique name. You can replace with any other string.
Expand Down
Expand Up @@ -4,6 +4,7 @@
<mat-form-field class="large-field ontology-name">
<input matInput class="ontology-name" [maxlength]="nameMaxLength" [formControl]="ontologyForm.controls['name']"
[placeholder]="'Set a unique name *'">
<mat-icon matSuffix [matTooltip]="ontologyNameInfo" matTooltipPosition="above" matTooltipClass="multi-line-tooltip">help</mat-icon>
<mat-hint *ngIf="formErrors.name" class="medium-field">
{{ formErrors.name }}
</mat-hint>
Expand Down
10 changes: 10 additions & 0 deletions src/app/project/ontology/ontology-form/ontology-form.component.ts
Expand Up @@ -86,6 +86,16 @@ export class OntologyFormComponent implements OnInit {
}
};

ontologyNameInfo = `
The unique name
- must be at least 3 characters long
- shouldn't begin with a number
- shouldn't begin with the letter v and a number
- spaces or special characters are not allowed
- may not contain these reserved words: knora, ontology, salsah, shared, simple or standoff
- can't be changed afterwards
`;

error = false;

constructor(
Expand Down
11 changes: 11 additions & 0 deletions src/assets/style/_elements.scss
Expand Up @@ -609,6 +609,17 @@ $gc-small: $form-width - $gc-large - 4;

// --------------------------------------

//
// tooltip configuration

.multi-line-tooltip {
white-space: pre-line;
line-height: 1.5;
font-size: 12px;
}

// --------------------------------------

//
// nested mat-menu switch arrow to the left in case the menu position is on the right hand side
.switch-nested-menu {
Expand Down

0 comments on commit 927237d

Please sign in to comment.