Skip to content

Commit e4237e7

Browse files
authored
Usability Bugfixing (#10)
* Fix usability Tasks * A minus sign is missing in the hint for Integer * The hint is wrong for nonpositive and nonnegative int * Nothing happens when clicking "Add" button on Unit * Show additional popus for notifications" in settings does not work * When editing referenceUnit in Unit, an incorrect value is displayed * Not correct behavior when displaying 2 properties * Specific constraints are not saved * Add symbol disappears from Characteristic after deleting Trait * Explanations for the symbols (diagram resize) are missing* * Show a message if validation fails * Show "select language" only if the language is not selected * Unique format icon * Change the message at smart connection "property"-"operation" * The description of several elements does not fit on the left panel * Better highlight the selected diagram elements in ttl files * Unit should be removed from search * curie dataType is not displayed in characteristic * Data of characteristic instances are not always displayed after saving * Details of edited charcteristic are not displayed immediately * There are 2 scrollbars in "Setting-Notification" dialog * Characteristic jumps aside if "add trait" was clicked on * Copy / Paste is displayed in some dialogs (disable) * Edit dialog still appears if the element was deleted * Editing the same files in multiple editor instances * After "Load aspect model" changes in previously opened diagram are discarded * Diagram element names should be unique
1 parent ecb7047 commit e4237e7

File tree

128 files changed

+2247
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+2247
-427
lines changed

core/apps/ame-e2e/src/integration/editor/create-recursive-element.spec.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,11 @@ describe('Test create recursive element', () => {
166166
.then(() => cy.get(SELECTOR_tbDeleteButton).click({force: true}))
167167
.then(() => cy.getUpdatedRDF())
168168
.then(rdf => {
169-
expect(rdf).to.contain(
170-
':property1 a bamm:Property;\n' + ' bamm:name "property1";\n' + ' bamm:characteristic :Characteristic1.'
171-
);
172-
expect(rdf).to.contain(
173-
':newProperty2 a bamm:Property;\n' + ' bamm:name "newProperty2";\n' + ' bamm:characteristic :Characteristic1.'
174-
);
175-
expect(rdf).to.contain(
176-
':newProperty3 a bamm:Property;\n' + ' bamm:name "newProperty3";\n' + ' bamm:characteristic :Characteristic1.'
177-
);
178-
cy.getAspect().then(checkIfAspectHasCharacteristic);
179-
cyHelp.hasAddShapeOverlay('newProperty2').then(addShapeIcon => expect(addShapeIcon).to.be.false);
180-
cyHelp.hasAddShapeOverlay('newProperty3').then(addShapeIcon => expect(addShapeIcon).to.be.false);
169+
expect(rdf).to.contain(':property1 a bamm:Property;\n' + ' bamm:name "property1".');
170+
expect(rdf).to.contain(':newProperty2 a bamm:Property;\n' + ' bamm:name "newProperty2".');
171+
expect(rdf).to.contain(':newProperty3 a bamm:Property;\n' + ' bamm:name "newProperty3".');
172+
cyHelp.hasAddShapeOverlay('newProperty2').then(addShapeIcon => expect(addShapeIcon).to.be.true);
173+
cyHelp.hasAddShapeOverlay('newProperty3').then(addShapeIcon => expect(addShapeIcon).to.be.true);
181174
});
182175
});
183176
});

core/apps/ame-e2e/src/integration/editor/edit-collection.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ describe('Test editing different Collections', () => {
308308
.then(() => cy.get(SELECTOR_tbDeleteButton).click({force: true}))
309309
.then(() => cy.getUpdatedRDF())
310310
.then(rdf => {
311-
console.log(rdf);
312311
expect(rdf).not.contain('NewCharacteristic');
313312
});
314313
};

core/apps/ame-e2e/src/support/commands.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,7 @@ Cypress.Commands.add('clickConnectShapes', (nameSource, nameTarget) =>
331331
.then(() => cyHelp.clickShape(nameSource))
332332
.then(() => cyHelp.clickShape(nameTarget, true))
333333
.then(() => {
334-
debugger;
335334
cy.get(SELECTOR_tbConnectButton).click({force: true});
336-
debugger;
337335
})
338336
);
339337

@@ -350,14 +348,14 @@ Cypress.Commands.add('dragElement', (selector: string, x: number, y: number) =>
350348
if (Cypress.platform === 'darwin') {
351349
return cy
352350
.get(selector)
353-
.trigger('mousedown', 'left' ,{which: 1, force: true})
351+
.trigger('mousedown', 'left', {which: 1, force: true})
354352
.trigger('mousemove', {clientX: graphX, clientY: graphY, force: true, waitForAnimations: true})
355353
.then(() => cy.get('#graph > svg').click(graphX, graphY, {force: true}).trigger('mouseup', {force: true}));
356354
}
357355

358356
return cy
359357
.get(selector)
360-
.trigger('pointerdown' ,{which: 1, force: true})
358+
.trigger('pointerdown', {which: 1, force: true})
361359
.trigger('pointermove', {clientX: graphX, clientY: graphY, force: true, waitForAnimations: true})
362360
.then(() => cy.get('#graph > svg').click(graphX, graphY, {force: true}).trigger('pointerup', {force: true}));
363361
})

