Skip to content
Snippets Groups Projects
Commit 0f15044c authored by Ruben Bimberg's avatar Ruben Bimberg :computer:
Browse files

Fix UI / UX bugs

Some UI bugs were discovered during a meeting, this is
a recommendation / example for new colors and fixing the bugs.
parent d3446870
No related merge requests found
Showing
with 67 additions and 83 deletions
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
fxFill> fxFill>
<div fxLayout="row" <div fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<app-mat-spinner-overlay *ngIf="isLoading" overlay="true" useCustomCSSColor="true"></app-mat-spinner-overlay> <app-mat-spinner-overlay *ngIf="isLoading" overlay="true"></app-mat-spinner-overlay>
<mat-card *ngIf="room"> <mat-card *ngIf="room">
<div fxLayout="row"> <div fxLayout="row">
<span class="fill-remaining-space"></span> <span class="fill-remaining-space"></span>
......
...@@ -143,7 +143,3 @@ markdown { ...@@ -143,7 +143,3 @@ markdown {
background: var(--secondary); background: var(--secondary);
color: var(--on-secondary); color: var(--on-secondary);
} }
app-mat-spinner-overlay {
color: var(--primary);
}
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
fxFill> fxFill>
<div fxLayout="row" <div fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<app-mat-spinner-overlay *ngIf="isLoading" overlay="true" useCustomCSSColor="true"></app-mat-spinner-overlay> <app-mat-spinner-overlay *ngIf="isLoading" overlay="true"></app-mat-spinner-overlay>
<mat-card *ngIf="room"> <mat-card *ngIf="room">
<div fxLayout="row"> <div fxLayout="row">
<span class="fill-remaining-space"></span> <span class="fill-remaining-space"></span>
......
...@@ -147,7 +147,3 @@ markdown { ...@@ -147,7 +147,3 @@ markdown {
color: var(--on-surface); color: var(--on-surface);
margin: 0 3% 0 3% !important; margin: 0 3% 0 3% !important;
} }
app-mat-spinner-overlay {
color: var(--primary);
}
<div fxLayout="column" fxLayoutAlign="center" fxLayoutGap="20px" fxFill> <div fxLayout="column" fxLayoutAlign="center" fxLayoutGap="20px" fxFill>
<div fxLayout="row" fxLayoutAlign="center"> <div fxLayout="row" fxLayoutAlign="center">
<app-mat-spinner-overlay *ngIf="isLoading" overlay="true" useCustomCSSColor="true"></app-mat-spinner-overlay> <app-mat-spinner-overlay *ngIf="isLoading" overlay="true"></app-mat-spinner-overlay>
<mat-card *ngIf="room"> <mat-card *ngIf="room">
<div fxLayout="row"> <div fxLayout="row">
<span class="fill-remaining-space"></span> <span class="fill-remaining-space"></span>
......
...@@ -103,7 +103,3 @@ markdown { ...@@ -103,7 +103,3 @@ markdown {
color: var(--on-surface); color: var(--on-surface);
margin: 0 3% 0 3% !important; margin: 0 3% 0 3% !important;
} }
app-mat-spinner-overlay {
color: var(--primary);
}
...@@ -173,8 +173,8 @@ mat-icon { ...@@ -173,8 +173,8 @@ mat-icon {
margin-right: auto; margin-right: auto;
} }
::ng-deep.mat-drawer-backdrop.mat-drawer-shown { ::ng-deep .mat-drawer-backdrop {
display: none; opacity: 0;
} }
::ng-deep.mat-slider-track-background { ::ng-deep.mat-slider-track-background {
......
...@@ -4,6 +4,7 @@ import { TagCloudComponent } from '../../tag-cloud/tag-cloud.component'; ...@@ -4,6 +4,7 @@ import { TagCloudComponent } from '../../tag-cloud/tag-cloud.component';
import { WeightClass } from './weight-class.interface'; import { WeightClass } from './weight-class.interface';
import { TagCloudMetaDataCount } from '../../../../services/util/tag-cloud-data.service'; import { TagCloudMetaDataCount } from '../../../../services/util/tag-cloud-data.service';
import { CloudParameters, CloudTextStyle } from '../../../../utils/cloud-parameters'; import { CloudParameters, CloudTextStyle } from '../../../../utils/cloud-parameters';
import { AppComponent } from '../../../../app.component';
@Component({ @Component({
selector: 'app-cloud-configuration', selector: 'app-cloud-configuration',
...@@ -26,7 +27,7 @@ export class CloudConfigurationComponent implements OnInit { ...@@ -26,7 +27,7 @@ export class CloudConfigurationComponent implements OnInit {
alphabeticalSorting: boolean; alphabeticalSorting: boolean;
rotation: number; rotation: number;
highestWeight: number; highestWeight: number;
step:number = 10; step: number = 10;
weightClasses: WeightClass[] = [ weightClasses: WeightClass[] = [
{ {
maxTagNumber: 20, maxTagNumber: 20,
...@@ -99,18 +100,19 @@ export class CloudConfigurationComponent implements OnInit { ...@@ -99,18 +100,19 @@ export class CloudConfigurationComponent implements OnInit {
allowManualTagNumber: false allowManualTagNumber: false
}, },
]; ];
MinFont:number; MinFont: number;
MaxFont:number; MaxFont: number;
isTestCloud = false; isTestCloud = false;
constructor(private translateService: TranslateService) { } constructor(private translateService: TranslateService) {
}
ngOnInit() { ngOnInit() {
this.translateService.use(localStorage.getItem('currentLang')); this.translateService.use(localStorage.getItem('currentLang'));
this.cloudParameters = new CloudParameters(this.parent.currentCloudParameters); this.cloudParameters = new CloudParameters(this.parent.currentCloudParameters);
this.defaultCloudParameters = new CloudParameters(this.parent.currentCloudParameters); this.defaultCloudParameters = new CloudParameters(this.parent.currentCloudParameters);
this.parent.dataManager.getMetaData().subscribe((value)=>{ this.parent.dataManager.getMetaData().subscribe((value) => {
if (!value) { if (!value) {
return; return;
} }
...@@ -141,20 +143,20 @@ export class CloudConfigurationComponent implements OnInit { ...@@ -141,20 +143,20 @@ export class CloudConfigurationComponent implements OnInit {
parseArrayToJsonWeightClasses() { parseArrayToJsonWeightClasses() {
this.cloudParameters.cloudWeightSettings.forEach((element, i) => { this.cloudParameters.cloudWeightSettings.forEach((element, i) => {
this.weightClasses[i].tagColor = element.color; this.weightClasses[i].tagColor = element.color;
this.weightClasses[i].actualTagNumber = this.countPerWeight[i]; this.weightClasses[i].actualTagNumber = this.countPerWeight[i];
this.weightClasses[i].rotationAngle = element.rotation; this.weightClasses[i].rotationAngle = element.rotation;
this.weightClasses[i].maxTagNumber = (element.maxVisibleElements == -1 || element.maxVisibleElements == 0) ? this.weightClasses[i].actualTagNumber : element.maxVisibleElements; this.weightClasses[i].maxTagNumber = (element.maxVisibleElements == -1 || element.maxVisibleElements == 0) ? this.weightClasses[i].actualTagNumber : element.maxVisibleElements;
this.weightClasses[i].allowManualTagNumber = element.allowManualTagNumber; this.weightClasses[i].allowManualTagNumber = element.allowManualTagNumber;
}); });
} }
parseJsonToArrayWeightClasses() { parseJsonToArrayWeightClasses() {
this.weightClasses.forEach((element, i) => { this.weightClasses.forEach((element, i) => {
this.cloudParameters.cloudWeightSettings[i].allowManualTagNumber = element.allowManualTagNumber; this.cloudParameters.cloudWeightSettings[i].allowManualTagNumber = element.allowManualTagNumber;
if(element.allowManualTagNumber == true){ if (element.allowManualTagNumber == true) {
this.cloudParameters.cloudWeightSettings[i].maxVisibleElements = element.maxTagNumber == 0 ? -1 : element.maxTagNumber; this.cloudParameters.cloudWeightSettings[i].maxVisibleElements = element.maxTagNumber == 0 ? -1 : element.maxTagNumber;
}else{ } else {
this.cloudParameters.cloudWeightSettings[i].maxVisibleElements = -1; this.cloudParameters.cloudWeightSettings[i].maxVisibleElements = -1;
} }
this.cloudParameters.cloudWeightSettings[i].color = element.tagColor; this.cloudParameters.cloudWeightSettings[i].color = element.tagColor;
...@@ -167,22 +169,35 @@ export class CloudConfigurationComponent implements OnInit { ...@@ -167,22 +169,35 @@ export class CloudConfigurationComponent implements OnInit {
this.parent.setCloudParameters(this.cloudParameters, false); this.parent.setCloudParameters(this.cloudParameters, false);
} }
cancel() { closePanel() {
this.parent.tagCloudDataManager.demoActive = false; this.parent.tagCloudDataManager.demoActive = false;
this.parent.drawer.close();
this.readMaxFont();
const defaultScale = AppComponent.rescale.getInitialScale();
if (defaultScale !== 1) {
AppComponent.rescale.setDefaultScale(defaultScale);
this.parent.updateTagCloud();
}
}
openPanel() {
if (AppComponent.rescale.getInitialScale() !== 1) {
AppComponent.rescale.setDefaultScale(1);
}
}
cancel() {
this.parent.setCloudParameters(this.defaultCloudParameters); this.parent.setCloudParameters(this.defaultCloudParameters);
this.cloudParameters = new CloudParameters(this.defaultCloudParameters); this.cloudParameters = new CloudParameters(this.defaultCloudParameters);
this.parent.configurationOpen = false;
this.setStep(0); this.setStep(0);
this.readMaxFont(); this.closePanel();
} }
save() { save() {
this.parent.tagCloudDataManager.demoActive = false;
this.parent.setCloudParameters(this.cloudParameters); this.parent.setCloudParameters(this.cloudParameters);
this.defaultCloudParameters = new CloudParameters(this.cloudParameters); this.defaultCloudParameters = new CloudParameters(this.cloudParameters);
this.parent.configurationOpen = false;
this.setStep(0); this.setStep(0);
this.readMaxFont(); this.closePanel();
} }
toggleExtendedView() { toggleExtendedView() {
...@@ -217,19 +232,19 @@ export class CloudConfigurationComponent implements OnInit { ...@@ -217,19 +232,19 @@ export class CloudConfigurationComponent implements OnInit {
this.step--; this.step--;
} }
reset(){ reset() {
this.parent.resetColorsToTheme(); this.parent.resetColorsToTheme();
this.parent.configurationOpen = false;
this.cloudParameters = new CloudParameters(this.parent.currentCloudParameters); this.cloudParameters = new CloudParameters(this.parent.currentCloudParameters);
this.defaultCloudParameters = new CloudParameters(this.parent.currentCloudParameters); this.defaultCloudParameters = new CloudParameters(this.parent.currentCloudParameters);
this.readMaxFont(); this.closePanel();
} }
italicChecked(event){ italicChecked(event) {
this.cloudParameters.fontStyle = event.checked === true ? 'italic' : 'normal'; this.cloudParameters.fontStyle = event.checked === true ? 'italic' : 'normal';
this.valueChanged(); this.valueChanged();
} }
boldChecked(event){
boldChecked(event) {
this.cloudParameters.fontWeight = event.checked === true ? 'bold' : 'normal'; this.cloudParameters.fontWeight = event.checked === true ? 'bold' : 'normal';
this.valueChanged(); this.valueChanged();
} }
...@@ -238,20 +253,20 @@ export class CloudConfigurationComponent implements OnInit { ...@@ -238,20 +253,20 @@ export class CloudConfigurationComponent implements OnInit {
return this.cloudParameters.fontWeight === 'bold'; return this.cloudParameters.fontWeight === 'bold';
} }
readMaxFont(){ readMaxFont() {
let valMax:number = this.cloudParameters.fontSizeMax; let valMax: number = this.cloudParameters.fontSizeMax;
let valMin:number = this.cloudParameters.fontSizeMin; let valMin: number = this.cloudParameters.fontSizeMin;
this.MaxFont = Math.floor(valMax/valMin); this.MaxFont = Math.floor(valMax / valMin);
} }
calcMaxFont(event,setMin:Boolean){ calcMaxFont(event, setMin: Boolean) {
let val:number = Number(event.target.value); let val: number = Number(event.target.value);
if(val >0 && val <=10 && !setMin){ if (val > 0 && val <= 10 && !setMin) {
this.cloudParameters.fontSizeMax = this.cloudParameters.fontSizeMin * val; this.cloudParameters.fontSizeMax = this.cloudParameters.fontSizeMin * val;
this.MaxFont = val; this.MaxFont = val;
this.valueChanged(); this.valueChanged();
} }
if(setMin){ if (setMin) {
this.cloudParameters.fontSizeMax = this.cloudParameters.fontSizeMin * this.MaxFont; this.cloudParameters.fontSizeMax = this.cloudParameters.fontSizeMin * this.MaxFont;
this.valueChanged(); this.valueChanged();
} }
......
...@@ -125,10 +125,7 @@ ...@@ -125,10 +125,7 @@
{{ 'comment-page.grammar-check' | translate}} {{ 'comment-page.grammar-check' | translate}}
<mat-icon *ngIf="grammarChecker.isSpellchecking" <mat-icon *ngIf="grammarChecker.isSpellchecking"
class="spinner-container"> class="spinner-container">
<app-mat-spinner-overlay diameter="20" <app-mat-spinner-overlay diameter="20" strokeWidth="2" [color]="'on-primary'"></app-mat-spinner-overlay>
strokeWidth="2"
[useCustomCSSColor]="true">
</app-mat-spinner-overlay>
</mat-icon> </mat-icon>
</button> </button>
</ars-col> </ars-col>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</span> </span>
<ars-row class="list-container"> <ars-row class="list-container">
<div fxLayout="row" fxLayoutAlign="center center" fxFill> <div fxLayout="row" fxLayoutAlign="center center" fxFill>
<app-mat-spinner-overlay *ngIf="isLoading" useCustomCSSColor="true"></app-mat-spinner-overlay> <app-mat-spinner-overlay *ngIf="isLoading"></app-mat-spinner-overlay>
</div> </div>
<mat-list dense class="keywords-list"> <mat-list dense class="keywords-list">
<mat-list-item *ngFor="let keyword of keywords; let odd = odd; let even = even; let i = index" <mat-list-item *ngFor="let keyword of keywords; let odd = odd; let even = even; let i = index"
......
...@@ -138,7 +138,3 @@ ...@@ -138,7 +138,3 @@
.mat-option { .mat-option {
color: var(--on-surface); color: var(--on-surface);
} }
app-mat-spinner-overlay {
color: var(--primary);
}
<mat-dialog-content> <mat-dialog-content>
<div fxLayout="row" fxLayoutAlign="center center" fxFill> <div fxLayout="row" fxLayoutAlign="center center" fxFill>
<app-mat-spinner-overlay *ngIf="isLoading" [useCustomCSSColor]="true"></app-mat-spinner-overlay> <app-mat-spinner-overlay *ngIf="isLoading"></app-mat-spinner-overlay>
</div> </div>
<div *ngIf="!isLoading"> <div *ngIf="!isLoading">
<mat-accordion hideToggle> <mat-accordion hideToggle>
......
...@@ -181,7 +181,3 @@ mat-dialog-content { ...@@ -181,7 +181,3 @@ mat-dialog-content {
color: black; color: black;
width: 100%; width: 100%;
} }
app-mat-spinner-overlay {
color: var(--primary);
}
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
autofocus autofocus
autocomplete="off" autocomplete="off"
type="text" type="text"
(keyup)="checkForEnter($event)"
[(ngModel)]="question"> [(ngModel)]="question">
<button *ngIf="question" <button *ngIf="question"
matSuffix matSuffix
......
...@@ -143,9 +143,7 @@ export class TopicCloudFilterComponent implements OnInit { ...@@ -143,9 +143,7 @@ export class TopicCloudFilterComponent implements OnInit {
return; return;
} }
const params = CloudParameters.currentParameters; localStorage.setItem('tag-cloud-question', this.question);
params.question = this.question;
CloudParameters.currentParameters = params;
CommentFilter.currentFilter = filter; CommentFilter.currentFilter = filter;
...@@ -153,6 +151,12 @@ export class TopicCloudFilterComponent implements OnInit { ...@@ -153,6 +151,12 @@ export class TopicCloudFilterComponent implements OnInit {
}; };
} }
checkForEnter(e: KeyboardEvent) {
if (e.key === 'Enter') {
this.confirmButtonActionCallback()();
}
}
private isUpdatable(): boolean { private isUpdatable(): boolean {
if (this.comments.length < 3) { if (this.comments.length < 3) {
return false; return false;
......
...@@ -95,10 +95,7 @@ ...@@ -95,10 +95,7 @@
{{ 'comment-page.grammar-check' | translate}} {{ 'comment-page.grammar-check' | translate}}
<mat-icon *ngIf="grammarChecker.isSpellchecking" <mat-icon *ngIf="grammarChecker.isSpellchecking"
class="spinner-container"> class="spinner-container">
<app-mat-spinner-overlay diameter="20" <app-mat-spinner-overlay diameter="20" strokeWidth="2" [color]="'on-primary'"></app-mat-spinner-overlay>
strokeWidth="2"
[useCustomCSSColor]="true">
</app-mat-spinner-overlay>
</mat-icon> </mat-icon>
</button> </button>
</ars-col> </ars-col>
......
...@@ -250,10 +250,7 @@ ...@@ -250,10 +250,7 @@
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
</button> </button>
<app-mat-spinner-overlay *ngIf="isLoading" <app-mat-spinner-overlay *ngIf="isLoading" overlay="true"></app-mat-spinner-overlay>
overlay="true"
[useCustomCSSColor]="true">
</app-mat-spinner-overlay>
<div *ngIf="!isLoading"> <div *ngIf="!isLoading">
<app-comment *ngFor="let current of hideCommentsList ? filteredComments : commentsFilteredByTime" <app-comment *ngFor="let current of hideCommentsList ? filteredComments : commentsFilteredByTime"
......
...@@ -258,7 +258,3 @@ h3 { ...@@ -258,7 +258,3 @@ h3 {
h1 { h1 {
color: red; color: red;
} }
app-mat-spinner-overlay {
color: var(--primary);
}
...@@ -19,10 +19,7 @@ ...@@ -19,10 +19,7 @@
style="margin-right: 5px;">{{buttonIcon}}</mat-icon> style="margin-right: 5px;">{{buttonIcon}}</mat-icon>
{{ buttonsLabelSection + '.' + confirmButtonLabel | translate}} {{ buttonsLabelSection + '.' + confirmButtonLabel | translate}}
<mat-icon *ngIf="showLoadingCycle" class="spinner-container"> <mat-icon *ngIf="showLoadingCycle" class="spinner-container">
<app-mat-spinner-overlay diameter="20" <app-mat-spinner-overlay diameter="20" strokeWidth="2" [color]="'on-primary'"></app-mat-spinner-overlay>
strokeWidth="2"
[useCustomCSSColor]="true">
</app-mat-spinner-overlay>
</mat-icon> </mat-icon>
</button> </button>
<button <button
......
<ng-container *ngIf="overlay;else progressSpinner"> <ng-container *ngIf="overlay;else progressSpinner">
<div class="overlay"> <div class="overlay {{color}}">
<div class="center"> <div class="center">
<ng-template [ngTemplateOutlet]="progressSpinner"></ng-template> <ng-template [ngTemplateOutlet]="progressSpinner"></ng-template>
</div> </div>
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<mat-progress-spinner <mat-progress-spinner
#containerRef #containerRef
[ngClass]="{'inline-spinner': !overlay}" [ngClass]="{'inline-spinner': !overlay}"
class="{{color}}"
[diameter]="diameter" [diameter]="diameter"
[mode]="mode" [mode]="mode"
[color]="color"
[strokeWidth]="strokeWidth" [strokeWidth]="strokeWidth"
[value]="value"> [value]="value">
</mat-progress-spinner> </mat-progress-spinner>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment