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

docs(ontology): update docs and show hint in ontology-form (DSP-1139) #476

Merged
merged 1 commit into from Jun 30, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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