core/apps/ame/src/app/app.component.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ export class AppComponent implements OnInit {
119119
},
120120
]
121121
: []),
122-
{role: 'cut', label: 'Cut selected text'},
123-
{role: 'copy', label: 'Copy selected text'},
124122
...(target.tagName.toLowerCase() === 'a'
125123
? [
126124
{
@@ -131,7 +129,6 @@ export class AppComponent implements OnInit {
131129
},
132130
]
133131
: []),
134-
{role: 'paste', label: 'Paste'},
135132
];
136133

137134
const menu = Menu.buildFromTemplate(template);

core/apps/ame/src/app/components/editor-canvas/editor-canvas-menu.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
<div id="outline" class="map-graph"></div>
1616
</div>
1717
<div class="menu-container" *ngIf="settings.showEditorNav">
18-
<button mat-button (click)="fit()">
18+
<button mat-button (click)="fit()" title="Fit the complete model on the current view">
1919
<mat-icon>fit_screen</mat-icon>
2020
</button>
21-
<button mat-button (click)="actualSize()">
21+
<button mat-button (click)="actualSize()" title="Reset zoom level to 100%">
2222
<mat-icon>close_fullscreen</mat-icon>
2323
</button>
24-
<button mat-button (click)="zoomIn()">
24+
<button mat-button (click)="zoomIn()" title="Zoom in">
2525
<mat-icon>add</mat-icon>
2626
</button>
27-
<button mat-button (click)="zoomOut()">
27+
<button mat-button (click)="zoomOut()" title="Zoom out">
2828
<mat-icon>remove</mat-icon>
2929
</button>
3030
</div>

core/apps/ame/src/app/components/editor-canvas/sidebar/sidebar-element/sidebar-element.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
#container
1717
[ngClass]="{'element-imported': elementImported()}"
1818
[attr.data-cy]="dataCy"
19-
[title]="elementImported() ? 'Element already imported' : 'Drag to the right to create this element'"
19+
[title]="elementImported() ? 'Element already imported' : element.name + ' - Drag to the right to add'"
2020
class="container"
2121
>
2222
<div class="icon" [ngClass]="getIconClass">
23-
{{ element.type.charAt(0).toUpperCase() }}
23+
{{ elementShortcut[element.type] }}
2424
</div>
2525
<div class="info" [matTooltip]="element.description" matTooltipPosition="right">
2626
<div class="name" [title]="element.name">

core/apps/ame/src/app/components/editor-canvas/sidebar/sidebar-element/sidebar-element.component.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,29 @@ import {MxGraphService} from '@ame/mx-graph';
1919
import {ElementModel} from '@ame/shared';
2020
import {environment} from 'environments/environment';
2121

22+
export const elementShortcuts = {
23+
property: 'P',
24+
operation: 'O',
25+
characteristic: 'C',
26+
entity: 'E',
27+
constraint: 'C',
28+
trait: 'T',
29+
unit: 'U',
30+
event: 'E',
31+
abstractEntity: 'AE',
32+
};
33+
2234
@Component({
2335
selector: 'ame-sidebar-element',
2436
templateUrl: './sidebar-element.component.html',
2537
styleUrls: ['./sidebar-element.component.scss'],
2638
})
2739
export class SidebarElementComponent implements AfterViewInit {
28-
@Input()
29-
public element: ElementModel;
30-
31-
@ViewChild('container')
32-
public container: any;
40+
@Input() public element: ElementModel;
41+
@ViewChild('container') public container: any;
3342

3443
public dataCy = '';
44+
public elementShortcut = elementShortcuts;
3545

3646
get getIconClass(): string {
3747
return this.element.type.toLowerCase();

core/apps/ame/src/app/components/editor-canvas/sidebar/sidebar-namespace-elements/namespace-filter/namespace-filter.component.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@
1616
<input matInput [placeholder]="'Search elements in ' + fileName" type="text" [(ngModel)]="searchedString" (keyup)="filterElements()" />
1717
</mat-form-field>
1818
<div class="types">
19-
<div *ngFor="let type of types" class="type" [ngClass]="getClassesForType(type)" (click)="toggleSelect(type)">
19+
<div
20+
*ngFor="let type of types"
21+
class="type"
22+
matTooltipPosition="above"
23+
[matTooltip]="'Filter by ' + type.charAt(0).toUpperCase() + type.substring(1, type.length)"
24+
[ngClass]="getClassesForType(type)"
25+
(click)="toggleSelect(type)"
26+
>
2027
{{ type.charAt(0).toUpperCase() }}
2128
</div>
2229
</div>

core/apps/ame/src/app/components/editor-canvas/sidebar/sidebar-namespace-elements/namespace-filter/namespace-filter.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@
2626
color: var(--ame-font);
2727
cursor: pointer;
2828
user-select: none;
29+
opacity: 60%;
2930
border: solid 1px transparent;
31+
box-sizing: border-box;
3032
}
3133

3234
.selected {
35+
opacity: 100%;
36+
border-width: 2px;
3337
border-color: var(--ame-font);
3438
}
3539
}

core/apps/ame/src/app/components/editor-canvas/sidebar/sidebar-namespace-elements/namespace-filter/namespace-filter.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class NamespaceFilterComponent implements OnChanges {
2929
@Output()
3030
public searchElements = new EventEmitter<ElementModel[]>();
3131

32-
public types = ['property', 'operation', 'characteristic', 'entity', 'constraint', 'trait', 'unit', 'event'];
32+
public types = ['property', 'operation', 'characteristic', 'entity', 'constraint', 'trait', 'event'];
3333
public selectedTypes = [];
3434
public searchedString: string = null;
3535
public filteredElements: ElementModel[];

0 commit comments

Comments
 (0)