scottyaslan commented on code in PR #8535:
URL: https://github.com/apache/nifi/pull/8535#discussion_r1542102631


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/state/flow/flow.effects.ts:
##########
@@ -2189,11 +2190,12 @@ export class FlowEffects {
                 ofType(FlowActions.showOkDialog),
                 tap((request) => {
                     this.dialog.open(OkDialog, {
+                        ...MEDIUM_DIALOG,
+                        maxWidth: '24rem',

Review Comment:
   The approach I tried to take in regards to the dialog widths was to keep as 
much parody with the current dialog widths as possible but to use the 
mat-dialog API to set the dialog sizes and not using the dialog content widths 
to determine the dialog width.
   
   One thing to note here:  The tailwind css `.max-w-sm` sets the max-width: 
24rem; and the `.w-96` sets width: 24rem;.
   
   So when I started looking throughout the nifi application I noticed that the 
SMALL_DIALOG size was used almost exclusively for the YesNoDialog use cases. If 
you look in the template for the YesNoDialog you will see that I removed the 
`.max-w-sm` class from the template. Instead now the SMALL_DIALOG config sets 
the maxWidth: '24rem'.
   
   There were three remaining dialogs (other than YesNoDialogs) that used the 
SMALL_DIALOG size. The OverridePolicyDialog, CreatePortDialog, and 
AddPropertyDialog. For the OverridePolicayDialog the 
override-policy-dialog.component.html template set a `.w-96` which as we noted 
above sets a width: 24rem;. This is effectively the same thing as using the 
`.max-w-sm` class and so we simply can use the SMALL_DIALOG size config for the 
OverridePolicyDialog. For the other two SMALL_DIALOG's (CreatePortDialog and 
the AddPropertyDialog) the maxWidth: '24rem' works really well so I left them 
as SMALL_DIALOG.
   
   The last place we had a width set by a tailwind style in an dialog component 
template was in the OkDialog where `.max-w-sm` was setting a max-width: 24rem. 
But not all OkDialogs are the same size. Some OkDialog are SMALL_DIALOG and 
some OkDialog are MEDIUM_DIALOG. So in order that the OkDialog use cases to 
have parody the OkDialogs need to receive their initial size config from a 
SMALL_DIALOG or a MEDIUM_DIALOG config but all OkDialogs must also override 
their `maxWidth: '24rem'` to account for the removal of the `.max-w-sm` from 
the OkDialog template.



-- 
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-unsubscr...@nifi.apache.org

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

Reply via email to