You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/07/04 16:41:14 UTC

[incubator-streampipes] branch dev updated: [STREAMPIPES-555] Remove feedback button from toolbar

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new 8d044c10c [STREAMPIPES-555] Remove feedback button from toolbar
8d044c10c is described below

commit 8d044c10c2ec31623c055a6e36eda2cb40ea4a5e
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Mon Jul 4 18:41:05 2022 +0200

    [STREAMPIPES-555] Remove feedback button from toolbar
---
 .../components/feedback/feedback.component.html    | 64 ----------------------
 .../core/components/feedback/feedback.component.ts | 62 ---------------------
 .../core/components/toolbar/toolbar.component.html | 17 ------
 .../core/components/toolbar/toolbar.component.ts   | 14 -----
 ui/src/app/core/core.module.ts                     |  2 -
 5 files changed, 159 deletions(-)

diff --git a/ui/src/app/core/components/feedback/feedback.component.html b/ui/src/app/core/components/feedback/feedback.component.html
deleted file mode 100644
index 781c749e6..000000000
--- a/ui/src/app/core/components/feedback/feedback.component.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  ~
-  -->
-
-<div class="feedback-container" (click) = "$event.stopPropagation()">
-    <div fxLayout="column" fxFlex="100" *ngIf="!sendingFeedback">
-        <div fxLayout="column" fxFlex="50" fxLayoutAlign="start center">
-            <div class="feedback-title">We welcome your feedback!</div>
-        </div>
-        <div fxLayout="column" fxFlex="40" fxLayoutAlign="start center" style="margin-bottom:20px;">
-            <div fxFlex="100" class="feedback-explainer">
-                <span>Your feedback helps us to improve {{appConstants.APP_NAME}}.<br/></span>
-                <span>Features you'd like to see, bugs you've found or things you like - tell us what you think!</span>
-            </div>
-        </div>
-        <div fxLayout="column" fxFlex="40" fxLayoutAlign="start center" style="margin-bottom:20px;">
-            <mat-form-field class="feedback-width-100 feedback-font-size-small" color="accent">
-                <label>Your feedback</label>
-                <textarea matInput [(ngModel)]="feedback.feedbackText" maxlength="500" rows="5"></textarea>
-            </mat-form-field>
-        </div>
-        <div fxLayout="column" fxFlex="40" fxLayoutAlign="end center">
-            <div fxLayout="row" fxLayoutAlign="end end">
-                <button mat-button mat-raised-button class="mat-basic" (click)="closeDialog()" style="margin-right:10px;">
-                    Close
-                </button>
-                <button mat-button mat-raised-button color="accent" type="submit"
-                           (click)="sendMail()">
-                    Send Mail
-                </button>
-            </div>
-        </div>
-    </div>
-    <div fxFlex="100" fxLayout="column" *ngIf="sendingFeedback" class="feedback-height-100">
-        <div *ngIf="!sendingFeedbackFinished" class="feedback-height-100">
-            <div fxLayout="column" fxLayoutAlign="center center" fxFlex="100" fxLayoutFill>
-                <mat-spinner [mode]="'indeterminate'" [diameter]="96"></mat-spinner>
-                <div class="feedback-status">Submitting feedback...</div>
-            </div>
-        </div>
-        <div *ngIf="sendingFeedbackFinished" fxFlex="100" class="feedback-height-100">
-            <div fxLayout="column" fxLayoutAlign="center center" fxFlex="100" fxLayoutFill>
-                <div class="feedback-status">Thanks!</div>
-                <button mat-button mat-raised-button class="mat-basic" (click)="closeDialog()">
-                    Close
-                </button>
-            </div>
-        </div>
-    </div>
-</div>
diff --git a/ui/src/app/core/components/feedback/feedback.component.ts b/ui/src/app/core/components/feedback/feedback.component.ts
deleted file mode 100644
index e27e46ade..000000000
--- a/ui/src/app/core/components/feedback/feedback.component.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import { Component, EventEmitter, OnInit, Output } from '@angular/core';
-import { AppConstants } from '../../../services/app.constants';
-
-@Component({
-    selector: 'feedback',
-    templateUrl: './feedback.component.html',
-})
-export class FeedbackComponent implements OnInit {
-
-    @Output()
-    closeFeedbackEmitter: EventEmitter<void> = new EventEmitter<void>();
-
-    feedback: any = {};
-
-    sendingFeedback = false;
-    sendingFeedbackFinished = false;
-
-    // deactivate direct feedback for Apache transition
-    feedbackUrl = '';
-    debugFeedbackUrl = '';
-
-    targetEmail: string;
-
-    constructor(public appConstants: AppConstants) {
-        this.targetEmail = appConstants.EMAIL;
-    }
-
-    ngOnInit() {
-        this.sendingFeedback = false;
-        this.sendingFeedbackFinished = false;
-    }
-
-    closeDialog() {
-        this.closeFeedbackEmitter.emit();
-        this.sendingFeedback = false;
-        this.sendingFeedbackFinished = false;
-    }
-
-    sendMail() {
-        this.sendingFeedback = true;
-        window.open('mailto:' + this.targetEmail + '?subject=' + '[USER-FEEDBACK]' + '&body=' + this.feedback.feedbackText, '_self');
-        this.sendingFeedbackFinished = true;
-    }
-}
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.html b/ui/src/app/core/components/toolbar/toolbar.component.html
index 6ee8046a4..0d1034707 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.html
+++ b/ui/src/app/core/components/toolbar/toolbar.component.html
@@ -30,27 +30,10 @@
         </div>
         <span fxFlex></span>
         <div fxFlex="40" fxLayout fxLayoutAlign="end center" *ngIf="authenticated" style="height:100%;">
