rfellows commented on code in PR #10347:
URL: https://github.com/apache/nifi/pull/10347#discussion_r2388870758


##########
nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/common/about-dialog/about-dialog.component.html:
##########
@@ -0,0 +1,47 @@
+<!--
+  ~ 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="about-dialog">
+    <h2 mat-dialog-title>About NiFi Registry</h2>
+    <mat-dialog-content>
+        <context-error-banner 
[context]="ErrorContextKey.ABOUT"></context-error-banner>
+        <div class="flex flex-col justify-between gap-y-5">
+            @if (about$ | async; as about) {
+                <div class="flex justify-center">
+                    <img
+                        ngSrc="assets/icons/registry-logo-web-app.svg"
+                        priority
+                        width="300"
+                        height="128"

Review Comment:
   Weird dev tools console warning about this size: 
   ```
   common.mjs:1775 NG02952: The NgOptimizedImage directive (activated on an 
<img> element with the `ngSrc="assets/icons/registry-logo-web-app.svg"`) has 
detected that the aspect ratio of the image does not match the aspect ratio 
indicated by the width and height attributes. 
   Intrinsic image size: 117w x 150h (aspect-ratio: 0.78). 
   Supplied width and height attributes: 300w x 128h (aspect-ratio: 2.34). 
   To fix this, update the width and height attributes.
   ```



##########
nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/common/about-dialog/about-dialog.component.ts:
##########
@@ -0,0 +1,59 @@
+/*
+ * 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 { AsyncPipe, NgOptimizedImage } from '@angular/common';
+import { Component, inject } from '@angular/core';
+import { ReactiveFormsModule } from '@angular/forms';
+import { MatButtonModule } from '@angular/material/button';
+import { MatDialogModule } from '@angular/material/dialog';
+import { MatFormFieldModule } from '@angular/material/form-field';
+import { MatInputModule } from '@angular/material/input';
+import { CloseOnEscapeDialog } from '@nifi/shared';
+import { Store } from '@ngrx/store';
+import { AboutState } from '../../../state/about';
+import { selectAbout } from '../../../state/about/about.selectors';
+import { loadAbout } from '../../../state/about/about.actions';
+import { ContextErrorBanner } from 
'../context-error-banner/context-error-banner.component';
+import { ErrorContextKey } from '../../../state/error';
+
+@Component({
+    selector: 'registry-about-dialog',
+    templateUrl: './about-dialog.component.html',
+    styleUrl: './about-dialog.component.scss',
+    standalone: true,
+    imports: [
+        MatButtonModule,
+        MatDialogModule,
+        AsyncPipe,
+        ReactiveFormsModule,
+        MatFormFieldModule,
+        MatInputModule,
+        NgOptimizedImage,
+        ContextErrorBanner
+    ]
+})
+export class AboutDialogComponent extends CloseOnEscapeDialog {
+    private store = inject<Store<AboutState>>(Store);
+
+    constructor() {
+        super();
+        this.store.dispatch(loadAbout());

Review Comment:
   Its inconsistent with how the nifi about dialog works. load about is not 
loaded as part of the dialog open, rather it is loaded as part of a 
higher-level component (navigation, content viewer, ...)
   
   also, the about in those cases doesn't show an error banner in the dialog. 
Pretty sure it is a snackbar or global error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to