You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "scottyaslan (via GitHub)" <gi...@apache.org> on 2024/05/09 14:54:33 UTC

[PR] Nifi 13177 [nifi]

scottyaslan opened a new pull request, #8786:
URL: https://github.com/apache/nifi/pull/8786

   ![Screenshot 2024-05-09 at 10 53 29 AM](https://github.com/apache/nifi/assets/6797571/733a0b07-aca5-47b8-a181-791fb2b111f2)
   ![Screenshot 2024-05-09 at 10 53 41 AM](https://github.com/apache/nifi/assets/6797571/b91a3b2b-806e-454b-b1e7-d7abc78cf9cd)
   ![Screenshot 2024-05-09 at 10 54 03 AM](https://github.com/apache/nifi/assets/6797571/c43a25e1-5011-4645-9d13-927805856220)
   


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [NIFI-13177] ensure consistent typography rendering [nifi]

Posted by "scottyaslan (via GitHub)" <gi...@apache.org>.
scottyaslan commented on PR #8786:
URL: https://github.com/apache/nifi/pull/8786#issuecomment-2103595719

   @rfellows thanks for the updates and the PR. These are great! 


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [NIFI-13177] ensure consistent typography rendering [nifi]

Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows commented on code in PR #8786:
URL: https://github.com/apache/nifi/pull/8786#discussion_r1596805354


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pipes/component-type-name.pipe.ts:
##########
@@ -23,7 +23,10 @@ import { ComponentType } from '../state/shared';
     standalone: true
 })
 export class ComponentTypeNamePipe implements PipeTransform {
-    transform(type: ComponentType): string {
+    transform(type: ComponentType | string): string {
+        if (typeof type === 'string') {
+            return type;
+        }

Review Comment:
   this is an issue too, sorry for the bad suggestions. we need to remove this check and just return `type` in the default case of the switch...
   



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [NIFI-13177] ensure consistent typography rendering [nifi]

Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows commented on code in PR #8786:
URL: https://github.com/apache/nifi/pull/8786#discussion_r1596711403


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/component-context/component-context.component.ts:
##########
@@ -27,22 +27,25 @@ import { ComponentTypeNamePipe } from '../../../pipes/component-type-name.pipe';
     styleUrl: './component-context.component.scss'
 })
 export class ComponentContext {
-    private _componentType: ComponentType = ComponentType.Processor;
+    private _componentType: ComponentType | string | null = ComponentType.Processor;
     componentIconClass: string = '';
 
-    @Input() set type(type: ComponentType) {
+    @Input() set type(type: ComponentType | string | null) {
         this._componentType = type;
         this.componentIconClass = this.getIconClassName(type);
     }
 
-    get type(): ComponentType {
+    get type(): ComponentType | string | null {
         return this._componentType;
     }
 
     @Input() id: string | null = null;
     @Input() name: string = '';
 
-    private getIconClassName(type: ComponentType) {
+    private getIconClassName(type: ComponentType | string | null) {
+        if (type !== null && typeof type !== 'string') {
+            return 'icon-drop';
+        }

Review Comment:
   This didn't work for the Parameter Context example. It should show the nifi drop logo for param contexts. I made a quick change to this method that solves the issue.
   
   basically we can't determine the difference between a string and a Component type. need to return the drop icon if it is null or it isn't in the switch (so the default scenario)...
   
   ```
       private getIconClassName(type: ComponentType | string | null) {
           if (type === null) {
               return 'icon-drop';
           }
           switch (type) {
               case ComponentType.Connection:
                   return 'icon-connect';
               case ComponentType.Processor:
                   return 'icon-processor';
               case ComponentType.OutputPort:
                   return 'icon-port-out';
               case ComponentType.InputPort:
                   return 'icon-port-in';
               case ComponentType.ProcessGroup:
                   return 'icon-group';
               case ComponentType.Funnel:
                   return 'icon-funnel';
               case ComponentType.Label:
                   return 'icon-label';
               case ComponentType.RemoteProcessGroup:
                   return 'icon-group-remote';
               default:
                   return 'icon-drop';
           }
       }
   ```



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [NIFI-13177] ensure consistent typography rendering [nifi]

Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows merged PR #8786:
URL: https://github.com/apache/nifi/pull/8786


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org