-            <div fxLayoutAlign="start center" *ngIf="versionInfo && versionInfo.backendVersion">
-                <span class="version-info-text">v{{versionInfo.backendVersion}}</span>
-            </div>
             <!-- uncomment this to quickly investigate layout issues between dark and light mode -->
 <!--            <div>-->
 <!--                <mat-slide-toggle color="accent" [formControl]="appearanceControl">Dark Mode</mat-slide-toggle>-->
 <!--            </div>-->
-            <div style="height:100%;">
-                <div [ngClass]="feedbackOpen.menuOpen ? 'sp-navbar-item-selected' : 'sp-navbar-item'" fxLayout fxLayoutAlign="center center" style="height: 100%;">
-                    <button mat-button mat-icon-button
-                            [matMenuTriggerFor]="feedbackMenu"
-                            #feedbackOpen="matMenuTrigger"
-                            matTooltip="Feedback" matTooltipPosition="below"
-                            [ngClass]="feedbackOpen.menuOpen ? 'sp-icon-button-no-hover' : 'sp-icon-button'" style="min-width:0px;" fxLayout fxLayoutAlign="center center">
-                        <i [ngClass]="feedbackOpen.menuOpen ? 'sp-navbar-icon-selected' : 'sp-navbar-icon'" class="material-icons">feedback</i>
-                    </button>
-                </div>
-            </div>
-            <mat-menu #feedbackMenu="matMenu" style="max-width: none;" class="feedback-menu-content">
-                <feedback (closeFeedbackEmitter)="closeFeedbackWindow()"></feedback>
-            </mat-menu>
             <div style="height:100%;">
                 <div [ngClass]="accountMenuOpen.menuOpen ? 'sp-navbar-item-selected' : 'sp-navbar-item'" fxLayout fxLayoutAlign="center center" style="height: 100%;">
                     <button mat-button mat-icon-button
diff --git a/ui/src/app/core/components/toolbar/toolbar.component.ts b/ui/src/app/core/components/toolbar/toolbar.component.ts
index 68a6ecc09..ff14471b8 100644
--- a/ui/src/app/core/components/toolbar/toolbar.component.ts
+++ b/ui/src/app/core/components/toolbar/toolbar.component.ts
@@ -24,7 +24,6 @@ import { MatMenuTrigger } from '@angular/material/menu';
 import { FormControl } from '@angular/forms';
 import { OverlayContainer } from '@angular/cdk/overlay';
 import { ProfileService } from '../../../profile/profile.service';
-import { VersionInfo } from '../../../info/versions/service/version-info.model';
 import { AuthService } from '../../../services/auth.service';
 import { AppConstants } from '../../../services/app.constants';
 
@@ -39,7 +38,6 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
   @ViewChild('accountMenuOpen') accountMenuOpen: MatMenuTrigger;
 
   userEmail;
-  versionInfo: VersionInfo;
   darkMode: boolean;
 
   appearanceControl: FormControl;
@@ -54,7 +52,6 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
   }
 
   ngOnInit(): void {
-    this.getVersion();
     this.authService.user$.subscribe(user => {
       this.userEmail = user.displayName;
       this.profileService.getUserProfile(user.username).subscribe(userInfo => {
@@ -81,11 +78,6 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
     }
   }
 
-  closeFeedbackWindow() {
-    // this.feedbackOpen = false;
-    this.feedbackOpen.closeMenu();
-  }
-
   openDocumentation() {
     window.open('https://streampipes.apache.org/docs', '_blank');
   }
@@ -105,10 +97,4 @@ export class ToolbarComponent extends BaseNavigationComponent implements OnInit
     this.router.navigate(['login']);
   }
 
-  getVersion() {
-    this.restApi.getVersionInfo().subscribe((response) => {
-      this.versionInfo = response as VersionInfo;
-    });
-  }
-
 }
diff --git a/ui/src/app/core/core.module.ts b/ui/src/app/core/core.module.ts
index 956182f94..30a1af128 100644
--- a/ui/src/app/core/core.module.ts
+++ b/ui/src/app/core/core.module.ts
@@ -22,7 +22,6 @@ import { MatIconModule } from '@angular/material/icon';
 import { FlexLayoutModule } from '@angular/flex-layout';
 import { CommonModule } from '@angular/common';
 import { StreampipesComponent } from './components/streampipes/streampipes.component';
-import { FeedbackComponent } from './components/feedback/feedback.component';
 import { MatButtonModule } from '@angular/material/button';
 import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
 import { MatInputModule } from '@angular/material/input';
@@ -60,7 +59,6 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
     ],
     declarations: [
         StreampipesComponent,
-        FeedbackComponent,
         IconbarComponent,
         ToolbarComponent
     ],